# A Systematic Control Design Method with Active Damping Control in Voltage Source Converters
## 3 Design of the Control Gain Matrix
### Weighting Matrixes' Selection  
As the previous subsection can conclude, the optimal state-feedback control design of grid-connected VSC is reduced to the proper choice of weighting matrixes (\(Q\) and \(R\)). [PERSON]'s rule can be used to select weighting matrixes as a primary choice. Moreover, References [28; 29] have provided some guidelines to choose weighting matrixes. For instance, a procedure based on minimizing the infinity norm of selected transfer functions is suggested in Reference [29]. However, there are two main issues for the understudied system that should be appropriately answered: (1) Is it possible to reduce the number of tuning parameters? (\(Q\) and \(R\) have 130 elements to tune.) (2) Can physical meaning be provided for them, and how can they be related to well-known system stability and performance indicators such as the maximum damping factor (\(\sigma_{max}\)) and minimum damping ratio (\(\xi_{min}\))?Many recommendations for properly tuning weighting matrixes in general and, after that, for the specific understudied system are presented in this section. For simplicity in tuning, diagonal matrixes are usually selected. It is worth remarking that the diagonal elements of weighting matrixes (\(q_{i}\) or \(r_{i}\)) are the maximum expected or acceptable value of the related state \(\left({x_{i}}^{2}\right)^{-1}\) or input \(\left({u_{i}}^{2}\right)^{-1}\). A higher \(Q\) results in a smaller steady-state error, higher bandwidth, faster dynamic response, and better disturbance rejection. However, it causes higher sensitivity to noise and unmodeled dynamics and increases the norm of control gain matrix, leading to chattering and control input saturation. Therefore, the selection of \(Q\) and \(R\) compromises a fast dynamic response, adequate stability margin, and acceptable control matrix norm. The compromised values can be obtained systematically with a simple computer-aided program. For example, for different values of weighting matrixes, the damping factor and damping ratio of the critical mode and the norm of the control gain matrix (norm(\(K_{f}\)) = \(\|K_{f}\|\)) are calculated. Then the stability and performance criteria are checked. If the desired performance is fulfilled, the process is stopped; otherwise, proper actions should be taken. Although the previous process can also find proper weighting factors, nineteen tuning parameters (fifteen parameters in \(Q\) and four in the \(R\)) should be selected, which increases the design process time. Therefore, further reduction of the number of individual tuning parameters is still desirable. Moreover, physical inspiration about their impact is not presented yet. Thus, a more detailed discussion on the weighting factors tuning for the understudied system is presented as follows. Since there are four control inputs (\(u_{1d}\), \(u_{1q}\), \(u_{2d}\), and \(u_{2q}\)) and three important stability and performance indicators (\(\sigma_{max}\), \(\xi_{min}\), and norm (\(K_{f}\))), three or four individual parameters in the weighting matrixes may provide the requirements mentioned above. Therefore, the following suggestions are provided. First, the input cost matrix is selected as \(R=r1_{4\times 4}\); therefore, only one \(r\) is needed to be chosen. Moreover, the different characteristics of the states can be divided into three different groups: integrals of the tracking errors \(\left({\gamma_{id},\gamma_{iq},\gamma_{dc},\gamma_{g},\gamma_{q}}\right)\), dc-link voltage tracking error \(\left({\Delta v_{dc}}\right)\), and the remaining states \(\left({x_{dd},x_{dq},\delta_{if_{d}},i_{fq},r_{d},v_{fd},v_{fd},i_{gd}^{{}^{ \prime}},i_{gd}^{{}^{\prime}}}\right)\). For the first group, these states are directly related to the control errors, which represent the steady-state error. For the second group, it can affect the transient response of dc-link voltage tracking error and, consequently, inverter current. For the last one, the states are just intermediate states which are directly related to the control performance.