## 3 Design and Analysis of the Sliding-Mode Controller
### Reachability Analysis  
The reachability conditions evaluate the capability of the controller to reach the sliding surface. The analysis is the following:  
* Operating under the surface (\(\Psi<0\)) requires a positive switching function derivative \(\left(\frac{d\Psi}{dt}>0\right)\) to reach the surface (\(\Psi=0\)).
* Operating above the surface (\(\Psi>0\)) requires a negative switching function derivative \(\left(\frac{d\Psi}{dt}<0\right)\) to reach the surface (\(\Psi=0\)).  
The previous analyses are formalized with the following inequalities:  
\[\lim_{\Psi\to 0^{+}}\frac{d\Psi}{dt}>0\quad\wedge\quad\lim_{\Psi\to 0^{+}} \frac{d\Psi}{dt}<0 \tag{29}\]  
The evaluation of those general reachability conditions depends on the value of the transversality condition (28); a positive value of Equation (28) indicates a direct relation between the control signal \(u\) and derivative \(\frac{d\Psi}{dt}\), i.e., a positive change on \(u\) produces a positive derivative \(\left(\frac{d\Psi}{dt}>0\right)\), and a negative change on \(u\) produces a negative derivative \(\left(\frac{d\Psi}{dt}<0\right)\). Instead, a negative value of Equation (28) indicates an inverse relation between \(u\) and \(\frac{d\Psi}{dt}\), i.e., a positive change on \(u\) produces a negative derivative \(\left(\frac{d\Psi}{dt}<0\right)\), and a negative change on \(u\) produces a positive derivative \(\left(\frac{d\Psi}{dt}>0\right)\).  
Then, for a positive transversality value (28), the general reachability conditions (29) become:  
\[\lim_{\Psi\to 0^{-}}\left.\frac{d\Psi}{dt}\right|_{u=1}>0\quad\wedge\quad\lim_{ \Psi\to 0^{+}}\left.\frac{d\Psi}{dt}\right|_{u=0}<0 \tag{30}\]  
Evaluating the previous inequalities with the switching function derivative (27) leads to the stability conditions given in inequalities (31) and (32). Those dynamic limitations on \(\frac{di_{R}}{dt}\) must be fulfilled to ensure the reachability of the desired surface in the case of a positive transversality value.  
\[\frac{di_{R}}{dt}>-v_{\text{C2}}\cdot\bigg{(}\frac{2\cdot d-1}{1- d}\cdot\frac{1}{L_{2}}-\frac{1}{L_{1}}\bigg{)}-k_{\text{\tiny{0}}}\cdot \bigg{(}\frac{i_{\text{L1}}+i_{\text{L2}}}{C_{2}}\bigg{)} \tag{31}\] \[\frac{di_{R}}{dt}<v_{\text{\tiny{0}}}\cdot\bigg{(}\frac{2\cdot d -1}{1-d}\cdot\frac{1}{L_{2}}-\frac{1}{L_{1}}\bigg{)} \tag{32}\]  
Instead, for a negative transversality value (28), the reachability conditions are given in Equation (33). Evaluating those inequalities produces the stability conditions given in (34) and (35).  
\[\lim_{\Psi\to 0^{-}}\left.\frac{d\Psi}{dt}\right|_{u=0}>0\quad \wedge\quad\lim_{\Psi\to 0^{+}}\left.\frac{d\Psi}{dt}\right|_{u=1}<0 \tag{33}\] \[\frac{di_{R}}{dt}>v_{b}\cdot\left(\frac{2\cdot d-1}{1-d}\cdot\frac {1}{L_{2}}-\frac{1}{L_{1}}\right)\] (34) \[\frac{di_{R}}{dt}<-v_{C2}\cdot\left(\frac{2\cdot d-1}{1-d}\cdot \frac{1}{L_{2}}-\frac{1}{L_{1}}\right)-k_{v}\cdot\left(\frac{i_{L1}+i_{L2}}{C_{ 2}}\right) \tag{35}\]  
Finally, the reachability conditions impose a dynamic restriction on the positive and negative changes for \(i_{R}\). Thus, the power system and controller must be designed to achieve the required dynamic response with a stable behavior. This analysis is illustrated in Section 4.3 using an application example.