## 4 Simulation Results
### SDRE Controller  
Because of the rapid increase in the fault current in a dc microgrid, it is necessary to detect faults at the right time and isolate the faulted segment. The first part of the results is related to the voltage control of the dc bus via the SDRE controller and the second part is dedicated to the SDRE observer results for fast fault detection. In both parts, it is necessary to first consider a state-dependent coefficient (SDC) representation of the Equation (1). The coefficients of the state equation were extracted as follows. The SDRE controller objectives for the studied network are the setting of the output voltages of the PV system, the battery, the capacitor bank and the dc bus, which can be used for control purposes using \(u_{1}(t)\), \(u_{2}(t)\) and \(u_{3}(t)\) inputs. For this purpose, the optimal equilibrium point of the system is obtained with zero placement of the right side of Equation (1). The desired equilibrium point is obtained using the parameters of Table 1 as follows:  
\(x_{1}^{*}=300\), \(x_{2}^{*}=1000\), \(x_{3}^{*}=0\), \(x_{4}^{*}=400\), \(x_{5}^{*}=1000\),  
\(x_{6}^{*}=0\), \(x_{7}^{*}=1000\), \(x_{8}^{*}=5\), \(x_{9}^{*}=1000\),  
\(u_{1}^{*}=0.7\), \(u_{2}^{*}=0.6,u_{3}^{*}=0.5\)  
In order to transfer this equilibrium to the space state, the following variables are used:  
\(\Delta x_{1}=x_{1}-300\), \(\Delta x_{2}=x_{2}-1000\), \(\Delta x_{3}=x_{3}\)  
\(\Delta x_{4}=x_{4}-400\), \(\Delta x_{5}=x_{5}-1000\), \(\Delta x_{6}~{}=x_{6}\)  
\(\Delta x_{7}=x_{7}-1000\), \(\Delta x_{8}=x_{8}-5\), \(\Delta x_{9}=x_{9}-1000\)  
\(\Delta u_{1}=u_{1}-0.7\), \(\Delta u_{2}=u_{2}-0.6\), \(\Delta u_{3}=u_{3}-0.5\)  
By changing the given variables, Equation (1) can be rewritten as follows:  
\[ \begin{array}{l}\Delta\dot{x}_{1}=-\frac{1}{R_{1}C_{1}}\Delta x_{1}-\frac{1 }{C_{1}}\Delta x_{3}\\ \dot{\Delta x}_{2}=-\frac{1}{R_{2}C_{2}}\Delta x_{2}+\frac{0.3}{C_{2}}\Delta x _{3}+\frac{1}{R_{2}C_{2}}\Delta x_{9}-\frac{1}{R_{2}C_{2}}\Delta x_{3}\Delta u _{1}\\ \Delta\dot{x}_{3}=\frac{1}{L_{3}}\Delta x_{1}-\frac{1}{L_{3}}(0.3\Delta x_{2}- R_{01}\Delta x_{3})+\frac{\Delta x_{2}}{L_{3}}\Delta u_{1}\\ \Delta\dot{x}_{4}=-\frac{1}{R_{4}C_{4}}\Delta x_{4}-\frac{1}{C_{4}}\Delta x_{6} \\ \Delta\dot{x}_{5}=-\frac{1}{R_{5}C_{5}}\Delta x_{5}-\frac{0.004}{R_{5}C_{5}} \Delta x_{6}-\frac{1}{R_{5}C_{5}}\Delta x_{9}-\frac{\Delta x_{6}}{C_{5}}\Delta u _{2}\\ \Delta\dot{x}_{6}=\frac{1}{L_{6}}(\Delta x_{4}-0.4\Delta x_{5}-R_{04}\Delta x_{ 6})+\frac{\Delta x_{5}}{L_{6}}\Delta u_{2}\\ \Delta\dot{x}_{7}=-\frac{1}{R_{7}C_{7}}\Delta x_{7}-\frac{1}{C_{7}}\Delta x_{8} +\frac{1}{R_{7}C_{7}}\Delta x_{9}\\ \Delta\dot{x}_{8}=\frac{1}{L_{8}}(-\Delta x_{7}-R_{08}\Delta x_{8})+\frac{1900 }{L_{8}}\Delta u_{3}\\ \Delta\dot{x}_{9}=\frac{1}{C_{9}}\Big{(}\frac{\Delta x_{2}-\Delta x_{9}}{R_{2}} +\frac{\Delta x_{8}-\Delta x_{9}}{R_{5}}+\frac{\Delta x_{7}-\Delta x_{9}}{R_{7} }-\frac{\Delta x_{9}}{R_{L}}\Big{)}\end{array}  \tag{8}\]\[A=\left[ \begin{array}{cccccccc}-\frac{1}{R_{1}C_{1}}&0&-\frac{1}{C_{1}}&0&0&0&0&0 &0\\ 0&-\frac{1}{R_{2}C_{2}}&\frac{0.3}{R_{3}C_{3}}&0&0&0&0&0&-\frac{1}{R_{2}C_{2}}\\ \frac{1}{C_{3}}&-\frac{0.3}{L_{3}}&-\frac{0.01}{L_{4}}&0&0&0&0&0\\ 0&0&0&-\frac{1}{R_{4}C_{4}}&0&-\frac{1}{C_{4}}&0&0&0\\ 0&0&0&0&-\frac{1}{R_{5}C_{5}}&\frac{0.004}{R_{5}C_{5}}&0&0&-\frac{1}{R_{5}C_{5}} \\ 0&0&0&\frac{1}{L_{6}}&-\frac{0.4}{L_{6}}&-\frac{0.01}{L_{6}}&0&0&0\\ 0&0&0&0&0&0&-\frac{1}{R_{7}C_{7}}&-\frac{1}{L_{7}}&\frac{1}{R_{7}C_{7}}\\ 0&0&0&0&0&-\frac{1}{L_{8}}&-\frac{R_{8}}{L_{8}}&0\\ 0&-\frac{1}{C_{6}R_{2}}&0&0&-\frac{1}{C_{6}R_{5}}&0&-\frac{1}{C_{6}R_{7}}&0&(- \frac{1}{R_{2}}-\frac{1}{R_{5}}-\frac{1}{R_{7}}-\frac{1}{R_{L}})\\ \end{array} \right] \tag{9}\] \[B(x(t))=\left[ \begin{array}{cccccccc}0&-\frac{\Delta x_{3}}{C_{ 2}}&\frac{\Delta x_{2}}{L_{3}}&0&0&0&0&0\\ 0&0&0&0&-\frac{\Delta x_{6}}{C_{5}}&\frac{\Delta x_{3}}{L_{6}}&0&0&0\\ 0&0&0&0&0&0&\frac{1900}{L_{8}}&0\end{array}