## 4 Numerical Study: A 10-Story Shear Building
### Training and Validating of MLP Model  
In this study, Keras, a high-level neural networks application programming interface written in Python, was used as the framework for programming. TensorFlow was adopted as the backend engine for Keras which is compatible with most of the processors available in the marketplace. As a result, Keras was executing on top of TensorFlow providing a quick and efficient approach for neural-network training. For the software version used in this study, the Python version was 3.7.4; Tensorflow version was 1.14; Keras version was 2.3.1; and the CUDA version for GPU accelerated applications was 10.0. Furthermore, Intel Core i7-9700 with Windows 10 operating system and NVIDIA RTX-2080 Super graphics card were used for the hardware devices. The MLP model is a fully connected feedforward model. In this study, the MLP with a linear activation function was adopted as the 10-story shear building was linear. The state feedback gain matrix \(\mathbf{K_{g}}\) shown in Equation (13) was used in the time history analysis of the 10-story shear building with an AMD at the roof subjected to a BLWN ground acceleration. The corresponding absolute acceleration of each floor was taken as the input of the MLP model and the generated control force was the desired output to be predicted by the MLP model. In the training process, the MLP model with one input layer, three hidden layers, and one output layer was structured. Each hidden layer contained 300 neurons. The output layer had merely one neuron representing the control force at the current predicting step. Since the control force at the current step was related to previous various steps  
Figure 7: Convergence curve of objective function using SOS (symbiotic organisms search). of structural response, the number of neurons in the input layer was investigated first in the study. Note that the acceleration and control force from the time history analysis were normalized to a peak value of \(\pm 1.0\) before the training process of MLP was conducted. The objective of training the MLP aims to optimize the weights of the model; therefore, a loss function was required for training. In this study, the mean square error (MSE) between the predicted and desired control force was adopted as the loss function. The adaptive moment estimation (Adam) optimizer [19] which computed adaptive learning rates for each parameter was used to train the model in addition to the characteristics of adaptive gradient descent. Since the calculation of Adam included offset correction, the weight updating of the MLP model was sustained within a specific range. As a result, the update of parameters was relatively smooth and the calculation efficiency was exceptional. As mentioned previously, the number of acceleration steps for training was investigated as a parametric study in order to confirm the appropriate number of neurons in the input layer. The number of epochs in the parametric study was selected 5000. The learning effectiveness of the MLP model was evaluated by calculating the root-mean-square error (RMSE) between the desired and predicted control force which can be expressed as:  
\[\text{RMSE}(\%)=\sqrt{\frac{\sum\limits_{k=1}^{N}{{{u[k]}-{u_{p}[k]}^{2}}}}{ \sum\limits_{k=1}^{N}{{u[k]}^{2}}}}\times 100\% \tag{14}\]  
where \(u[k]\) and \(u_{p}[k]\) are the desired and the predicted control force at the \(k\)th step, respectively. It is realized that better learning leads to smaller RMSE. After training, the MLP model was then implemented in the control simulation model as shown in Figure 8 using MATLAB/Simulink. The input of the MLP was the acceleration response of each floor with the current and previous steps, and the output was the calculated control force imposed on the 10-story shear building. Note that the training data of acceleration and control force for MLP were normalized to a peak value of \(\pm 1.0\); therefore, the acceleration responses of the building were scaled by a gain before they were input to the MLP model.