1 Introduction

In recent decades, studying the dynamic and static behaviors of MEMs, increasing their efficiency, speed, and accuracy, and presenting new MEMs models have been a matter of interest to many researchers. This attention is mainly due to MEMs small size, low energy consumption, high natural frequency, suitability for batch fabrication, and etc.

Micro tunable capacitive structures are an important example of microstructures composed of two or three electrodes. These structures act based on applied voltages induced on electrodes. Examples of such structures include tunable micro capacitors [1, 2], micro pumps [3, 4], microphones [5], gyroscopes [6, 7], accelerometers [8, 9], and micro mirrors [10,11,12]. The applied voltage between two electrodes and the changes in its magnitude changes the relative position of the capacitive electrodes and consequently causes to change in capacitance. The aforementioned structures work based on this relative displacement of electrodes. Due to the nonlinear nature of the electrostatic force applied between the two capacitive electrodes as well as the pull-in instability present in the system, the relative displacement between the electrodes cannot exceed a certain distance. Considerable relative displacements between capacitive electrodes, for example in tunable micro capacitors, is of great importance [13, 14].

Numerous studies have been conducted on the open-loop control of capacitive microstructures regarding the pull-in phenomenon and the dynamic behavior of these structures [15,16,17,18,19]. Employing open-loop controllers to precise predict and control of these structures is not always applicable because of existence of nonlinear effects, disturbance, and uncertainty in the structures. Closed-loop control is an efficient method to mitigate the unfavorable effects of disturbance and uncertainty, as well as to increase the performance reliability of in microstructures. Few works have been done on the closed-loop control of microstructures, which is quite negligible compared to the number of studies on open-loop controller. Jeon and Grunwald investigated closed loop control of MEMs-based storage device [20]. Merced et al. [21] studied closed loop control of an electrothermally actuated MEMS structure. Vagia and Tzes [22] analyzed PID control of MEMs actuator. Merced et al. [23] studied tracking of an electro-thermally actuated micro structure based on closed-loop. Lei et al. [24] applied adaptive control scheme for control of MEMs gyroscope. Mair et al. [25] investigated closed-loop modeling of micro accelerometer with wide dynamic range.

The sliding-mode control and the \(H_{\infty }\) method are two of the most important robust control methods used for tackling and reducing the uncertainty and disturbance effects. In the latter method, acquaintance with the norms and boundaries of the uncertainties and disturbance is necessary. However, the sliding-mode control is a more flexible method in contrast with \(H_{\infty }\) and widely applied to control of nonlinear systems [26,27,28].

Given the importance of closed-loop scheme to control of capacitive microstructures and considering that sliding mode is an effective method for controlling of nonlinear systems [26,27,28], application of this method for designing of controller for non-linear microstructures is appropriate. On the other hand, it is important to reduce the electrodes distance to increase the capacitance of micro capacitors. It should be noted that, in common capacitive microstructures, the distance between two electrodes can only be reached about 33% of the initial distance of electrodes [29, 30].

To achieve this end, some modification implemented in the design and fabrication process of the micro capacitors [2, 13, 14]. These changes complicated the design and construction process, as well as increased costs. So far, no comprehensive study has been done to reduce the distance of electrodes (i.e., increasing capacitive capacitance) in nonlinear micro capacitor using closed loop control method. But considerable studies have been done to reduce the distance of electrodes by using an open loop control process [2, 13, 14].

The main objective of this study is to assess the necessary conditions for employing single- and double-input sliding-mode controllers. For this purpose, this controller has been designed for both single- and double-input cases and the results have been compared. Moreover, it has been revealed that for the single-input case, the controller was unable to play its role within intervals in which the sliding surface assumed positive values. However, at negative sliding surfaces, the controller managed to accurately track and control the reference signal. It has been shown that the aforementioned issue is resolved by resorting to the double-input control method, such that the controller can control the microstructure at any sliding surface. The chattering phenomenon is among the challenging problems faced in the design of sliding-mode controllers. Various methods have been presented to deal with this issue. This study attempted to generate smooth changes in the switching of the sliding surface to overcome this phenomenon. Moreover, it was shown that by resorting to the closed-loop control method, the relative distance between the two electrodes can be decreased down to 85% of the initial distance of electrodes. As mentioned before, achieving such outcome is not feasible using open-loop control method.

2 Model description

This section presents the model of studied capacitive microstructure. This is tunable micro capacitor and comprise one or two stationary electrode(s). The movable electrode is shown in Fig. 1, which is composed of a rectangular plate (with area of \(S\)) suspended by four arms. Stiffness coefficient of each arm is \(k = \frac{12EI}{{L^{3} }}\), yielding an equivalent stiffness of \(k_{eq} = 4k\) for the movable electrode. Where \(E\), \(I = {\raise0.7ex\hbox{${bh^{3} }$} \!\mathord{\left/ {\vphantom {{bh^{3} } {12}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${12}$}}\), \(L\), \(b\) and \(h\) are Young modulus, cross section moment of inertia, length width, and thickness of each arm, respectively.

Fig. 1
figure 1

Movable electrode of parallel plates micro capacitor from top view [34]

The configuration of the microcapacitor electrodes is demonstrated in Fig. 2a, b. As shown in Fig. 2a, the movable electrode is located at a distance of \(G_{0}\) from a fixed electrode, such that an applied voltage of \(V_{1}\) exists between them. The structure of the common microcapacitors is mostly similar to the one shown Fig. 2a.

Fig. 2
figure 2

Side view of micro capacitor (a micro capacitor with one fixed electrode, b micro capacitor with two fixed electrode)

The structure depicted in Fig. 2b has recently become a matter of interest to some researchers. This structure exhibits interesting behaviors regarding topics such as instability, nonlinear dynamics, and bifurcation, which cannot observed in the regular microstructures [14, 31,32,33]. In this case, the movable electrode is located between two fixed electrodes. The initial distance between the movable electrode and the fixed electrodes is \(G_{0}\), such that applied voltages of \(V_{2}\) and \(V_{1}\) are induced between the upper and lower electrodes, respectively. The movable electrode is made of homogenous material with Young’s modulus and density of \(E\) and \(\rho\), respectively.

3 Mathematical modeling

3.1 Governing dynamic equation of micro structure

The mathematical model for the dynamic behavior of the microcapacitor is presented in this section. The dynamic governing equation of the microcapacitor is expressed in Eq. 1 [35]:

$$m\frac{{d^{2} z}}{{d\tau^{2} }} + c\frac{dz}{d\tau } + k_{eq} z = q_{elec}$$
(1)

where \(m\), \(c\), and \(q_{elec}\) denote the equivalent mass of the movable electrode, damping coefficient, and electrostatic force, respectively. Moreover, \(\tau\) represents time and \(z\) is the displacement of the movable electrode relative to the fixed lower electrode. The electrostatic force for the demonstrated capacitor of Fig. 2b equals with [32]:

$$q_{elec} = \frac{{\varepsilon_{0} SV_{1}^{2} }}{{2\left( {G_{0} - z} \right)^{2} }} - \frac{{\varepsilon_{0} SV_{2}^{2} }}{{2\left( {G_{0} + z} \right)^{2} }}$$
(2)

where \(\varepsilon_{0}\) indicates permittivity of the vacuum. The electrostatic force for the microcapacitor shown in Fig. 2a can be simply obtained by setting \(V_{2} = 0\). Note that the presented relations in Eqs. 1 and 2 can be extended to many capacitive microstructures including micro switches [31], sensors [32], and micro plates [36]. Considering \(w = \frac{z}{{G_{0} }}\) and \(t = \frac{\tau }{{t^{*} }}\), the governing dynamic equation of the micro capacitor can be obtained as follows:

$$m\frac{{G_{0} }}{{\left( {t^{*} } \right)^{2} }}\frac{{d^{2} w}}{{dt^{2} }} + c\frac{{G_{0} }}{{t^{*} }}\frac{dw}{dt} + k_{eq}G_{0} w = \frac{{\varepsilon_{0} SV_{1}^{2} }}{{2G_{0}^{2} \left( {1 - w} \right)^{2} }} - \frac{{\varepsilon_{0} SV_{2}^{2} }}{{2G_{0}^{2} \left( {1 + w} \right)^{2} }}$$
(3)

By dividing both sides of the equation by \(k_{eq} G_{0}\), we obtain:

$$\begin{aligned} & \frac{m}{{k_{eq} \left( {t^{*} } \right)^{2} }}\frac{{d^{2} w}}{{dt^{2} }} + \frac{c}{{k_{eq} t^{*} }}\frac{dw}{dt} + w = \frac{{\varepsilon_{0} SV_{1}^{2} }}{{2k_{eq} G_{0}^{3} \left( {1 - w} \right)^{2} }} - \frac{{\varepsilon_{0} SV_{2}^{2} }}{{2k_{eq} G_{0}^{3} \left( {1 + w} \right)^{2} }} \\ & \frac{{d^{2} w}}{{dt^{2} }} + c'\frac{dw}{dt} + w = \frac{{\alpha V_{1}^{2} }}{{\left( {1 - w} \right)^{2} }} - \frac{{\alpha V_{2}^{2} }}{{\left( {1 + w} \right)^{2} }} \\ \end{aligned}$$
(4)

where \(t^{*}\), \(c'\) and \(\alpha\) are defined as follows. Moreover, \(t\) represents the dimensionless time.

$$t^{*} = \sqrt {\frac{{k_{eq} }}{m}} ,c' = \frac{c}{{k_{eq} t^{*} }},\alpha = \frac{{\varepsilon_{0} S}}{{2k_{eq} G_{0}^{3} }}$$
(5)

3.2 Designing of the sliding-mode controller

Assuming \(w = x_{1}\) and \(\dot{x}_{1} = x_{2}\), the differential equation of Eq. 4 can be reformulated in the state-space form as follows:

$$\left\{ {\begin{array}{*{20}l} {\dot{x}_{1} = x_{2} } \hfill \\ {\dot{x}_{2} = - x_{1} - c'x_{2} + F_{elec} } \hfill \\ \end{array} } \right.$$
(6)

where \(F_{elec}\) is expressed as:

$$F_{elec} = \frac{{\alpha V_{1}^{2} }}{{\left( {1 - w} \right)^{2} }} - \frac{{\alpha V_{2}^{2} }}{{\left( {1 + w} \right)^{2} }}$$
(7)

In this design, the objective is to track \(x_{d}\) by \(x_{1}\), where \(x_{d}\) represents the reference or desired path. For the sake of stabilization, \(x_{d}\) is considered zero. Therefore, the formula presented in this section can be also extended to the stabilization issue. By defining the state error as \(e = x_{1} - x_{d}\), the dynamic of error is derived as \(\dot{e} = \dot{x}_{1} - \dot{x}_{d} = x_{2} - \dot{x}_{d}\). By assuming \(e = e_{1}\) and \(\dot{e}_{1} = e_{2}\), we have:

$$\left\{ {\begin{array}{*{20}l} {\dot{e}_{1} = e_{2} } \hfill \\ {\dot{e}_{2} = - x_{1} - c'x_{2} - \ddot{x}_{d} + F_{elec} } \hfill \\ \end{array} } \right.$$
(8)

In this equation, the sliding surface is considered as \(s = e_{2} + k_{s} e_{1}\), where \(k_{s}\) is a positive value. Therefore, \(\dot{s}\) is determined as follows:

$$\begin{aligned} \dot{e}_{1} & = - k_{s} e_{1} \to s = e_{2} + k_{s} e_{1} = 0 \\ \dot{s} & = \dot{e}_{2} + k_{s} \dot{e}_{1} \\ \dot{s} & = - x_{1} - c'x_{2} - \ddot{x}_{d} + k_{s} e_{2} + F_{elec} \\ \end{aligned}$$
(9)

The Lyapunov function is considered as \(V = \frac{1}{2}s^{2}\), the derivative of which yields \(\dot{V} = s\dot{s}\). By substituting \(\dot{s}\) from Eq. 9 into \(\dot{V} = s\dot{s}\), we obtain:

$$\begin{aligned} \dot{V} & = s\left( { - x_{1} - c'x_{2} - \ddot{x}_{d} + k_{s} e_{2} + F_{elec} } \right) \\ \dot{V} & = s\left( { - x_{1} - c'x_{2} - \ddot{x}_{d} + k_{s} e_{2} } \right) + \alpha s\left[ {\frac{{V_{1}^{2} }}{{\left( {1 - x_{1} } \right)^{2} }} - \frac{{V_{2}^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}} \right] \\ \dot{V} & = s\left( { - x_{1} - c'x_{2} - \ddot{x}_{d} + k_{s} e_{2} } \right) + \frac{\alpha s}{{\left( {1 - x_{1} } \right)^{2} }}\left[ {V_{1}^{2} - \frac{{\left( {1 - x_{1} } \right)^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}V_{2}^{2} } \right] \\ \dot{V} & = s\left( {\frac{{ - x_{1} - c'x_{2} - \ddot{x}_{d} + k_{s} e_{2} }}{{\frac{\alpha }{{\left( {1 - x_{1} } \right)^{2} }}}} + \left[ {V_{1}^{2} - \frac{{\left( {1 - x_{1} } \right)^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}V_{2}^{2} } \right]} \right)\frac{\alpha }{{\left( {1 - x_{1} } \right)^{2} }} \\ \end{aligned}$$
(10)

Given the above equation, \(x_{1} = 1\) and \(x_{1} = - 1\) are singularities for the governing equation. As presented in refs. [36,37,38,39], this singularity does not occur at \(x_{1} = 1\), but occurs around \(x_{1} = 0.33\) and before reaching to \(x_{1} = 1\), for common capacitive micro even nano structures. For capacitive microstructures with two conductive plates (like the microstructure of this paper) the instability gap is variable and it isn’t fixed on \(x_{1} = 0.33\), but also this instability distance never reaches to \(x_{1} = 1\) or \(x_{1} = - 1\) [31, 39]. Note that due to the non-linear nature of electrostatic force, the microstructure will become unstable before reaching \(x_{1} = 1\) or \(x_{1} = - 1\). One of the main goals of this study is to bring \(x_{1}\) closer to 1. The mentioned goal will be discussed in the results section.

The function \(f(x)\) is considered as follows:

$$f(x) = \frac{{\left| {x_{1} } \right| + \left( {c' + k_{s} } \right)\left| {x_{2} } \right| + \left| {\ddot{x}_{d} } \right| + k_{s} \left| {\dot{x}_{d} } \right|}}{{\frac{\alpha }{{\left( {1 - x_{1} } \right)^{2} }}}}$$
(11)

Note that \(f(x)\) is a positive function and, therefore, following relation holds true for \(\dot{V}\):

$$\dot{V} \le \left| s \right|f + s\frac{\alpha }{{\left( {1 - x_{1} } \right)^{2} }}\left( {\left[ {V_{1}^{2} - \frac{{\left( {1 - x_{1} } \right)^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}V_{2}^{2} } \right]} \right) = - \eta \left| s \right|$$
(12)

where \(\eta\) denotes a positive value. The stability of the sliding-mode controller is guaranteed by Eq. 12, which also provides a formula for determining the control law. Equation 12 can then be rewritten as follows:

$$s\frac{\alpha }{{\left( {1 - x_{1} } \right)^{2} }}\left( {\left[ {V_{1}^{2} - \frac{{\left( {1 - x_{1} } \right)^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}V_{2}^{2} } \right]} \right) = \left| s \right|\left( { - \eta - f} \right)$$
(13)

From which we have:

$$V_{1}^{2} - \frac{{\left( {1 - x_{1} } \right)^{2} }}{{\left( {1 + x_{1} } \right)^{2} }}V_{2}^{2} = sign\left( s \right)\frac{{\left( {1 - x_{1} } \right)^{2} }}{\alpha }\left( { - \eta - f} \right)$$
(14)

The control law based on presented sliding-mode controller is described by Eq. 14. In fact, this relation represents an explicit relationship between the system inputs, i.e. \(V_{1}\) and \(V_{2}\), and the sliding surface \(s\). Now, the control laws can be reformulated as follows:

$$\begin{aligned} s < 0 \to U_{1} & = - \frac{{\left( {1 - x_{1} } \right)^{2} }}{\alpha }\left( { - \eta - f} \right) \\ s > 0 \to U_{2} & = - \frac{{\left( {1 + x_{1} } \right)^{2} }}{\alpha }\left( { - \eta - f} \right) \\ \end{aligned}$$
(15)

where \(U_{1} = V_{1}^{2}\) and \(U_{2} = V_{2}^{2}\). It should be noted that only the control parameter \(U_{1}\) exists for the common microcapacitors (Fig. 2a), since \(U_{2} = 0\) is always zero for such structures. As demonstrated in Eq. 15, the parameter \(U_{1}\) is non-zero for \(s < 0\). However, for \(s > 0\), this parameter should be considered zero.

Therefore, for the single-input case (i.e. presented micro capacitor in Fig. 2a) and \(s > 0\), the stabilization or the tracking process can be interfered with, causing problems in the control of such system. Note that the control parameters \(U_{1}\) and \(U_{2}\) are always positive or zero.

4 Results and discussion

Design of sliding-mode controller for closed loop control of the micro capacitor has been fulfilled and presented in the previous section. This section presents and discusses the obtained results on the tracking capabilities of the capacitor using designed controller. The physical and geometrical characteristics of the tunable microcapacitor are presented in Table 1. Micro capacitor is made of silicon.

Table 1 Physical and geometrical properties of the tunable micro capacitor [40]

The controller design objective is to track the desired path \(x_{d}\). The problem has been initially studied for a common single-input tunable microcapacitor. In this case, the desired path is defined as \(x_{d} = 0.1\sin (t)\). It should be noted that \(t = {\raise0.7ex\hbox{$\tau $} \!\mathord{\left/ {\vphantom {\tau {t^{*} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${t^{*} }$}}\), where for this micro capacitor \(\frac{1}{{t^{*} }} = 1.043 \times 10^{ - 4}\). So \(t = 95.83 \times 10^{3} \tau\) and in dimensional form \(\sin t \approx \sin (95.83 \times 10^{3} )\tau\). \(x_{d}\) and \(x_{1}\) for this case are obtained and depicted in Fig. 3a. Moreover, the variations of the input control of \(U_{1}\) are shown in Fig. 3c. Variations of \(e\) with respect to time are shown in Fig. 3b. As shown in Fig. 3a, the variable \(x_{1}\) is not capable to track \(x_{d}\) across the entire path, since for such a microcapacitor, the control law holds true only for \(s < 0\), while it has no control over the system for \(s > 0\) and fails to track of \(x_{d}\). As shown in Fig. 3c, the control parameter \(U_{1}\) is zero for certain time intervals, within which, the parameter \(s\) assumes positive values.

Fig. 3
figure 3

a \(x_{1}\) and \(x_{d} = 0.1\sin (t)\) versus time for single input controller. b Error versus time for \(x_{d} = 0.1\sin (t)\) and single input controller. c \(U_{1}\) versus time for \(x_{d} = 0.1\sin (t)\) and single input controller. d Detailed view of c for time interval \(1 < t < 1.01\) (chattering phenomenon)

Comparison between Fig. 3b, c show that the tracking error value \(e\) considerably increases in time intervals for \(U_{1} = 0\). However, for \(U_{1} \ne 0\), the tracking error is negligible.

Now assume \(x_{d} = 0.1\sin t + 0.2\). For this desired path, \(x_{d}\) and \(x_{1}\) are plotted in Fig. 4a. As shown, \(x_{1}\) is able to track the \(x_{d}\) with a high accuracy. The variations of the control parameter with respect to time is also demonstrated in Fig. 4c. As shown, the input \(U_{1}\) is always higher than zero, indicating that \(s < 0\) for whole interval. The tracking error level is also depicted in Fig. 4b with respect to time. As shown, the error is negligible with respect to time, indicating the high capability of the proposed controller in controlling of the micro capacitor and tracking the reference path \(x_{d}\). The inability (of the controller) shown in Fig. 3a is due to the fact that Eq. 15 is not satisfied, since for \(s > 0\), the controller has no control over the microcapacitor. Therefore, it can be concluded that for microcapacitors, a second input is required for \(s > 0\) to take over the control system. Another challenging topic in this design is the existence of chattering phenomenon. As demonstrated in Figs. 3d and 4d, the control input changes rapidly with high frequency. In the following section, in addition to studying the double-input sliding-mode control, the chattering phenomenon and its solution are also discussed.

Fig. 4
figure 4

a \(x_{1}\) and \(x_{d} = 0.1\sin t + 0.2\) versus time for single input controller. b Error versus time for \(x_{d} = 0.1\sin t + 0.2\) and single input controller. c \(U_{1}\) versus time for \(x_{d} = 0.1\sin (t)\) and single input controller. d Detailed view of Fig. 3c for time interval \(1 < t < 1.01\) (chattering phenomenon)

In the previous part of this section, the results for controlling a single-input microcapacitor have been presented. As shown, the controller was not able to track the path of \(x_{d} = 0.1\sin t\). In this section, the control results of a micro capacitor with double-input are presented. For this case, the desired path was considered as \(x_{d} = 0.1\sin t\) similar to the previous part. The obtained results for this case are shown in Fig. 5a. The tracking error \(e\) is also demonstrated in Fig. 5b. As shown, \(x_{1}\) accurately tracks \(x_{d}\) and attention to Fig. 5b the tracking error in is negligible. The variations of the control parameters of \(U_{1}\) and \(U_{2}\) with respect to time are also plotted in Fig. 5c, d, respectively. As shown, the control parameters have a high variation frequency, and the chattering phenomenon can be observed.

Fig. 5
figure 5

a \(x_{1}\) and \(x_{d}\) versus time for double input controller. b Error versus time for double input controller. c \(U_{1}\) versus time for double input controller. d \(U_{2}\) versus time for double input controller

The abovementioned results suggest the high capability of the sliding-mode controller in controlling of the micro capacitors. In what follows, the possibility of chattering elimination and its effect on the tracking error level are discussed.

In order to eliminate the chattering phenomenon, a smoothing procedure is applied to the switching of the sliding surface. The chattering phenomenon is due to the presence of the \(sign(s)\) function in the control law, which causes instant variations in the control parameters. Three alternative functions have been considered to replace in place of function \(sign(s)\) is Eq. 14 and eliminate the chattering phenomenon: (1) \(\tanh ({\raise0.7ex\hbox{$s$} \!\mathord{\left/ {\vphantom {s \delta }}\right.\kern-0pt} \!\lower0.7ex\hbox{$\delta $}}_{1} )\), (2) the saturation function \(SAT({\raise0.7ex\hbox{$s$} \!\mathord{\left/ {\vphantom {s {\delta_{2} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\delta_{2} }$}})\), and (3) \(\frac{s}{\left| s \right| + \varepsilon }\),. where \(\delta_{1}\), \(\delta_{2}\),and \(\varepsilon\) denote infinitesimal positive values [41, 42].

The tracking error results as well as the variations of the control parameters for the function \(\tanh \left( {\frac{s}{{\delta_{1} }}} \right)\) (for \(\delta_{1} = 0.0001\)) are demonstrated in Fig. 6a, c, respectively. As shown in Fig. 6a, b, the parameter \(x_{1}\) is incapable of tracking \(x_{d}\) accurately, and the resulting error is considerable. However, as shown in Fig. 6c chattering phenomenon is entirely removed.

Fig. 6
figure 6

a \(x_{1}\) and \(x_{d}\) versus time for double input controller and application of \(\tanh (\frac{s}{{\delta_{1} }})\) instead of \(sign(s)\). b Error versus time for double input controller and application of \(\tanh (\frac{s}{{\delta_{1} }})\) instead of \(sign(s)\). c \(U_{1}\) and \(U_{2}\) versus time for double input controller and application of \(\tanh (\frac{s}{{\delta_{1} }})\) instead of \(sign(s)\)

The results for the saturation function \(SAT(\frac{s}{{\delta_{2} }})\) (for \(\delta_{2} = 0.0001\)) are also demonstrated in Fig. 7a–c, respectively. As shown, the reference path \(x_{d}\) is also not tracked accurately in this case and the tracking error is considerable.

Fig. 7
figure 7

a \(x_{1}\) and \(x_{d}\) versus time for double input controller and application of \(SAT(\frac{s}{{\delta_{2} }})\) instead of \(sign(s)\). b Error versus time for double input controller and application of \(SAT(\frac{s}{{\delta_{2} }})\) instead of \(sign(s)\). c \(U_{1}\) and \(U_{2}\) versus time for double input controller and application of \(SAT(\frac{s}{{\delta_{2} }})\) instead of \(sign(s)\)

The tracking results together with tracking error for the function \(\frac{s}{\left| s \right| + \varepsilon }\)(for \(\varepsilon = 0.001\)) are demonstrated in Fig. 8a, b. As shown, \(x_{1}\) is capable of tracking \(x_{d}\) accurately, and the error are also negligible. For this case, the variations of the control parameters \(U_{1}\) and \(U_{2}\) are demonstrated in Fig. 8c. As shown, the chattering phenomenon is entirely eliminated and it is not apparent in the variations of the control inputs. By comparing Figs. 8b and 5b, it can be concluded that employing the function \(\frac{s}{\left| s \right| + \varepsilon }\) instead of the function \(sign(s)\) increases the tracking error by a negligible amount, but eliminates the chattering phenomenon entirely in the tracking error and control parameters.

Fig. 8
figure 8

a \(x_{1}\) and \(x_{d}\) versus time for double input controller and application of \(\frac{s}{\left| s \right| + \varepsilon }\) instead of \(sign(s)\). b Error versus time for double input controller and application of \(\frac{s}{\left| s \right| + \varepsilon }\) instead of \(sign(s)\). c \(U_{1}\) and \(U_{2}\) versus time for double input controller and application of \(\frac{s}{\left| s \right| + \varepsilon }\) instead of \(sign(s)\)

Moreover, comparison between Figs. 8c and 5c and 5d shows that employing the function \(\frac{s}{\left| s \right| + \varepsilon }\) reduces the maximum applied control parameter as well as voltage.

The effects of changing the value of the parameter \(\varepsilon\) on the error level, maximum values of the control inputs, and the chattering phenomenon presented in Table 2. For this case tracking path is \(x_{d} = 0.1\sin t\). As shown, decreasing \(\varepsilon\) decreases the maximum level of tracking error, but increases the maximum value of the control parameters. Moreover, further decreases in \(\varepsilon\) leads to reoccurrence of the chattering phenomenon. As shown in this table, the chattering phenomenon occurs for \(\varepsilon \le 0.0001\).

Table 2 Effects of \(\varepsilon\) on maximum level of error, maximum values of the control inputs for tracking of \(x_{d} = 0.1\sin t\)

In what follows, the tracking of the reference path \(x_{d} = A_{0} \sin t\) is discussed with the largest possible amplitude of \(A_{0}\). The maximum \(A_{0}\) value in which the controller is able to track the \(x_{d} = A_{0} \sin t\) is 0.85, which is a considerable value (\(A_{0} = 1\) is equivalent to the impact between the movable and fixed electrodes). The variations of \(x_{1}\), \(x_{d}\), and the tracking error with respect to time are demonstrated in Fig. 9a, b. As shown, the controller accomplished to track \(x_{d}\) appropriately. In order to eliminate the chattering phenomenon, \(\varepsilon\) was set to 0.01. For this case, the variations of the control inputs are demonstrated in Fig. 9c. The maximum value of the control inputs and the maximum error for tracking of \(x_{d} = A_{0} \sin t\) with \(A_{0} = 0.8\) and \(A_{0} = 0.85\) are presented in Tables 3 and 4. As concluded, for \(\varepsilon < 0.001\), the chattering phenomenon occurs and the control parameter \(U_{1}\) is considerably increased. Therefore, for large \(A_{0}\) values, it is recommended to set \(\varepsilon \ge 0.01\).

Fig. 9
figure 9

a \(x_{1}\) and \(x_{d} = 0.85\sin \left( t \right)\) versus time for double input controller for \(\varepsilon = 0.01\). b Error versus time for double input controller and considering \(\varepsilon = 0.01\). c \(U_{1}\) and \(U_{2}\) versus time for double input controller for tracking of \(x_{d} = 0.85\sin \left( t \right)\) and considering \(\varepsilon = 0.01\)

Table 3 Effects of \(\varepsilon\) on maximum level of error, maximum values of the control inputs for tracking of \(x_{d} = 0.8\sin t\)
Table 4 Effects of \(\varepsilon\) on maximum level of error, maximum values of the control inputs for tracking of \(x_{d} = 0.85\sin t\)

As it was shown, using closed loop control, we were able to reduce the relative electrodes distance to 0.85 of initial distance, without any instability occurring. But according to the references [31,32,33,34,35,36,37,38,39] using open loop control, this distance can only be reduced to about 0.33 times of the initial gap of the two electrodes. This condition also occurs for nanostructures that have been stimulated by electrostatic force [38, 43]. It should be noted that this instability is due to the nonlinear nature of electrostatic force.

The maximum value of the control inputs as well as the tracking error are presented in Table 5 for different \(A_{0}\) values. As shown, the maximum value of control input is 3.79 for \(A_{0} = 0.85\). Furthermore, by increasing \(A_{0}\), the maximum amount of control inputs and the tracking error are increased. In addition, for \(\varepsilon = 0.01\), no chattering is observed.

Table 5 Maximum level of error, maximum values of the control inputs for tracking of \(x_{d} = A_{0} \sin \left( t \right)\) and considering \(\varepsilon = 0.01\)

5 Conclusion

This study investigated the application of sliding-mode method to closed-loop control of capacitive microstructures subjected to nonlinear electrostatic forces. For this purpose, the governing dynamic equations of the considered structures were presented for both single- and double-inputs cases. The sliding-mode controller was then designed for tracking of the considered microcapacitor. The simulation results were extracted and presented for both single- and double-inputs cases. The results indicated that accurate tracking is not feasible in the single-input case where switching occurs in the sliding surface. However, accurate control can only be achieved in cases where the sliding surface is negative. Moreover, it was shown that accurate control and tracking is possible for any sliding surface in the double-input case. Furthermore, the effect of the chattering phenomenon on the control parameters and the tracking error was also examined. This phenomenon was eliminated by smoothing the switching of the sliding surface. For this case, the SAT function was used instead of the \(sign\left( s \right)\) function, since the origin of chattering phenomenon is due to the discontinuity of \(sign\left( s \right)\) function at \(s = 0\). The results showed that as the \(\varepsilon\) approaches zero, the possibility of the chattering phenomenon may be increased, furthermore with decreasing of \(\varepsilon\), the maximum value of the applied voltage increases, but the maximum amount of tracking error decreases.

The results of the double-input case showed that the closed-loop control can be used to reduce the relative distance of movable and fixed electrode down to 85% of the initial value, where, this reduction is not feasible using the open-loop control scheme. The obtained results show that with increasing \(A_{0}\) from 0.1 to 0.85, the maximum amount of applied voltage value increases, and the tracking error also increases. It was also shown that there is no chattering phenomenon for \(\varepsilon = 0.01\).