## 4 Numerical Study: A 10-Story Shear Building  
### Modal LQR with Optimized Weighting Matrices  
A 10-story shear building used by [PERSON] et al. [18] was adopted as a benchmark structural model for training and validation of the machine-learning based control, which was aimed to replace the modal LQR in the control loop. The mass and the stiffness of each story of the shear building were 10 kN-s\({}^{2}\)/m and 2000 kN/m, respectively. The undamped natural frequencies of the first five modes of the structure are shown in Table 1. An active mass damper was assumed to be installed on the top floor of the structural model with a force capacity of \(\pm\)50 kN, which was roughly equal to 5% structural weight. The damping ratio of the structural model was assumed 2% for all vibration modes. Figure 6 depicts the schematic of the 10-story shear building with an AMD at the top. For modal LQR control approach, the number of control modes need to be determined first. In this study, the effective modal mass was adopted to determine the number of control modes because it provided a straightforward approach for assessing the importance of each vibration mode. It is known that the effective modal mass can be interpreted as part of the total mass of a structure responding to an earthquake in each mode which is associated with natural frequencies and mode shapes. Merely the modes which have significant effective modal masses are critical to represent the structural response in a certain frequency range. The selection strategy was that the accumulated effective modal mass of the selected control modes must be larger than 95% of the total mass of the structure. Since the effective modal mass of the 1 st, 2 nd, and 3 rd mode was 84.79 kN-s\({}^{2}\)/m, 9.14 kN-s\({}^{2}\)/m, and 3.09 kN-s\({}^{2}\)/m, respectively, the accumulated effective modal mass of the first three modes were 97.02 kN-s\({}^{2}\)/m which was larger than 95% of the structural weight (95 kN-s\({}^{2}\)/m). As a result, the first three modes were adopted as the control modes in the numerical study. MATLAB/Simulink, provided by The Mathworks Inc., Natick, MA, USA was adopted to conduct the numerical simulation of the 10-story building with AMD optimized by SOS with respect to the objective function:  
\[\sqrt{\max\left[y_{mi}(t)^{2}\right]+\max\left[y_{m2}(t)^{2}\right]+\cdots+ \max\left[y_{mm_{m}}(t)^{2}\right]} \tag{12}\]  
where \(y_{mi}\) represents the modal acceleration of the \(i\)-th mode; and \(n_{m}\) is the number of control modes. Actually, the objective function is the SRSS of maximum acceleration of the selected modes. For the optimization of weighting matrices, the weighting \(R\) was remained a fixed value of 100 while 10\({}^{10}\) and 0 were selected as the upper and lower bounds value of each element in the weighting \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**1 st Mode** & **2 nd Mode** & **3 rd Mode** & **4 th Mode** & **5 th Mode** \\ \hline
0.336 & 1.002 & 1.644 & 2.250 & 2.807 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Natural frequencies of the benchmark structural model (Hz). Figure 6: Illustration of the 10-story shear building with an active mass damper (AMD). maria \(\mathbf{Q}\). A band-limited white noise (BLWN) with a peak ground acceleration (PGA) of 2.4 m/s\({}^{2}\), a bandwidth from 0 Hz to 15 Hz, and a duration of 140 s was used to excite the 10-story shear building. The root-mean-square (RMS) of the BLWN was 0.5526 m/s\({}^{2}\). The bandwidth was considered sufficient to cover the frequency component of most historical earthquake. It is worth noting that saturation with 10% of the actuator capacity of AMD was used in the optimization because the generated force of the LQR could reach the force capacity of the AMD actuator without the 10% saturation. A number of 100 organisms and 35 iterations were adopted for SOS optimization. Figure 7 depicts the convergence curve with respect to the objective function. It shows that the optimal value was reached at the 11 th iteration.