## 2 Stability and Controllability Analysis  
Power systems require both stability and controllability to operate reliably under various conditions. Stability ensures that the system can maintain an equilibrium state after disturbances, while controllability indicates the ability to control the states of a system through its inputs. Small-signal stability refers to the ability of a system to maintain stability when subjected to small disturbances around an operating point, such as minor changes in load or generation. Modal analysis is a commonly used method to study small-signal stability. This approach characterizes system behavior using modal parameters from linearized state-space equations around an equilibrium point. A standard matrix form is given as  
\[\mathbf{\hat{x}}(t)=\mathbf{Ax}(t)+\mathbf{B}\mathbf{u}(t);\,\mathbf{x}_{0}= \mathbf{x}(0), \tag{1}\]  
where \(\mathbf{A}\in\mathbb{R}^{n\times n}\) and \(\mathbf{B}\in\mathbb{R}^{n\times m}\) are the system and input matrix, while \(\mathbf{x}(t)\) and \(\mathbf{u}(t)\) are the state and input vectors, respectively, and \(\mathbf{x}_{0}\) represents initial conditions. The modes of a system are defined by the eigenvalues and eigenvectors of the system matrix \(\mathbf{A}\). Eigenvalues are calculated by solving the characteristic equation:  
\[\text{det}(\lambda\mathbf{I}-\mathbf{A})=0, \tag{2}\]  
where \(\lambda\) is the eigenvalue and \(\mathbf{I}\) is the identity matrix. The dynamic mode \(e^{\mu t}\text{sin}(\omega_{d}t+\theta)\) corresponds to the conjugate complex eigenvalue \(\lambda_{1,2}=\sigma\pm\text{i}\omega_{d}\). The eigenvalue's real part determines the amplitude decay rate, described by the time constant \(\tau\) as  
\[\tau=-\frac{1}{\sigma}. \tag{3}\]  
The imaginary part represents the damped frequency of oscillations \(\omega_{d}\), and the damping ratio \(\zeta\) is defined as  
\[\zeta=-\frac{\sigma}{\sqrt{\sigma^{2}+\omega_{d}^{2}}}. \tag{4}\]  
All modes must have negative eigenvalues' real parts for a stable system, and oscillations should be damped as quickly as possible. Controllability indicates the ability to control the states of a system through its inputs. Traditionally, controllability is treated as a binary property--either the system is controllable or it is not--based on the rank of the controllability matrix. While this condition is necessary and fundamental, it does not provide information on how well the states can be controlled, nor does it reflect the control effort required to influence different system modes. In this work, we employ the controllability Gramian to gain a more detailed insight into the internal structure of controllability. This quantitative approach enables us to assess the relative controllability of individual states and modes, which can inform control placement, optimization, and design. Such an analysis becomes especially valuable in large-scale or constrained systems, where achieving full controllability may not be feasible or practical. Although it would be possible to follow a two-step procedure--first ensuring controllability and then improving system damping--we opted for an integrated approach in which the controllability metric directly informs the system design process. Controllability can be quantified using the controllability Gramian matrix \(\mathbf{W}_{c}(t)\), a symmetric positive semidefinite matrix that determines the energy required to move the system between states. For a system with a Hurwitz matrix \(\mathbf{A}\) (i.e., all eigenvalues have negative real parts), \(\mathbf{W}_{c}(t)\) is constant and is given by  
\[\mathbf{W}_{c}=\int_{0}^{\infty}e^{\mathbf{A}\tau}\mathbf{B}\mathbf{B}^{\text {T}}e^{\mathbf{A}^{\text{T}}}d\tau, \tag{5}\]  
where \(e^{\mathbf{A}\tau}\) is the state-transition matrix, and \((\cdot)^{\text{T}}\) is the transpose of a matrix. The controllability Gramian matrix \(\mathbf{W}_{c}\) is essential for the proposed research approach, as it provides an energy-related quantification of controllability.