三阶常微分方程的神经网络模型分析
Comparison of Several Neural Network Methods for a Class of Third Order Ordinary Differential Equations
DOI: 10.12677/AAM.2022.114204, PDF, HTML, XML, 下载: 299  浏览: 523  科研立项经费支持
作者: 伍 阳, 杨云磊*:贵州大学,贵州 贵阳
关键词: ODE神经网络模型正交多项式ODE Neural Network Model Orthogonal Polynomial
摘要: 本文研究神经网络模型对一类三阶常微分方程数值解的影响。首先,分析网络结构在神经网络模型求解常微分方程中的重要性,接着,探究单隐层前馈神经网络的网络隐层激活函数,选择几类正交多项式来消除隐层,构造不同类型的神经网络模型,利用极限习机(ELM)算法求解网络权值,最后利用数值实验模拟展示不同的神经网络模型形成的影响。
Abstract: In this paper, the influence of neural network model on the numerical solution of a class of third-order ordinary differential equations is studied. First, the importance of network structure in solving ordinary differential equations by neural network model is analyzed. Then, the network hidden layer activation function of single hidden layer feed forward neural network is explored. Several orthogonal polynomials are selected to eliminate hiding, and different types of neural network models are constructed. The limit learning machine (ELM) algorithm is used to solve the network weights. Finally, numerical experiments are used to simulate the influence of different neural network models.
文章引用:伍阳, 杨云磊. 三阶常微分方程的神经网络模型分析[J]. 应用数学进展, 2022, 11(4): 1870-1875. https://doi.org/10.12677/AAM.2022.114204

1. 引言

科学和工程中物理现象的数学模型往往可以表示成以下形式的初值问题:

y = f ( x , y , y , y ) y ( a ) = y 0 , y ( a ) = y 1 , y ( a ) = y 2

要得到(1)的解析解往往非常困难或者无法求解,所以有必要研究该问题的数值方法。长期以来,人们提出了许多求解常微分方程的数值方法,Mohammed [1] 提供了一种三阶常微分方程解的三隐式混合线性多步方法,Olabode [2] 提出了一种三阶常微分方程的分块多步法,Agboola [3] 提出了一种微分变换方法解三阶常微分方程,Hashim [4] 利用伯恩斯坦多项式方法的运算矩阵直接求解三阶方程,并应用于流体流动方程。求解三阶常微分方程问题的数值方法有许多的研究结果,有的计算精度较高,但存在着随着样本量的增加,执行时间迅速增加的问题。

用正交多项式消除隐层已经在神经网络的微分方程数值解法中得到了广泛的应用,Lu [5] 提出了用勒让德神经网络算法求解某些风险模型的破产概率,Ma等人 [6] 提出一种改进的求解连续时间一维资产定价模型的价格红利函数的三角神经网络算法,陈英皞 [7] 用拉盖尔神经网络数值求解广义Black-Scholes微分方程。

本文借用神经网络模型对求解三阶常微分方程模型选择问题进行一些探究。

2. 单隐层前馈神经网络

神经网络中最基本的单元是神经元模型,细胞体分为两部分,前一部分计算总输入值,即输入信号的加权和,后一部分计算总输入值与该神经元阈值的插值,然后通过激活函数处理,产生输出从轴突传送给其他神经元。

人工神经网络模仿了生物神经网络。将神经元模型按层连接,就能得到单层前馈神经网络,其中,我们将隐藏层的基函数选择为正交多项式,就能得到如图1所示的网络结构。单隐层前馈神经网络由输入层、隐含层、输出层组成,其中 x i 是我们的输入, b 表偏置, φ i 是我们所选用的正交多项式, y i 是输出。可简单模拟生物神经网络,每层神经元与下一层神经元连接,神经元之间不存在跨层连接、同层连接,输入层用于数据的输入,隐含层与输出层神经元对数据进行加工。

3. 神经网络对一般三阶微分方程求解步骤

对于给定的任意一般三阶常微分方程:

Figure 1. The neural network diagram

图1. 神经网络示意图

{ y + a y + b y + c y + d = f ( x ) y ( e ) = y 0 , y ( k ) = y 1 , y ( k ) = y 2

使用正交多项式作为隐藏层基函数代替近似解,使用ELM算法计算权值,步骤如下:

1) 构造方程的近似解 y ^ ( x ) = i = 0 N β i φ i ( x ) ,并把近似解带入方程组。

i = 0 N β i φ i ( x ) + a i = 0 N β i φ i ( x ) + b i = 0 N β i φ i ( x ) + c i = 0 N β i φ i ( x ) = f ( x ) d

i = 0 N β i φ i ( e ) = y 0 , i = 0 N β i φ i ( k ) = y 1 , i = 0 N β i φ i ( g ) = y 2

2) 剖分定义域 Ω ,选取内部节点 x i ( i = 1 , 2 , N ) ,将节点带入方程:

i = 0 N ( φ i ( x j ) + a φ i ( x j ) + b φ i ( x j ) + c φ i ( x j ) ) β i = f ( x j ) d , j = 0 , 1 , 2 , , M

3) 形成数值矩阵 H β = T

4) 使用ELM算法求解权值矩阵 β = H + F ,其中 H + 为矩阵H的Moore-Penrose广义逆。

4. 数值实验

在解域内均匀选择测试点,并在这些测试点上比较真实解与近似解的插值,才用均方误差(MSE)来观察基函数的选择对误差的影响。MSE的定义如下:

MSE = 1 S i = 1 S [ y ( x i ) y ( x ^ i ) ] 2

例1考虑方程:

{ y = e x y ( 0 ) = 3 , y ( 0 ) = 1 , y ( 0 ) = 5 ,

方程的精确解为: y exact ( x ) = 2 + 2 x + e x

我们选取神经元个数N = 10,当选择测试点作为区间[0, 1]中的点时,精确解、Legendre神经网络、Chebyshev神经网络和Hermite神经网络结果的比较记录在表1中 。

Table 1. Numerical results using different neural network models

表1. 采用不同神经网络模型的数值结果

表1可以看出,Legendre神经网络算法得到的误差精度为o(10-8),MSE约为 5.029218803638438e−19。Chebyshev神经网络算法得到的误差精度为o(10-8),MSE约为 5.042613965704128e−19。Hermite神经网络算法得到的误差精度为o(10-8),MSE约为 4.928755732194928e−19。由图2可以看出,三种神经网络模型的性能是相似的,误差曲线图基本上重合。

Figure 2. Error curves of comparative example 1 with different neural network models

图2. 不同神经网络模型对例1误差曲线图

例2考虑方程:

{ y = y y ( 0 ) = 1 , y ( 0 ) = 1 , y ( 0 ) = 1 ,

方程的精确解为: y exact ( x ) = e x

我们选取神经元个数N = 10,当选择测试点作为区间[0, 1]中的点时,精确解、Legendre神经网络、Chebyshev神经网络和Hermite神经网络结果的比较记录在表2中。

Table 2. Numerical results using different neural network models

表2. 例2采用不同神经网络模型的数值结果

表2可以看出,Legendre神经网络算法得到的误差精度为o(10-10),MSE约为 5.029218803638438e−19。Chebyshev神经网络算法得到的误差精度为o(10-10),MSE约为 5.042613965704128e−19。Hermite神经网络算法得到的误差精度为o(10-10),MSE约为 4.928755732194928e−19。由图3可以看出,三种神经网络模型的性能是相似的,误差曲线图基本上重合。

Figure 3. Error curves of comparative example 2 with different neural network models

图3. 不同神经网络模型对例2误差曲线图

5. 结论

本文通过建立不同神经网络模型,对求解一类三阶常微分方程数值解的误差进行探究,通过神经网络方法获取的近似解与数值解之间的误差,探究出选择Legendre多项式、Chebyshev多项式、Hermite多项式作为神经网络的基函数对数值解的误差量级影响较小,为以后用神经网络解三阶常微分方程基函数的选择上,提供了一些参考。

项目基金

贵州省科技计划项目(No. QKHJC-ZK[2021]YB017);贵州大学引进人才项目(No. GzuRJHZ[2019]047);黔科合平台人才[2020]5016。

NOTES

*通讯作者。

参考文献

[1] Mohammed, U. and Adeniyi, R.B. (2014) A Three Step Implicit Hybrid Linear Multistep Method for the Solution of Third Order Ordinary Differential Equations. General Mathematics Notes, 25, 62-74.
[2] Olabode, B.T. (2013) Block Multistep Method for the Direct Solution of Third Order of Ordinary Differential Equations. FUTA Journal of Research in Sciences, 2, 194-200.
[3] Agboola, O. and Opanuga, A.A. (2015) Solution of Third Order Ordinary Differential Equations Using Differential Transform Method. Global Journal of Pure and Applied Mathematics, 11, 2511-2516.
[4] Hashim, I. and Alshbool, M. (2019) Solving Directly Third-Order ODEs Using Operational Matrices of Bernstein Polynomials Method with Applications to Fluid Flow Equations. Journal of King Saud University-Science, 31, 822-826.
https://doi.org/10.1016/j.jksus.2018.05.002
[5] Lu, Y., Chen, G., Yin, Q., et al. (2020) Solving the Ruin Probabilities of Some Risk Models with Legendre Neural Network Algorithm. Digital Signal Processing, 99, Article ID: 102634.
https://doi.org/10.1016/j.dsp.2019.102634
[6] Ma, M., Zheng, L. and Yang, J. (2021) A Novel Improved Trigonometric Neural Network Algorithm for Solving Price-Dividend Functions of Continuous Time One-Dimensional Asset-Pricing Models. Neurocomputing, 435, 151-161.
https://doi.org/10.1016/j.neucom.2021.01.012
[7] Chen, Y., et al. (2021) Numerical Solving of the Generalized Black-Scholes Differential Equation Using Laguerre Neural Network. Digital Signal Processing, 112, Article ID: 103003.
https://doi.org/10.1016/j.dsp.2021.103003