## 3 The Control Strategy of FMSS for Maximum Consumption of DG
### Constraints of Distribution Network Operation Including Flexible Multi-State Switch  
#### Operating Constraints of Flexible Multistate Switches  
This paper takes FMSS of three ports as an example to study the constraint conditions of power flow control of each port when FMSS is in a steady state operation. The topology of the three-terminal flexible multi-state switch is shown in Figure 3. Where, \(A\) end and \(B\) end are running in the rectifier state, and \(C\) end is running in the inverter state. \(Z_{A}\), \(Z_{B}\) and \(Z_{C}\) are the ac side impedance at the three ends of the device. In general, the rated operating loss of the flexible multi-state switches is approximately 3%-5% of the rated power [22].  
When analyzing the operating constraints of FMSS, only the equality constraints and inequality constraints of the three ports active power and the reactive power of FMSS are considered. When FMSS is running, the active power flows between the three ends of the power grid through the dc side, and the reactive power is only exchanged between this port and the power grid connected with this port. The output range is restricted by the port capacity and the active power of the port. Therefore, the equality constraint is mainly for the coupling relationship between the active power of each port, and the inequality constraint is for the inequality conditions of the active power, reactive power and capacity of each port.  
The three-port FMSS can be equivalent to the three-port passive network for analysis. According to the principle of conservation of active power, the equation constraint conditions of FMSS are shown in (14). The inequality constraints of FMSS can be obtained by defining active power, reactive power, apparent power and capacity, as shown in (15).  
\[\left\{\begin{array}{c}P_{SA}^{\text{FMSS}}+P_{SB}^{\text{FMSS}}+P_{SC}^{ \text{FMSS}}+P_{\text{loss}}^{\text{FMSS}}=0\\ P_{\text{loss}}^{\text{FMSS}}=\frac{k_{\text{cs}}}{100}{\left[{\left({S_{SA}^ {\text{FMSS}}}\right)^{2}+\left({S_{SB}^{\text{FMSS}}}\right)^{2}+\left({S_{ SC}^{\text{FMSS}}}\right)^{2}}\right]}\\ \end{array}\right. \tag{14}\]  
\[\left\{\begin{array}{c}-\sqrt{{\left({S_{A}^{\text{FMSS}}}\right)^{2}-\left( {P_{SA}^{\text{FMSS}}}\right)^{2}}}\leq Q_{SA}^{\text{FMSS}}\leq+\sqrt{{ \left({S_{A}^{\text{FMSS}}}\right)^{2}-\left({P_{SA}^{\text{FMSS}}}\right)^{2}} }\\ -\sqrt{{\left({S_{B}^{\text{FMSS}}}\right)^{2}-\left({P_{SB}^{\text{FMSS}}} \right)^{2}}}\leq Q_{SB}^{\text{FMSS}}\leq+\sqrt{{\left({S_{B}^{\text{FMSS}}} \right)^{2}-\left({P_{SB}^{\text{FMSS}}}\right)^{2}}}\\ -\sqrt{{\left({S_{C}^{\text{FMSS}}}\right)^{2}-\left({P_{SC}^{\text{FMSS}}} \right)^{2}}}\leq Q_{SC}^{\text{FMSS}}\leq+\sqrt{{\left({S_{C}^{\text{FMSS}}} \right)^{2}-\left({P_{SC}^{\text{FMSS}}}\right)^{2}}}\\ \end{array}\right. \tag{15}\]  
where \(P_{SA}^{\text{FMSS}}\), \(P_{SB}^{\text{FMSS}}\), \(P_{SC}^{\text{FMSS}}\) are the active power exchanged between the three ports of the flexible multi-state switch and the distribution system, respectively. \(P_{loss}^{\text{FMSS}}\) is the operating loss of the flexible multi-state switch, \(k\) is the loss coefficient, generally 3-5, \(Q_{SA}^{\text{FMSS}}\), \(Q_{SB}^{\text{FMSS}}\), \(Q_{SC}^{\text{FMSS}}\) are the reactive power exchanged between the three ports of the flexible multi-state switch and the distribution system, respectively. \(S_{SA}^{\text{FMSS}}\), \(S_{SB}^{\text{FMSS}}\), \(S_{SC}^{\text{FMSS}}\) are the instantaneous apparent power at each port of FMSS, respectively. \(S_{A}^{\text{FMSS}}\), \(S_{B}^{\text{FMSS}}\), \(S_{C}^{\text{FMSS}}\) are the rated capacity of the three ports of FMSS, respectively.  
Figure 3: The topology of the three-terminal flexible multi-state switch.