Table of Contents
Fetching ...

Learning Nonlinear Systems In-Context: From Synthetic Data to Real-World Motor Control

Tong Jian, Tianyu Dai, Tao Yu

TL;DR

The paper addresses data-efficient control of nonlinear motor dynamics under varying loads, a setting where PI and physics-based methods struggle. It proposes a two-stage transformer framework pretrained on synthetic systems that enables one-shot in-context learning for motor feedforward control, followed by minimal fine-tuning. The approach generalizes to unseen motors and loads, achieving lower errors than PI and physics-based baselines, with 2-stage pretraining and the inclusion of nonlinear time-invariant data boosting performance. This work demonstrates that synthetic pretraining combined with in-context learning can enable rapid, hardware-agnostic, data-efficient control of physical systems.

Abstract

LLMs have shown strong in-context learning (ICL) abilities, but have not yet been extended to signal processing systems. Inspired by their design, we have proposed for the first time ICL using transformer models applicable to motor feedforward control, a critical task where classical PI and physics-based methods struggle with nonlinearities and complex load conditions. We propose a transformer based model architecture that separates signal representation from system behavior, enabling both few-shot finetuning and one-shot ICL. Pretrained on a large corpus of synthetic linear and nonlinear systems, the model learns to generalize to unseen system dynamics of real-world motors only with a handful of examples. In experiments, our approach generalizes across multiple motor load configurations, transforms untuned examples into accurate feedforward predictions, and outperforms PI controllers and physics-based feedforward baselines. These results demonstrate that ICL can bridge synthetic pretraining and real-world adaptability, opening new directions for data efficient control of physical systems.

Learning Nonlinear Systems In-Context: From Synthetic Data to Real-World Motor Control

TL;DR

The paper addresses data-efficient control of nonlinear motor dynamics under varying loads, a setting where PI and physics-based methods struggle. It proposes a two-stage transformer framework pretrained on synthetic systems that enables one-shot in-context learning for motor feedforward control, followed by minimal fine-tuning. The approach generalizes to unseen motors and loads, achieving lower errors than PI and physics-based baselines, with 2-stage pretraining and the inclusion of nonlinear time-invariant data boosting performance. This work demonstrates that synthetic pretraining combined with in-context learning can enable rapid, hardware-agnostic, data-efficient control of physical systems.

Abstract

LLMs have shown strong in-context learning (ICL) abilities, but have not yet been extended to signal processing systems. Inspired by their design, we have proposed for the first time ICL using transformer models applicable to motor feedforward control, a critical task where classical PI and physics-based methods struggle with nonlinearities and complex load conditions. We propose a transformer based model architecture that separates signal representation from system behavior, enabling both few-shot finetuning and one-shot ICL. Pretrained on a large corpus of synthetic linear and nonlinear systems, the model learns to generalize to unseen system dynamics of real-world motors only with a handful of examples. In experiments, our approach generalizes across multiple motor load configurations, transforms untuned examples into accurate feedforward predictions, and outperforms PI controllers and physics-based feedforward baselines. These results demonstrate that ICL can bridge synthetic pretraining and real-world adaptability, opening new directions for data efficient control of physical systems.
Paper Structure (13 sections, 2 equations, 6 figures, 1 table)

This paper contains 13 sections, 2 equations, 6 figures, 1 table.

Figures (6)

  • Figure 1: Proposed workflow. We consider systems $f$ that generate input–output pairs. The proposed model predicts a query output from one single pair in an in-context learning manner. Pretrained on a large corpus of synthetic linear and nonlinear systems and finetuned on a few motor examples, the model has the ability to generalize effectively to unseen motors and configurations.
  • Figure 2: Block diagram of the motor control loop. A feedforward path complements the PI feedback controller to track the target velocity, reducing the tuning burden and enabling good performance on untuned motors. Our proposed model replaces the traditional physics-based method to predict effective feedforward signals. This removes the need for accurate motor system modeling and generalizes more easily to complex motor systems.
  • Figure 3: Proposed model architecture. The signal representation model is an encoder–decoder that encodes both $\mathbf{x}$ and $\mathbf{y}$ into token sequences. The system behavior model has two blocks: a system embedding block, which learns a system-level embedding $z$ that characterizes system behavior from pairs, and a signal prediction block, which uses $z$ as the prompt together with tokens of $\mathbf{x}_2$ to generate accurate $\hat{\mathbf{y}}_2$ predictions.
  • Figure 4: Synthetic dataset examples: input–output pairs with six input signal types. The first row shows pairs generated by a third-order LTI bandpass filter. The second row shows pairs generated by a third-order NTI system with saturation and static friction.
  • Figure 5: Pretraining performance: (a) signal representation model reconstruction at the 95th percentile RMSE, (b) system embeddings visualized with t-SNE, showing clear separation between LTI and NTI systems, and further distinction among filter types (lowpass/bandstop vs. highpass/bandpass), and (c)-(d) system prediction examples for both LTI and NTI system at the 95th percentile RMSE.
  • ...and 1 more figures