# NARX 模型

NARX 模型（带外源输入的非线性自回归模型，Nonlinear AutoRegressive with eXogenous inputs）利用一个根据数据拟合出的非线性函数，从时间序列自身固定数量的过去值和外部输入信号固定数量的过去值来预测该序列的当前值。它是黑箱系统辨识中线性 [ARX 模型](https://www.edgepedia.org/zh/arx-model)的非线性对应物，横跨经典控制工程与机器学习两个领域：同一个方程既可描述多项式辨识模型，也可描述循环神经网络和高斯过程回归。<sup>[1](https://eurasip.org/Proceedings/Eusipco/Eusipco2021/pdfs/0001055.pdf)</sup> 由于输出依赖于自身过去的值（即自回归性质），该模型是天然的时间序列预测器；而通用性较低的 NARX 形式比其母模型 NARMAX 更为广泛使用，后者额外对噪声动态建模。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup>

| 关键事实 | 详情 |
|---|---|
| 预测对象 | 当前输出 \( y(t) \)，对 \( n_{y} \) 个过去输出和 \( n_{u} \) 个过去外源输入做回归<sup>[3](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)</sup> |
| 模型方程 | \( y(t) = f(y(t-1),\ldots,y(t-n_{y}),u(t-1),\ldots,u(t-n_{u})) + e(t) \)<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> |
| 与 NARMAX 的关系 | NARMAX 增加了延迟预测误差项；NARX 只保留当前误差，因此训练更简单<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> |
| 长期记忆 | NARX 网络保留信息的时间可达传统循环网络的两到三倍<sup>[4](https://proceedings.neurips.cc/paper_files/paper/1995/file/f197002b9a0853eca5e046d9ca4663d5-Paper.pdf)</sup> |
| 已报告的拟合度 | 一个磁悬浮系统的 Sigmoid 网络非线性 ARX 模型对估计数据（预测焦点）达到 99.94% 的拟合度，均方误差 \( 7.935 \times 10^{-7} \)<sup>[3](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)</sup> |
| 软件 | MATLAB idnlarx，Python 包 NonSysId 和 SysIdentPy<sup>[3](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)</sup>, <sup>[5](https://doi.org/10.21105/joss.08028)</sup>, <sup>[6](https://sysidentpy.org/user-guide/how-to/create-a-narx-neural-network/)</sup> |

## 工作原理

该模型是一个施加于延迟信号回归向量的静态非线性映射。在估计形式下，<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup>

\[ y(t) = f\big(y(t-1),\ldots,y(t-n_{y}),\,u(t-1),\ldots,u(t-n_{u})\big) + e(t) \]

其中 \( n_{y} \) 和 \( n_{u} \) 分别为输出和输入的模型阶数，\( e(t) \) 为残差。等价地，预测输出为 \( \hat{y}(t \mid \theta) = f(\varphi(t), \theta) \)，即回归向量 \( \varphi(t) \) 的非线性函数，该向量由有限集合的过去输入和输出构成，参数为 \( \theta \)。<sup>[7](http://www2022.mit.bme.hu:8080/system/files/oktatas/targyak/9132/Deep_Learning_and_System_Identification.pdf)</sup> 实际模型结构将线性、多项式和自定义回归量，与包含非线性分量、线性分量和静态偏移的输出函数组合在一起。<sup>[8](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)</sup>

两个区别界定了该模型类别。相对于 ARX，NARX 用非线性映射取代了线性映射。相对于 NARMAX，它省略了延迟预测误差：NARMAX 也对过去残差做回归，而这些延迟误差需要动态反向传播才能获得精确梯度，使得 NARMAX 训练更难。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> 用于一步超前预测的 NARX 模型反馈的是实测输出；在自由运行仿真中，模型反馈的是自身预测值，这是更难的工作模式。<sup>[3](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)</sup>

## 实现方法

标准工作流程为：准备估计数据、配置模型结构和估计算法、估计、验证。<sup>[8](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)</sup> [结构](https://www.edgepedia.org/zh/structure)选择意味着选择阶数 \( n_{y} \) 和 \( n_{u} \)、滞后布局，以及哪些回归量进入非线性分量；限制馈入非线性部分的回归量可降低复杂度并保持估计良态。<sup>[8](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)</sup> 对于多项式模型，NonSysId 包实现了基于迭代 OFR 变体的项选择、基于仿真的有界输入有界输出稳定性检验、基于均方仿真误差的 BIC 选择，以及基于 PRESS 统计量的项选择。<sup>[5](https://doi.org/10.21105/joss.08028)</sup> 结构化方差分析（ANOVA）方法（英格拉·林德（Ingela Lind）与[伦纳特·荣](https://www.edgepedia.org/zh/lennart-ljung-electrical-engineer)（Lennart Ljung）的 TILIA 方法，《Automatica》，2007 年）更一般地处理回归量和结构选择问题。<sup>[9](https://doi.org/10.1016/j.automatica.2007.06.010)</sup> 对于神经 NARX 模型，林宗男（Tsung-Nan Lin）、贾尔斯（C.L. Giles）、霍恩（B.G. Horne）和孔孙元（Sun-Yuan Kung）的延迟损伤模型选择算法（《IEEE 信号处理汇刊》，1997 年）用于选择记忆阶数。<sup>[10](https://doi.org/10.1109/78.650098)</sup>

估计默认最小化一步预测误差；将焦点设为仿真则改为最小化仿真误差，这要求非线性函数可微且耗时更多，因此树模型和神经网络估计器不能用于该模式。<sup>[8](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)</sup> 迭代搜索方法包括高斯-牛顿法、Levenberg-Marquardt 法和信赖域反射牛顿法，正则化则对估计参数的方差施加惩罚。<sup>[8](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)</sup> SysIdentPy 以串并联（开环）配置训练 NARXNN 对象，并将其转换为并联（闭环）形式用于预测，最大滞后、损失函数、优化器和训练轮次均由用户选择。<sup>[6](https://sysidentpy.org/user-guide/how-to/create-a-narx-neural-network/)</sup>

## 起源

已发表的文献通过其母表示形式和神经网络实例来记录该模型；没有已发表的论文将“NARX”这一裸术语的独立引入归功于某人。陈（S. Chen）和比林斯（S. A. Billings）于 1989 年在《国际控制杂志》上提出了 NARMAX 表示，NARX 是其无噪声特例，并证明它包含若干现有非线性模型作为特例。<sup>[11](https://doi.org/10.1080/00207178908559683)</sup> 纳伦德拉（K.S. Narendra）和帕塔萨拉蒂（K. Parthasarathy）于 1990 年在《IEEE 神经网络汇刊》上在串并联辨识架构中使用了具有多层神经网络非线性项的 NARX 模型。<sup>[12](https://doi.org/10.1109/72.80202)</sup> 同年，陈（S. Chen）、比林斯（S. A. Billings）和格兰特（P. M. Grant） 在《国际控制杂志》上发表了关于使用神经网络进行[非线性系统辨识](https://www.edgepedia.org/zh/nonlinear-system-identification)的论文。<sup>[13](https://doi.org/10.1080/00207179008934126)</sup> 后来的相关工作包括 威廉斯（Willems）、拉皮萨尔达（Rapisarda）、马尔科夫斯基（Markovsky）和德摩尔（De Moor）关于持续激励的基本引理（《系统与控制快报》，2004 年），该引理是近期数据驱动 NARX 仿真的基础，<sup>[14](https://doi.org/10.1016/j.sysconle.2004.09.003)</sup> 以及 沃登（K. Worden）及其同事提出的高斯过程 NARX 模型（《机械系统与信号处理》，2017 年）。<sup>[15](https://doi.org/10.1016/j.ymssp.2017.09.032)</sup>

## 变体

非线性映射 \( f \) 可以是任何函数逼近器。最早的实现使用多项式非线性，至今仍然流行；径向基函数、模糊系统和小波也已被使用。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> 多项式 NARX 模型对参数是线性的，据报道等价于循环神经网络；NARMAX 实现涵盖多项式、有理、神经网络（多层感知机和径向基）以及小波形式，并包含 Volterra、Hammerstein 和 Wiener 模型作为特例<sup>[5](https://doi.org/10.21105/joss.08028)</sup>, <sup>[16](https://www.eolss.net/sample-chapters/c18/E6-43-10-03.pdf)</sup>

当 \( f \) 为多层感知机时，该模型即为 NARX 网络，一种反馈仅来自输出神经元而非隐藏状态的循环网络。<sup>[17](https://doi.org/10.1109/3477.558801)</sup> 西格尔曼（Siegelmann）、霍恩（Horne）和贾尔斯（Giles）构造性地证明了具有有限数量参数的 NARX 网络在计算能力上等同于全连接循环网络，因而等同于图灵机。<sup>[17](https://doi.org/10.1109/3477.558801)</sup> 现代工具提供了更多选择：MATLAB idnlarx 提供 idWaveletNetwork、idTreeEnsemble 和 idTreePartition、idGaussianProcess 以及 idSigmoidNetwork，外加自定义、多项式和周期回归量；而旧版 narxnet 命令不允许你选择每个隐藏层使用的激活函数，其输出层默认使用线性函数。<sup>[3](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)</sup> 李思远（Siyuan Li）及其同事提出的基于稀疏贝叶斯学习的 NARX 模型迁移辨识（《非线性动力学》，2026 年）使用 Kullback-Leibler 散度作为迁移模型与理想模型之间的相似性度量。<sup>[18](https://doi.org/10.1007/s11071-026-12269-2)</sup>

## 应用

多步预测是将 NARX 与控制联系起来的应用：提前数步的预测对模型预测控制至关重要，因为误差会累积，模型不稳定性会变得关键。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> 在过程工程中，一个实现为训练好的多层感知机的 NARX 神经模型比最小二乘 ARX 模型更好地预测了反应器-换热器过程的演化，辨识数据与实验数据之间具有令人满意的一致性。<sup>[19](https://onlinelibrary.wiley.com/doi/10.1002/apj.118)</sup> NARMAX 文献报告了在混沌电子电路、水资源管理和涡轮增压柴油发动机中的应用。<sup>[16](https://www.eolss.net/sample-chapters/c18/E6-43-10-03.pdf)</sup>

## 局限与替代方案

主要失效模式源于训练目标：由于 NARX 估计最小化一步超前预测误差，当与神经网络等通用函数逼近器结合时，它容易因过拟合而在仿真中表现不佳。<sup>[20](https://arxiv.org/pdf/2204.05892)</sup> 标准对策是早停、网络约简和权重衰减（\( L_{2} \) 正则化）。<sup>[20](https://arxiv.org/pdf/2204.05892)</sup> 在多步预测中，误差会累积，不稳定性会变得关键。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> 混合构造有其自身风险：串行 NARX-LSTM 集成可能导致累积误差传播，而并行结构可能引入参数冗余，增加模型复杂度、计算负担和过拟合风险。<sup>[21](https://www.sciencedirect.com/science/article/abs/pii/S0925231225029881)</sup>

与替代方案相比：在全规模工厂数据上，NARX 神经网络在预测方面优于 ARMAX 和 ARX 模型。<sup>[22](https://www.scientific.net/AMM.554.360)</sup> 前馈和级联前馈网络可作为 NARX 模型中的静态非线性函数，NARX 结构来自对滞后输出和输入值的回归，而 LSTM 网络是非线性状态空间模型；在标准基准上，LSTM 的表现不如级联前馈网络。<sup>[7](http://www2022.mit.bme.hu:8080/system/files/oktatas/targyak/9132/Deep_Learning_and_System_Identification.pdf)</sup><sup> • </sup><sup>[23](https://uk.mathworks.com/help/ident/ref/idfeedforwardnetwork.html)</sup> 循环网络通过将隐藏单元作为未观测状态反馈来扩展 NARX，这可以携带更遥远过去的信息，但存在反馈回路导致不稳定的风险。<sup>[7](http://www2022.mit.bme.hu:8080/system/files/oktatas/targyak/9132/Deep_Learning_and_System_Identification.pdf)</sup> 使用近期算法训练以最小化多步预测误差的 NARMAX 模型，相比 NARX 模型提供了改进的多步预测，尤其是在较短时间范围上。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)</sup> 与 Volterra 级数模型的定量比较以及详细训练数据需求，在已发表的比较中尚未有定论。

## References

1. [Data-Driven Simulation for NARX Systems (EUSIPCO 2021)](https://eurasip.org/Proceedings/Eusipco/Eusipco2021/pdfs/0001055.pdf)
2. [Comparison of neural network NARX and NARMAX models for multi-step prediction using simulated and experimental data](https://www.sciencedirect.com/science/article/abs/pii/S0957417423019395)
3. [Using idnlarx as a Modern Alternative to narxnet - MATLAB & Simulink](https://www.mathworks.com/help/ident/ug/using-idnlarx-as-a-modern-alternative-to-narxnet.html)
4. [Learning long-term dependencies is not as difficult with NARX networks (NeurIPS 1995)](https://proceedings.neurips.cc/paper_files/paper/1995/file/f197002b9a0853eca5e046d9ca4663d5-Paper.pdf)
5. [Rajintha Gunawardena, Zi-Qiang Lang, Fei He (2025). NonSysId: Nonlinear System Identification with Improved Model Term Selection for NARMAX Models. The Journal of Open Source Software.](https://doi.org/10.21105/joss.08028)
6. [Create a Neural NARX Network - SysIdentPy](https://sysidentpy.org/user-guide/how-to/create-a-narx-neural-network/)
7. [Deep Learning and System Identification (Ljung, Schön et al.)](http://www2022.mit.bme.hu:8080/system/files/oktatas/targyak/9132/Deep_Learning_and_System_Identification.pdf)
8. [Identifying Nonlinear ARX Models - MATLAB & Simulink](https://www.mathworks.com/help/ident/ug/identifying-nonlinear-arx-models.html)
9. [Ingela Lind, Lennart Ljung (2007). Regressor and structure selection in NARX models using a structured ANOVA approach. Automatica.](https://doi.org/10.1016/j.automatica.2007.06.010)
10. [Tsung-Nan Lin and colleagues (1997). A delay damage model selection algorithm for NARX neural networks. IEEE Transactions on Signal Processing.](https://doi.org/10.1109/78.650098)
11. [S. Chen, S. A. Billings (1989). Representations of non-linear systems: the NARMAX model. International Journal of Control.](https://doi.org/10.1080/00207178908559683)
12. [K.S. Narendra, K. Parthasarathy (1990). Identification and control of dynamical systems using neural networks. IEEE Transactions on Neural Networks.](https://doi.org/10.1109/72.80202)
13. [S. CHEN, S. A. BILLINGS, P. M. GRANT (1990). Non-linear system identification using neural networks. International Journal of Control.](https://doi.org/10.1080/00207179008934126)
14. [Jan C. Willems and colleagues (2004). A note on persistency of excitation. Systems & Control Letters.](https://doi.org/10.1016/j.sysconle.2004.09.003)
15. [K. Worden and colleagues (2017). On the confidence bounds of Gaussian process NARX models and their higher-order frequency response functions. Mechanical Systems and Signal Processing.](https://doi.org/10.1016/j.ymssp.2017.09.032)
16. [Identification of NARMAX and Related Models (EOLSS chapter)](https://www.eolss.net/sample-chapters/c18/E6-43-10-03.pdf)
17. [Computational capabilities of recurrent NARX neural networks (Siegelmann, Horne & Giles, IEEE Trans. Systems Man and Cybernetics Part B, 1997)](https://doi.org/10.1109/3477.558801)
18. [Siyuan Li and colleagues (2026). Transfer identification for NARX models based on sparse Bayesian learning. Nonlinear Dynamics.](https://doi.org/10.1007/s11071-026-12269-2)
19. [Using ARX and NARX approaches for modeling and prediction of the process behavior: application to a reactor-exchanger (2008)](https://onlinelibrary.wiley.com/doi/10.1002/apj.118)
20. [NARX Identification using Derivative-Based Regularized Neural Networks (arXiv 2204.05892)](https://arxiv.org/pdf/2204.05892)
21. [Physics-informed exogenous-input embedded LSTM method for nonlinear system identification incorporating unobserved key variable (Neurocomputing)](https://www.sciencedirect.com/science/article/abs/pii/S0925231225029881)
22. [Comparison of NARX Neural Network and Classical Modelling Approaches (Applied Mechanics and Materials)](https://www.scientific.net/AMM.554.360)
23. [uk.mathworks.com](https://uk.mathworks.com/help/ident/ref/idfeedforwardnetwork.html)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Machine learning methods › Supervised, unsupervised, and semi-supervised learning › Regression methods

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/narx-model

English original: https://www.edgepedia.org/narx-model
