# Discrete-Time Design of Dual Internal Model-Based Repetitive Control Systems
## 4 Proposed Dual Internal Model-Based RC (DIMRC)  
### DIMRC Structure  
Observing the internal models (8) and (11), we notice that both models show a similar form as follows:  
\[\mathcal{I}_{g,h}(z)=\frac{\mathcal{S}_{g,h}(z)}{1-\mathcal{S}_{g,h}(z)}, \tag{14}\]  
where \(\mathcal{S}_{g,h}(z)\) corresponds to the delay term of GMRC/HOMRC, and formulated by  
\[\mathcal{S}_{g}(z) =q_{r}(z)z^{-N_{r}}, \tag{15}\] \[\mathcal{S}_{h}(z) =q_{v}(z)\sum_{j=1}^{m}w_{j}z^{-jN_{v}}. \tag{16}\]  
Hence, the proposed DIMRC is designed to have the following transfer function:  
\[\text{C}_{d}(z)=\frac{U_{d}(z)}{E(z)}=\bigg{[}\frac{\mathcal{S}_{d}(z)}{1- \mathcal{S}_{d}(z)}\bigg{]}F(z), \tag{17}\]  
which is equivalent to the DIMRC law as follows:  
\[U_{d}(z)=[\mathcal{S}_{d}(z)]U_{d}(z)+[\mathcal{S}_{d}(z)F(z)]E(z). \tag{18}\]  
Note that \(\mathcal{S}_{d}(z)\) in (17) is the delay term constructed based on the denominators \(\mathcal{D}_{g}(z)\) and \(\mathcal{D}_{h}(z)\) given in (8) and (11), respectively. The \(\mathcal{S}_{d}(z)\) is also in the form of polynomial and is proposed as follows:  
\[\mathcal{S}_{d}(z)=1-\mathcal{D}_{g}(z)\mathcal{D}_{h}(z). \tag{19}\]  
Substituting \(\mathcal{D}_{g}(z)\) in (8) and \(\mathcal{D}_{g}(z)\) in (11) to (19), we obtain  
\[\mathcal{S}_{d}(z)=1-\bigg{[}1-q_{r}(z)z^{-N_{r}}\bigg{]}\bigg{[}1-q_{v}(z) \sum_{j=1}^{m}w_{j}z^{-jN_{v}}\bigg{]}, \tag{20}\]  
which can be further expressed as  
\[\mathcal{S}_{d}(z)=q_{r}(z)z^{-N_{r}}+q_{v}(z)\sum_{j=1}^{m}w_{j}z^{-jN_{v}}-q _{r}(z)q_{v}(z)\sum_{j=1}^{m}w_{j}z^{-jN_{v}-N_{r}}. \tag{21}\]  
Finally, the block diagram of the proposed DIMRC closed-loop system is illustrated in Figure 2. In addition, the controller realization is described in Figure 3. The weighted delays shown in Figure 3, is then detailed in Figure 4. Note that the controller realization shown in Figure 3 is implementable for DIMRC with causal or proper stabilizing controller \(F(z)\). Some \(F(z)\) designs resulting in causal form can be seen in [27; 28]. Here, the causal stabilizing controller \(F(z)\) can be implemented separately without being merged with the internal model. Other designs resulting in non-causal/improper form can be found in the references [26; 29; 30]. Thus, it is obvious that the stabilizing controller \(F(z)\) can be designed in either causal or non-causal form. Suppose that the stabilizing controller \(F(z)\) is non-causal by a factor of \(d_{F}\). This means that \(\deg\{\mathcal{N}_{f}(z)\}>\deg\{\mathcal{D}_{f}(z)\}\) and \(\deg\{\mathcal{N}_{f}(z)\}-\deg\{\mathcal{D}_{f}(z)\}=d_{F}\), where \(\deg\{\mathcal{N}_{f}(z)\}\) and \(\deg\{\mathcal{D}_{f}(z)\}\) represent the degrees of \(F(z)\)'s numerator \(\mathcal{N}_{f}(z)\) and denominator \(\mathcal{D}_{f}(z)\), respectively. To reduce the controller's complexity, the realization of DIMRC with non-causal \(F(z)\) can be achieved by modifying Figure 3 into Figure 5.  
Figure 4: Realization of the weighted multiple delays.  
Figure 5: Realization of the DIMRC with non – causal stabilizing controller.  
Figure 3: Realization of the proposed DIMRC.  
Figure 2: Block diagram of the plug – in DIMRC system.