## 4 Numerical Study: A 10-Story Shear Building
### Training and Validating of ARX Model  
Generally, training an ARX model can be categorized into series-parallel and parallel architectures as shown in Figure 9 which can be expressed as the two equations, respectively:  
\[u_{p}[k]=f\left(\begin{array}{ccccc}\tilde{\mathbf{x}}[k]+\tilde{\mathbf{x}}_{ g}[k],&\tilde{\mathbf{x}}[k-1]+\tilde{\mathbf{x}}_{g}[k-1],&\cdots&,\tilde{ \mathbf{x}}[k-n_{a}]+\tilde{\mathbf{x}}_{g}[k-n_{a}],\\ u[k-1],&u[k-2]&\cdots&,u[k-n_{f}]\end{array}\right) \tag{15}\]  
\[u_{p}[k]=f\left(\begin{array}{ccccc}\tilde{\mathbf{x}}[k]+\tilde{\mathbf{x}}_{ g}[k],&\tilde{\mathbf{x}}[k-1]+\tilde{\mathbf{x}}_{g}[k-1],&\cdots&,\tilde{ \mathbf{x}}[k-n_{a}]+\tilde{\mathbf{x}}_{g}[k-n_{a}],\\ u_{p}[k-1],&u_{p}[k-2]&\cdots&,u_{p}[k-n_{f}]\end{array}\right) \tag{16}\]  
where \(u[k]\) and \(u_{p}[k]\) are the desired and the predicted control force at the k-th step, respectively; and \(n_{a}\) and \(n_{f}\) are the number of acceleration and control force delay steps for training in ARX model. In the series-parallel architecture, the predicted control force \(u_{p}[k]\) is calculated from the current and previous steps of the absolute acceleration at each floor as well as the previous steps of the desired control force. In the parallel architecture, the predicted control force \(u_{p}[k]\) is performed from the present and past values of the absolute acceleration at each floor as well as the past predicted control force. In this study, the series-parallel architecture was adopted for training while the parallel architecture was implemented in the control simulation model of MATLAB/Simulink. In the training process, the ARX model with one input layer, two hidden layers, and one output layer was structured. The first and second hidden layer contained 100 and 50 neurons, respectively. In the output layer, there was simply one neuron representing the control force at the current step. The number of acceleration and control force delay steps in the training process were selected one, i.e., \(n_{a}=n_{f}=1\). Accordingly, the dimension of the ARX neural network model was \(21\times 100\times 50\times 1\). Similar to the MLP training, the training data of acceleration and control force were normalized to a peak value of \(\pm 1.0\), and the MSE between the predicted and desired control force was used as the loss function and Adam was applied as the optimizer. The number of epochs was 5000. The RMSE between the desired and predicted control force was 0.25%.  
After training, the ARX model was also implemented in the control simulation model using MATLAB/Simulink as illustrated in Figure 10. The simulation configuration for the ARX model was identical to that for the MLP model. The corresponding RMSE between the desired and predicted control force in the control simulation model was 4.90%. Note that the RMSE of the ARX training result was approximate to those of the MLP training results. However, the RMSE in the control simulation model of the ARX model was larger than those of the MLP model with 120, 150, and 200 acceleration steps. This is because the series-parallel architecture was used in the training process and it was replaced by the parallel architecture in the control simulation. It is worth noting that the elapsed time for training the ARX model was merely 90 s. However, it took more than 1.5 h for training the MPL model with 120 acceleration steps. This is attributable to that the dimension of the ARX model (\(21\times 100\times 50\times 1\)) was significantly smaller than those of the MPL models (\(1210\times 300\times 300\times 300\times 1\) for the case with 120 acceleration steps).  
Figure 8: Control simulation model of the MLP (multilayer perceptron).