## 4 Application of Control Parameter Optimization on Five-Story Benchmark Structure
For the PSO algorithm, this matrix was rearranged into a 275-element particle and when represented in vector format, it is termed \(\hat{W}\). In order to optimize the weighting vector for the purposes of control using PSO, a viable fitness function is needed. Several cost functions that were proposed in [35] were used as a measure for quantifying the effectiveness of control for a given weighting vector. These metrics are chosen as they offer a dimensionless quantification, which makes them easily adaptable to a fitness function for the PSO algorithm and they have been used in numerous other studies, for example, in [8; 25], and [36]. Two of these cost functions focus on minimizing the inter-story drift of the structure, which reduces the likelihood of damage to the building system. One of these cost functions quantifies the reduction of the absolute maximum drift, expressed as  
\[J_{1}=\frac{\max(|d(t)_{controlled}|)}{\max(|d(t)_{uncontrolled}|)}, \tag{10}\]  
and the other cost function quantifies the overall time history reduction of the inter-story drift, expressed as  
\[J_{2}=\frac{d(t)_{controlled}}{d(t)_{uncontrolled}}. \tag{11}\]  
In these equations, \(d(t)_{uncontrolled}\) is the time history of the inter-story drift for all floors without any implementation of control, while \(d(t)_{uncontrolled}\) represents the response of the structure when subject to a control scenario. Furthermore, \(|\cdot|\) is the absolute value function  
Figure 4: Visual representation of the connections between sensors and controllers; each line between the sensor and controller represents weighted information exchange. and \(\|\cdot\|\) denotes the \(l_{2}\)-norm function. The other two cost functions focus on minimizing the acceleration of the structure, which is related to the occupational comfort during the event. Similar to the displacement cost functions, the acceleration cost functions quantify the reduction of the absolute maximum acceleration, \(\ddot{y}(t)\), expressed as  
\[J_{3}=\frac{\max\bigl{(}\bigl{|}\ddot{y}(t)_{controlled}\bigr{|}\bigr{)}}{\max \bigl{(}\bigl{|}\ddot{y}(t)_{uncontrolled}\bigr{|}\bigr{)}}, \tag{12}\]  
and the time history response, expressed as  
\[J_{4}=\frac{\ddot{y}(t)_{controlled}}{\dot{y}(t)_{uncontrolled}}. \tag{13}\]  
The demanded control force is also quantified through a cost function provided in [35], which is defined as  
\[J_{5}=\frac{\max(|f(t)|)}{W_{\rm s}}, \tag{14}\]  
where \(f(t)\) is the time history of the control force for each floor and \(W_{\rm s}\) is the seismic weight of the building based on the above ground mass of the structure. Each cost function is a \(m\)-dimensional vector, where \(m\) is the number of floors in the structure, thereby providing quantification for each floor in the structure. As the PSO algorithm, in general, requires a single fitness function, these five resulting vectors are summed together across all floors, yielding  
\[O=\sum_{l=1}^{m}J_{1,l}+J_{2,l}+J_{3,l}+J_{4,l}+5J_{5,l}. \tag{15}\]  
In an uncontrolled scenario, the first four cost functions, \(J_{1}\) to \(J_{4}\), each take on a value of 1.0 for all floors, which sums to 20 for the five-story structure. It is observed that \(J_{5}\) typically takes on values of 0.2 or less for each floor in this simulation in order for it to be an equally weighted objective and a scalar of 5.0 is included with this cost function. Therefore, if the fitness function is less than 25, it can be concluded that the weight matrix is effective, as the uncontrolled response is likely less than the controlled response. To determine the optimal weight matrix, \(W\), the five-story structure was subject to seismic base excitation in simulation using the 1940 El Centro (SE) earthquake ground acceleration record (Figure 5). The dynamics of the structure and the associated sensing nodes were modeled using Equations (4)-(7) and (9), and the response of the structure to the excitation was approximated using the Newmark integration method [34]. To cover an adequate search space, the algorithm uses 50 particles.