## 4 Optimal Control Problem with Reference Tracking of the VSI Output Voltage  
This section introduces reference tracking for the capacitor voltage magnitude using the linear quadratic regulator with integral action (LQI) method [31]. The integral action aims to reject the unmodeled errors and the disturbances in the system described in (6). To achieve this, newly expanded states are introduced to include the integral of the desired tracking error. The dynamic model of the augmented estates is given by the following:  
\[ \begin{bmatrix}s_{1,t+1}\\ s_{2,t+1}\end{bmatrix} = \begin{bmatrix}s_{1,t}\\ s_{2,t}\end{bmatrix} +(\mathbf{y}_{t}-\mathbf{r}). \tag{12}\]  
where \( \begin{bmatrix}s_{1,t}&s_{2,t}\end{bmatrix} ^{\top}\) are the expanded states and \(\mathbf{r}\) is the voltage reference. Using (12) and treating the output current (\(\mathbf{i_{o}}\)) as an unmeasured disturbance, the model in (6) is expanded as follows:  
\[ \begin{split}\mathbf{x}_{\text{e},t+1}&=\mathbf{A}_{\text{e}} \mathbf{x}_{\text{e},t}+\mathbf{B}_{\text{e}}\mathbf{u}_{t}+\mathbf{B}_{\text {pe}}\mathbf{i}_{\text{o},t},\\ \mathbf{y}_{t}&=\mathbf{C}_{\text{e}}\mathbf{x}_{\text{pe},t},\end{split}  \tag{13}\]  
where the augmented state is \(\mathbf{x}_{\text{e},t}=[i_{\text{d},t},i_{\text{q},t},v_{\text{cd},t},v_{ \text{cq},t},s_{1,t},s_{2,t}]^{\top}\), and the matrices of the augmented system are as follows:  
\[\mathbf{A}_{\text{e}}= \begin{bmatrix}\mathbf{A}_{\text{d}}&\mathbf{0}_{4 \times 2}\\ \mathbf{C}&\mathbb{I}_{2\times 2}\end{bmatrix} ,\quad\mathbf{B}_{\text{e}}= \begin{bmatrix}\mathbf{B}_{\text{d}}\\ \mathbf{0}_{2\times 2}\end{bmatrix} ,\quad\mathbf{B}_{\text{pe}}= \begin{bmatrix} \mathbf{B}_{\text{dp}}\\ \mathbf{0}_{2\times 2}\end{bmatrix} ,\quad\mathbf{C}_{\text{e}}= \begin{bmatrix} \mathbf{C}&\mathbf{0}_{2\times 2}\end{bmatrix}  \tag{14}\]  
Figure 6: Hexagonal boundary defining the voltage amplitude in the \(\alpha\beta\) plane. The control feedback matrix is obtained by solving the following optimization problem:  
\[\min \sum_{k=0}^{\infty}\left(\mathbf{x}_{\mathrm{e},k}^{\top}\mathbf{Q} \mathbf{x}_{\mathrm{e},k}+\mathbf{u}_{\mathrm{e},k}^{\top}\mathbf{R}\mathbf{u}_ {\mathrm{e},k}\right),\] (15) s.t. \[\mathbf{x}_{\mathrm{e},k+1}=\mathbf{A}_{\mathrm{e}}\mathbf{x}_{ \mathrm{e},k}+\mathbf{B}_{\mathrm{e}}\mathbf{u}_{k}, \tag{16}\]  
where \(\{\mathbf{Q},\mathbf{R}\}>0\) are weighting matrices that define the desired closed-loop performance of the system. Limiting the closed-loop system's bandwidth is crucial to achieving a robust design and mitigating system resonances. Conversely, ensuring a sufficiently high bandwidth is essential for enhancing the dynamic performance of the control loop. This trade-off is addressed by adjusting the values of \(\mathbf{Q}\) and \(\mathbf{R}\). Following the methodology proposed in [32], the matrices are adjusted as \(\mathbf{Q}=\mathrm{diag}(\mathbb{I}_{4\times 4},\rho_{1}\mathbb{I}_{2\times 2})\) and \(\mathbf{R}=\mathbb{I}_{2\times 2}\). Consequently, the control design is simplified to tuning the parameter \(\rho_{1}\) to achieve the desired closed-loop bandwidth. The LQI control law is given by the following:  
\[\mathbf{u}_{t}=-\mathbf{K}_{\mathrm{o}}\mathbf{x}_{\mathrm{e},t}, \tag{17}\]  
with \(\mathbf{K}_{\mathrm{o}}=(\mathbf{B}_{\mathrm{e}}^{\mathrm{T}}\mathbf{S} \mathbf{B}_{\mathrm{e}}+\mathbf{R}^{-1}(\mathbf{B}_{\mathrm{e}}^{\mathrm{T}} \mathbf{S}\mathbf{A}_{\mathrm{e}}^{\mathrm{T}})\) the optimal gain matrix, and \(\mathbf{S}\) the solution to the Riccati, and the closed-loop system transition matrix is given by the following:  
\[\mathbf{A}_{\mathrm{closed}}=\mathbf{A}_{\mathrm{e}}-\mathbf{B}_{\mathrm{e}} \cdot\mathbf{K}_{\mathrm{o}}. \tag{18}\]  
Figure 7 illustrates the multivariable frequency response of the closed-loop system with the parameter \(\rho_{1}=1e-2\).This design criterion ensures the damping of critical frequencies near 4500 rad/s and 5000 rad/s, and cero db gain at dc, i.e., achieving reference tracking at steady state.