## 3 Theory Analysis  
A prevalent method to analyze the directivity of antennas is to investigate the surface electric currents \(J_{s}\) on the patch, and then one can calculate the radiating pattern using the weighted function \(U(\theta,\,\phi)\) of antenna directivity [16]. The plots of surface currents density are shown in Figure 4 for two different states (the relative value of surface currents represented by rainbow color, red and violent explicate maximum and minimum, respectively). However, understanding the radiation from these currents requires extra effort, since the surface currents density distribution \(\mathbf{J_{s}}\) is unknown and is hard to obtain. Furthermore, the integral in the region where \(\mathbf{J_{s}}\) exists is hard to solve  
\[\left\{ \begin{array}{l}U\left(\theta,\,\varphi\right)=\int\mathbf{J_{s}}\left(x^ {\prime},y^{\prime},z^{\prime}\right)e^{i\Omega}d\
u^{\prime}\\ \Omega=k_{0}\left(x^{\prime}\text{sin}\theta\text{cos}\varphi+y^{\prime}\text {sin}\theta\text{sin}\varphi+z^{\prime}\text{cos}\theta\right)\end{array} \right. \tag{3}\]  
where, \(U(\theta,\,\phi)\) is the weighted function of antenna directivity, \(k_{0}\) is the wavenumber in free space, \((x^{\prime},y^{\prime},z^{\prime})\) is the coordinate of the source point, \(\
u^{\prime}\) represents the region where \(\mathbf{J_{s}}\) exists, and \((\theta,\,\phi)\) is the angle in the spherical coordinate frame, respectively. Instead, plotting the electric fields on the patch, the electric field vector addition method is employed in the far-field region to evaluate far-field distribution. Figure 5a shows the distribution of the electric field while the RF MEMS switches were replaced by conductor patches, in order to simplify the complexity of radiating problems. In contrast, the electric field distribution of an antenna using RF MEMS switches was demonstrated in Figure 5b, and one can conclude that the electric field distribution is almost unchanged by RF MEMS switches. The differences between Figures 5a and 5b are mainly caused by the impact of sector stubs, but the maximum of the distribution of the electric field is almost unchanged and has no effect on the analysis process for the rest of this paper. Hence, the far-field of the antenna will be estimated by using conductor-connected patches instead of RF MEMS switches. It is easy to conclude that the far-field radiation is principally produced by upper and lower slots of main and assistant radiating patches (shown in Figure 5), when the left switch is in the up state and right is in the down state. The same conclusion can be applied to other modes where the switches were in the different states. To simplify, the radiating field was evaluated by vector field addition of the upper and lower slots of the main and assistant radiating patches. The antenna radiation dominated by radiating slots is annotated in Figure 5a,b, and the far-field can be calculated by equivalent magnetic current model [17]. The electrical vector potential generated by equivalent magnetic currents of main and assistant patch radiating slots are \(\mathbf{F_{m}}\) and \(\mathbf{F_{a}}\), respectively  
\[\left\{ \begin{array}{l}\mathbf{F_{m}}\propto-\hat{z}\frac{1}{R}e^{-j_{0}R}\cdot \frac{\sin(k_{0}k_{\text{ins}}\theta\cdot\cos\varphi)}{k_{0}\text{ins}\theta \cdot\cos\theta}\cdot\frac{\sin\left(\frac{1}{2}k_{0}\text{in}w_{\text{cos}} \cos\theta\right)}{k_{0}\text{cos}\theta}\\ \mathbf{F_{a}}\propto-\hat{z}\frac{1}{[R-A]}e^{-j_{0}|R-A|}\cdot\frac{\sin(k_{0}k_ {\text{ins}}\theta\cdot\cos\varphi)}{k_{0}\text{ins}\theta\cdot\cos\varphi} \cdot\frac{\sin\left(\frac{1}{2}k_{0}\text{in}x_{\text{cos}}\theta\right)}{k_ {0}\text{cos}\theta}\end{array} \right.