## Two-Building Mathematical Models  
### Uncontrolled Configuration  
Let us consider a two-building system formed by a four-story building adjacent to a five-story building as schematically depicted in Figure 1a. In this uncontrolled configuration, the lateral motion of the buildings can be described by the second-order differential equation  
\[\mathbf{M}\,\ddot{\mathbf{q}}(t)+\mathbf{C}_{\mathrm{d}}\,\dot{\mathbf{q}}(t)+ \mathbf{K}_{\mathrm{s}}\,\mathbf{q}(t)=\mathbf{T}_{\mathrm{w}}\,w(t), \tag{1}\]  
where \(\mathbf{q}(t)\) is the vector of story displacements with respect to the ground, \(\mathbf{M}\) is the mass matrix, \(\mathbf{C}_{\mathrm{d}}\) is the damping matrix, \(\mathbf{K}_{\mathrm{s}}\) is the stiffness matrix, \(w(t)\) is the ground acceleration disturbance and \(\mathbf{T}_{\mathrm{w}}\) is the disturbance input matrix. The vector of story displacements can be written in the form  
\[\mathbf{q}(t)=\left[q_{1}^{1}(t),\,q_{2}^{1}(t),\,q_{3}^{1}(t),\,q_{4}^{1}(t),\,q_{1}^{2}(t),\,q_{2}^{2}(t),\,q_{3}^{2}(t),\,q_{4}^{2}(t),\,q_{5}^{2}(t) \right]^{T}, \tag{2}\]  
where \(q_{i}^{j}(t)\) represents the displacement of the \(i\)th story in the building \(\mathcal{B}^{(j)}\) (denoted as \(s_{i}^{j}\) in Figure 1) with respect to the building's ground level \(s_{0}^{j}\). The mass matrix is a diagonal matrix  
\[\mathbf{M}=\mathrm{diag}(m_{1}^{1},\,m_{2}^{1},\,m_{3}^{1},\,m_{4}^{1},\,m_{ 1}^{2},\,m_{2}^{2},\,m_{3}^{2},\,m_{4}^{2},\,m_{5}^{2}), \tag{3}\]  
where \(m_{i}^{j}\) denotes the mass of the \(i\)th story in the building \(\mathcal{B}^{(j)}\). The damping and stiffness matrices have a similar block diagonal structure  
\[\mathbf{K}_{\mathrm{s}}=\left[ \begin{array}{cc}\mathbf{K}_{\mathrm{s}}^{(1 )}&[\mathbf{0}]_{4\times 5}\\ [\mathbf{0}]_{5\times 4}&\mathbf{K}_{\mathrm{s}}^{(2)}\end{array} \right], \quad\mathbf{C}_{\mathrm{d}}=\left[ \begin{array}{cc}\mathbf{C}_{\mathrm{d}}^ {(1)}&[\mathbf{0}]_{4\times 5}\\ [\mathbf{0}]_{5\times 4}&\mathbf{C}_{\mathrm{d}}^{(2)}\end{array} \right], \tag{4}\]  
where \(\mathbf{C}_{\mathrm{d}}^{(j)}\) and \(\mathbf{K}_{\mathrm{s}}^{(j)}\) represent the local damping and stiffness matrices, respectively, corresponding to the building \(\mathcal{B}^{(j)}\), and \([\mathbf{0}]_{\
u\times s}\) is a zero matrix of dimensions \(r\times s\). Typically, the local stiffness matrices have the following tridiagonal structure:  
\[\mathbf{K}_{\mathrm{s}}^{(1)}\!=\!\left[ \begin{array}{ccccc}k_{1}^{1}+k_{2} ^{1}&-k_{1}^{1}&0&0\\ -k_{2}^{1}&k_{2}^{1}+k_{3}^{1}&-k_{3}^{1}&0\\ 0&-k_{3}^{1}&k_{3}^{1}+k_{4}^{1}&-k_{4}^{1}\\ 0&0&-k_{4}^{1}&k_{4}^{1}\end{array} \right],\quad\mathbf{K}_{\mathrm{s}}^  
computational methods are used to obtain the matrices \(\mathbf{C}_{\mathrm{d}}^{(j)}\)[41]. Finally, the disturbance input matrix has the following form:  
\[\mathbf{T}_{\mathrm{w}}=-\mathbf{M}\left[\mathbf{1}\right]_{\mathrm{\mathbf{ \mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{ \mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{ \mathbf{  }}}}}}}}}}}}} \tag{6}\]  
where \(\left[\mathbf{1}\right]_{\mathrm{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{ \mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{\mathbf{ \mathbf{  }}}}}}}}}}}}}}\) is a vector of dimension \(n\) with all its entries equal to one. In order to describe the vibrational response of the two-building system, we consider two different types of output variables: _interstory drifts_ and _interbuilding approaches_. The interstory drift \(r_{i}^{j}(t)\) is the relative displacement between the consecutive stories \(s_{i}^{j}\) and \(s_{i-1}^{j}\) of the building \(\mathcal{B}^{(j)}\), and can be defined as  
\[\left\{ \begin{array}{l}r_{1}^{j}(t)=q_{1}^{j}(t),\\ r_{i}^{j}(t)=q_{i}^{j}(t)-q_{i-1}^{j}(t),\ \ \ 1<i\leq n_{j},\end{array} \right. \tag{7}\]  
where \(n_{j}\) represents the number of stories of the building \(\mathcal{B}^{(j)}\).