在PyTorch中使用自动微分和神经网络代理求解偏微分方程的最优控制
Optimal control of partial differential equations in PyTorch using automatic differentiation and neural network surrogates
AI总结:
本文提出利用PyTorch自动微分和可微PDE求解器求解最优控制问题,结合KLU和torch-fenics等工具处理线性和非线性PDE,并验证了多种控制问题的有效性。
摘要:
本文的核心信息是,只要拥有可微的偏微分方程(PDE)求解器,求解最优控制问题在计算上就可以变得非常简单。尽管这看似是一个严格的限制,且开发可微PDE求解器似乎很困难,但对许多问题而言并非如此。特别是对于线性偏微分方程,它们等价于一个线性方程组。因此,只需能够在像PyTorch这样支持自动微分的库中求解线性方程组,并能够对该线性求解器进行求导即可。使用像torch_sparse_solve这样的开源库,我们手头就有了易于使用的可微直接求解器(此处为KLU),这使得求解线性PDE变得简单直接。对于非线性PDE,上述方法可能不够,因为我们没有与底层PDE等价的线性方程组。在这种情况下,我们可以使用库torch-fenics,它使我们能够使用有限元库FEniCS定义PDE,然后在PyTorch中对该问题进行求导。我们通过各种受约束的最优控制问题对所提出的方法进行了补充,这些约束包括稳态和非稳态PDE、线性和非线性PDE(从Poisson到流固耦合)、时空和时间步进格式、参数估计、右端项控制、初始条件控制和边界条件控制、有限差分和有限元离散化以及神经网络代理。本研究的所有开发成果都附带了发布在GitHub上的相应源代码。
英文摘要:
The take-home message of this paper is that solving optimal control problems can be computationally straightforward, provided that differentiable partial differential equation (PDE) solvers are available. Although this might seem to be a strong limitation and the development of differentiable PDE solvers might seem arduous, for many problems this is not the case. In particular, for linear partial differential equations, they are equivalent to a linear equation system. Therefore it is just sufficient to be able to solve linear equation systems in an automatic differentiation-capable library like PyTorch and be able to differentiate through the linear solver. Using open-source libraries, like torch_sparse_solve, we have easy to use differentiable direct solvers (here: KLU) at hand, which makes solving linear PDEs straightforward. For nonlinear PDEs, the approach above might be not sufficient, since we do not have an equivalent linear equation system for the underlying PDE. In this case, we can then use the library torch-fenics, which enables us to define PDEs using the finite element library FEniCS and then differentiate through this problem in PyTorch. We complement the proposed methodology with various optimal control problems constrained by stationary and instationary PDEs, linear and nonlinear PDEs (from Poisson to fluid-structure interaction), space-time and time-stepping formulations, parameter estimation, right-hand side control, initial condition control and boundary condition control, finite difference and finite element discretizations and neural network surrogates. All developments of this work are accompanied with the respective source codes published on GitHub.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。