用Transformer实现高精度实时控制,支持可变预测时长。
TransMPC: Transformer-based Explicit MPC with Variable Prediction Horizon
- 用仅编码器的Transformer一次性生成整段控制序列
- 在车辆实验中实现高精度控制且推理延迟极低
- 适合需要快速自适应的复杂动态系统控制
传统在线模型预测控制(MPC)因计算复杂度过高而难以部署。显式MPC通过离线预计算控制策略减轻在线负担,但现有方法多依赖简化系统模型与代价函数,限制了对复杂系统的精度。本文提出TransMPC,一种基于Transformer的显式MPC算法,可在实时条件下为复杂动态系统生成高精度控制序列。具体地,将MPC策略建模为仅编码器的Transformer,利用双向自注意力机制,在单次前向传播中同时推断完整控制序列,天然支持可变预测时长并保证低推理延迟。此外,提出直接策略优化框架,交替进行采样与学习,不依赖预计算最优轨迹,而是通过自动微分直接优化有限时域代价。结合随机时长采样与经验回放缓冲区,生成独立同分布(i.i.d.)训练样本,确保在不同状态与时长下的强泛化能力。大量仿真与真实车辆控制实验验证了TransMPC在解的准确性、时长自适应性及计算效率方面的有效性。
原文摘要 · Abstract (English)
Traditional online Model Predictive Control (MPC) methods often suffer from excessive computational complexity, limiting their practical deployment. Explicit MPC mitigates online computational load by pre-computing control policies offline; however, existing explicit MPC methods typically rely on simplified system dynamics and cost functions, restricting their accuracy for complex systems. This paper proposes TransMPC, a novel Transformer-based explicit MPC algorithm capable of generating highly accurate control sequences in real-time for complex dynamic systems. Specifically, we formulate the MPC policy as an encoder-only Transformer leveraging bidirectional self-attention, enabling simultaneous inference of entire control sequences in a single forward pass. This design inherently accommodates variable prediction horizons while ensuring low inference latency. Furthermore, we introduce a direct policy optimization framework that alternates between sampling and learning phases. Unlike imitation-based approaches dependent on precomputed optimal trajectories, TransMPC directly optimizes the true finite-horizon cost via automatic differentiation. Random horizon sampling combined with a replay buffer provides independent and identically distributed (i.i.d.) training samples, ensuring robust generalization across varying states and horizon lengths. Extensive simulations and real-world vehicle control experiments validate the effectiveness of TransMPC in terms of solution accuracy, adaptability to varying horizons, and computational efficiency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。