This work presents a transparent and reproducible benchmark study of a direct dual-network Physics-Informed Neural Network (PINN) formulation for the optimal control of a mass-spring-damper system. The classical linear-quadratic optimal control problem is solved by two independent classical methods -- Pontryagin's Minimum Principle with single shooting, and direct transcription through trapezoidal collocation -- and recast as a constrained optimization problem solved by two feedforward neural networks: a state network whose boundary conditions are enforced exactly through a composite cubic-and-mask ansatz, and an unconstrained control network. The composite loss combines the physics residual at the collocation points with a trapezoidal approximation of the cost functional, weighted by a single scalar hyperparameter. On the benchmark considered, the PINN reproduces the classical optimal cost to four significant digits, satisfies the terminal state constraints exactly by construction, and produces pointwise state and control errors that fall within the spread of the two classical references. Training is approximately two orders of magnitude slower than classical shooting on this benchmark, which is honestly reported. The contribution is methodological clarity rather than methodological novelty: the formulation and the accompanying Google Colab implementation are intended to lower the barrier to entry for practitioners exploring PINN-based optimal control without prior exposure to adjoint methods or two-point boundary value problems.
翻译:本文针对质量-弹簧-阻尼系统的最优控制问题,提出了一种透明的、可复现的双网络物理信息神经网络(PINN)直接公式化基准研究。经典线性二次型最优控制问题通过两种独立经典方法求解——庞特里亚金极小值原理结合单次打靶法,以及梯形配点直接转录法——并将其重构为受约束优化问题,由两个前馈神经网络求解:一个状态网络(其边界条件通过复合三次与掩膜拟合法精确强制施加)和一个无约束控制网络。复合损失函数将配点处的物理残差与成本泛函的梯形近似相结合,并由单个标量超参数加权。在所考虑的基准上,PINN以四位有效数字复现了经典最优成本,通过构造精确满足终端状态约束,并产生点态状态与控制误差,其范围落在两种经典参考方法的误差散布内。在该基准上,训练速度比经典打靶法慢约两个数量级,我们对此如实报告。本文贡献在于方法论清晰性而非方法论新颖性:该公式化及配套的Google Colab实现旨在降低从业者探索基于PINN的最优控制的入门门槛,无需事先接触伴随方法或两点边值问题。