## 4 Approximate Prediction of Fast-Scale Instability and Adaptive Slope Compensation
### Reduced-Order Discrete-Time Model for Predicting the Fast-Scale Instability in the DC-AC Inverter  
For the DC-AC boost inverter considered in this study, the current loop is established by the signal \(\sigma(t)=R_{s}(i_{1}(t)-i_{2}(t))\). A reduced-order discrete-time model that takes into account only this signal can be therefore used to mathematically predict the stability boundary. Therefore, let the discrete-time variable \(\sigma_{n}=\sigma(nT)=R_{s}(i_{1}(nT)-i_{2}(nT))\). The approach followed here for analyzing the dynamics at the fast scale of the AC module is based on decoupling the different system loops into three subsystems. Indeed, since the switching frequency is much higher than the grid frequency (\(m:=f_{s}/f_{g}=1000\)), the quasi-static approximation can be used to model the fast current loop dynamics and stability criteria can be obtained. Since the focus in this paper is on the fast-scale instability, the slower loops are considered stable and well described by their averaged models. Moreover, steady-state average quantities of the variables involved in these slow loops are used in the description of the fast dynamics of the variable \(\sigma\). The fast current loop dynamics is solved in discrete time to catch the high frequency dynamics in this loop which is dominant in inducing the previously observed phenomena. Under the quasi-static conditions, the behavior of the system is considered to repeat for all grid periods. Notice that this was the case with the simulations presented in the previous section. Therefore, the study of the fast-scale dynamics is performed within one single grid period. Let us write \(\theta=\omega_{g}t\), \(\theta\in(0,2\pi)\). Therefore, the grid voltage can be  
Figure 7: Time-domain waveforms of the grid voltage \(v_{g}\) and grid current \(i_{g}\) for \(S=200\) W/m\({}^{2}\) in steady-state operation. \(V_{M}=3.2\) V.  
written in terms of the phase angle as \(v_{g}(\theta)=\sqrt{2}V_{g}\sin(\theta)\). Thanks to the quasi-static approximation, the time dependence of the inverter model at the slow scale is eliminated and the dynamics at the fast scale is parametrized by the phase angle \(\theta\) which is treated as a slowly varying parameter. Under the quasi-static approximation, and neglecting the switching dynamics of the slow loop, the switched model of the inverter considering the signal \(\sigma\) the only state variable of the system can be expressed as follows  
\[\frac{\mathrm{d}\sigma}{\mathrm{d}t}=\frac{R_{s}}{L}((v_{o1}(\theta)-v_{o2}( \theta))u-v_{o1}(\theta)) \tag{6}\]  
where \(u\in\{0,1\}\) is the binary switched signal representing the states of the switches \(\mathrm{Q}_{1}\)-\(\mathrm{Q}_{4}\). The illustrative waveforms of the signals \(\sigma\) and \(R_{s}i_{\mathrm{ref}}(\theta)-v_{r}\) are depicted in Figure 8. From this figure and by integrating (6) within a switching cycle, the discrete-time dynamics corresponding to the variable \(\sigma\) can be described by the following recurrence equation  
\[\sigma_{n+1}=\sigma_{n}+m_{1}(\theta)d_{n}T+m_{0}(\theta)(1-d_{n})T\text{ with }0\leq d_{n}\leq 1. \tag{7}\]  
where \(d_{n}\) is the duty cycle within the switching cycle \((nT,(n+1)T)\) for a phase angle \(\theta\in(0,2\pi)\).