*3.1. Simulation Settings*

This section introduces the simulation methods separately from the simulation of data and the design of the artificial neural network. The paper mainly uses MATLAB 2017a to establish an analytical model, and the relevant calculations are also completed in the software.

In the real world, most systems can be modeled by ARMA (5, 5), so in this paper, we set the maximum value of AR and MA order to 5 (AR (1–5) and MA (0–5), the numbers represent the range of values for the corresponding order) [34]. All the simulated datasets in this paper are generated by Monte Carlo simulation. We constructed a time series (*Xt*) based on the random simulated noise series ( *Zt*) and the coefficients of the ARMA model. The expectation of the noise sequence is 0 and the variance is 1. The coefficients of the model were generated by a random method and met the conditions of causality and invertibility. The initial value of the time series was determined by the noise series.

For the neural network, we used Equation (8) to calculate the number of neurons in the hidden layer, and its value was a dynamic integer. The maximum number of epochs to train was 100, the performance goal was set to <sup>10</sup>−7, and the training was terminated when the MSE did not drop for 10 consecutive iterations. The neural network parameters were updated using Adam optimizer, and its learning rate was set to 0.01, which was chosen empirically [35]. Although the ARMA model is a linear time-invariant system, the linear unit (ReLU) activation function of hidden neurons cannot handle occasional discrete data well. Thus, we used a nonlinear activation function (Sigmoid) as the activation function [36–38].

$$M = \text{integer}(\text{sqrt}(m+1) + 15) \tag{8}$$

Based on the above conditions, we built 30 neural networks (combination of AR (1–5) and MA (0–5)) to analyze time series. For different neural networks, we converted the time series into corresponding datasets, 80% of the processed data was used as the training set and the rest as the validation set. We used the MSE of the validation set as the basis for judging the order. Figures 2 and 3 show a system identification block diagram.

**Figure 3.** ARMA model-building method.
