## 2 Modal LQR with Optimized Weighting Matrices
### Modal LQR  
Consider a \(N\)-degrees-of-freedom building with an AMD at the top, its equations of motion can be expressed as:  
\[\mathbf{M}\ddot{\mathbf{x}}(t)+\mathbf{C}\dot{\mathbf{x}}(t)+\mathbf{K} \mathbf{x}(t)=-\mathbf{M}\ddot{\mathbf{x}}_{g}(t)+\mathbf{\Lambda}u(t) \tag{1}\]  
where \(\mathbf{M}\), \(\mathbf{C}\), and \(\mathbf{K}\) represent the mass, damping, and stiffness matrix of the building, respectively; \(\mathbf{x}(t)\) is the displacement vector; \(u(t)\) is the control force; \(\mathbf{\Lambda}\) is the location vector of the control force; \(\mathbf{l}\) is a vector of order \(N\) with each element equal to unity; and \(\ddot{x}_{g}(t)\) is the ground acceleration. It is noted that proportional damping of structures has been frequently assumed in structural dynamic analyses. As a result, if the building is proportional damping system, the equation of motion can be expressed in modal configuration by letting \(\mathbf{x}(t)=\mathbf{\Phi}\mathbf{q}(t)\). Hence, the equation of motion in modal space becomes:  
\[\ddot{\mathbf{q}}(t)+\overline{\mathbf{C}}\dot{\mathbf{q}}(t)+\mathbf{\Omega} ^{2}\mathbf{q}(t)=-\mathbf{\Phi}^{\mathbf{T}}\mathbf{M}\ddot{\mathbf{x}}_{g} (t)+\mathbf{\Phi}^{\mathbf{T}}\mathbf{\Lambda}u(t) \tag{2}\]  
where \(\mathbf{\Phi}\) is the modal matrix which contains all the mode shapes; \(\mathbf{q}(t)\) is the modal displacement vector; \(\overline{\mathbf{C}}=diag(\ \ 2\zeta_{1}\omega_{1}\ \ \cdots\ \ 2\zeta_{N}\omega_{N}\ )\) is a modal damping matrix in which the parameters \(\zeta_{\rm i}\) and \(\omega_{\rm i}\) represent the damping ratio and natural frequency of the \(i\)-th mode, respectively; and \(\mathbf{\Omega}^{2}\) is the modal natural frequency matrix and can be expressed as \(\mathbf{\Omega}^{2}=diag(\ \ \omega_{1}^{2}\ \ \cdots\ \ \omega_{N}^{2}\ )\). The state-space formulation of the building in modal space can be represented as:  
\[ \begin{array}{l}\dot{\mathbf{z}}_{\mathbf{m}}(t)=\mathbf{A}_{\mathbf{m}} \mathbf{z}_{\mathbf{m}}(t)+\mathbf{B}_{\mathbf{m}}u(t)+\mathbf{E}_{\mathbf{m}} \ddot{\mathbf{x}}_{g}(t)\\ \mathbf{y}_{\mathbf{m}}(t)=\mathbf{C}_{\mathbf{m}}\mathbf{z}_{\mathbf{m}}(t)+ \mathbf{D}_{\mathbf{m}}u(t)\end{array}  \tag{3}\]where \(\dot{\mathbf{z}}_{\mathbf{m}}(t)=[ \begin{array}{cc}\mathbf{q}(t)&\dot{\mathbf{q}}(t )\end{array} ]^{T}\) defines the modal states. Accordingly, the system matrix \(\mathbf{A_{m}}\), the control force distribution matrix \(\mathbf{B_{m}}\), and the disturbance location matrix \(\mathbf{E_{m}}\) in modal configuration become  
\[\mathbf{A_{m}}=\left[ \begin{array}{cc}0&\mathbf{I}\\ -\mathbf{\Omega}^{2}&-\overline{\mathbf{C}}\end{array} \right];\mathbf{B_{m}}= \left[ \begin{array}{cc}0\\ \mathbf{\Phi^{T}\Lambda}\end{array} \right];\mathbf{E_{m}}=\left[ \begin{array}[ ]{cc}0\\ -\mathbf{\Phi^{T}M}\end{array} \right] \tag{4}\]  
On the other hand, the output \(\mathbf{y_{m}}(t)\) is selected as the modal absolute acceleration of each mode and the matrices \(\mathbf{C_{m}}\) and \(\mathbf{D_{m}}\) become:  
\[\mathbf{C_{m}}=\left[ \begin{array}{cc}-\mathbf{\Omega}^{2}&-\overline{ \mathbf{C}}\end{array} \right];\mathbf{D_{m}}=\left[\mathbf{\Phi^{T}\Lambda}\right] \tag{5}\]  
As mentioned previously, LQR intends to minimize a cost function related to the states and control inputs with weighting matrices \(\mathbf{Q}\) and \(\mathbf{R}\) determined by users. In the modal LQR design, the modal absolute acceleration is taken as the state to be regulated. Therefore, the quadratic cost function of LQR for structural control is defined as:  
\[J=\int_{0}^{\infty}\Big{(}\mathbf{y_{m}}^{T}\mathbf{Q}\mathbf{y_{m}}+u^{T}Ru \Big{)}\text{d}t \tag{6}\]  
The dimension of the weighting matrix \(\mathbf{Q}\) depends on the number of selected modes to be controlled. The weighting \(R\) is a scalar since there is merely one control force imposed on the top of the structure.