## 3 Proportional Resonant Controller Model
According to the principle of the internal model [22], in a feedback control system like the one in Figure 3, there is zero error in a steady state if the closed loop system is asymptotically stable and the poles of the system include the poles of reference to be tracked. In order to present the way in which the proportional resonant control tuning method was developed, initially it is necessary to obtain the state-space representation of the transfer function presented in Equation (22) [25; 27], as in system (23):  
\[ \begin{array}{l}\dot{\eta}=A_{CR}\eta(t)+B_{CR}e(t)\\ y_{CR}=C_{CR}\eta(t)+D_{CR}e(t)\end{array}  \tag{23}\]  
The representation of (23) in the state space is given by  
\[\left\{ \begin{array}{l}\dot{\eta}_{r}(t)=\left[\begin{array}{ccc}A_{CR_{1} }&\cdots&0_{2}\\ \vdots&\ddots&\vdots\\ 0_{2}&\cdots&A_{CR_{n}}\end{array}\right]\eta_{r}(t)+\left[\begin{array}{c} B_{CR_{1}}\\ \vdots\\ B_{CR_{n}}\end{array}\right]e(t)\\ y_{CR}(t)=\left[C_{CR_{1}}\ldots C_{CR_{n}}\right]\eta_{r}(t)+\left[D_{CR} \right]e(t)\end{array} \right. \tag{24}\]  
where \(\eta_{CR}(t)\in\mathbb{R}^{2n}\) is the state vector of the multi-resonant controller, \(e(t)\) is the input signal, \(y_{CR}(t)\) is the output signal, and \(A_{CR},B_{CR}\) and \(C_{CR}\) are matrices of appropriate size. \[ \begin{array}{l}A_{CR_{h}}=\left[\begin{array}{cc}0&\omega_{h}\\ -\omega_{h}&-2\xi_{h}\omega_{h}\\ \end{array}\right],\quad B_{CR_{h}}=\left[\begin{array}{c}0\\ 1\end{array}\right]\\ C_{CR_{h}}=\left[\begin{array}{cc}k_{h+1}&k_{h+2}\end{array}\right],\quad D _{CR_{h}}=[k_{2}]\end{array}  \tag{25}\]  
for each resonant mode, that is, evaluated for each pair \((\xi_{h},\omega_{h})\), \(h=1\ldots n\). The controller based on the internal model principle has internal variables as output variables, which facilitates the design of the controller gains by full state feedback, since all state variables are available for control, as shown in Figure 3. The augmented system is composed only of the plant and proportional compensators based on internal model principle in the frequency of the fundamental, \(\omega_{0}\), and the characteristic of rejection of load disturbances in the other harmonic frequencies. Generalizing the representation of the plant with the controller, it can be written that :  
\[\left\{ \begin{array}{l}\dot{\tilde{x}}(t)=\tilde{A}\tilde{x}(t)+\tilde{B}_{ u}u(t)+\tilde{B}_{w}w(t)+\tilde{B}_{r}r(t)\\ \tilde{y}(t)=\tilde{C}\tilde{x}(t)\end{array} \right. \tag{26}\]  
where \(w(t)=i_{d}\)\[\tilde{x}(t)=\left[ \begin{array}{c}x(t)\\ \eta_{1}(t)\\ \eta_{2}(t)\\ \vdots\\ \eta_{n}(t)\end{array} \right]\quad\tilde{A}=\left[ \begin{array}{cccc}A\left( Y_{load}\right)&0_{2\times 2}&0_{2\times 2}&\cdots&0_{2\times 2}\\ -B_{CR1}C&A_{CR1}&0_{2\times 2}&\cdots&0_{2\times 2}\\ -B_{CR2}C&0&A_{CR2}&\cdots&0_{2\times 2}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ -B_{CRn}C&0_{2\times 2}&0_{2\times 2}&\cdots&A_{CRn}\end{array} \right],\tilde{B}_{u}= \left[ \begin{array}{c}B\\ 0_{2\times 1}\\ 0_{2\times 1}\\ \vdots\\ 0_{2\times 1}\end{array} \right] \tag{27}\] \[\tilde{C}=\left[ \begin{array}{cccc}C&0_{1\times 2}&\cdots&0_{1 \times 2}\end{array} \right],\tilde{B}_{w}=\left[ \begin{array}{c}B_{w}\\ 0_{2\times 1}\\ 0_{2\times 1}\\ \vdots\\ 0_{2\times 1}\end{array} \right],\quad\tilde{B}_{r}=\left[ \begin{array}{c}0_{2 \times 1}\\ B_{CR1}\\ B_{CR2}\\ \vdots\\ B_{CRh}\end{array} \right]\]