1 Introduction

In recent years, the topic of nonlinear control has attracted more and more attention as well as research enthusiasm. This is because: on the one hand, the advent of microprocessors with high performance has made the implementation of nonlinear controllers become relatively simple; on the other hand, modern technologies (such as high-accuracy robots and high-performance aircrafts) are demanding control systems with much more stringent design specifications [1, 2]. Many researchers have devoted much effort to the development and applications of nonlinear control methods [1,2,3,4,5,6,7,8,9,10]. Because of the inherently nonlinear, unstable, and underactuated characteristics, various types of inverted-pendulum models have been widely developed and investigated in both academia and industry [11,12,13,14,15,16,17,18,19,20,21,22]. Being a classical control example, the celebrated inverted-pendulum-on-a-cart (IPC) system has been used as a benchmark to test nonlinear control methods [13,14,15,16,17]. Therefore, the research of control methods for the IPC system has important theoretical and practical significance.

According to the control purposes of inverted pendulum, the control of the IPC system can be generally divided into three aspects, i.e., swing-up control [23, 24], stabilization control [25, 26], and tracking control [27, 28]. Specifically, the swing-up control is basically used to swing up the pendulum from the stable pendant position toward the unstable upward position; the stabilization (or say, balance) control is to maintain the pendulum at its upright position; and the tracking control is to achieve the purpose that the cart or the pendulum can track a desired trajectory, which is often more difficult to realize than the balance control. Owing to the important roles of the IPC system, many control methods have been put forward by researchers. For example, the dynamics of an inverted pendulum with delayed feedback control has been studied in [13]. Zhang et al. [29] have investigated and developed an effective controller design method to achieve the cart path tracking control on an inverted-pendulum system. In [14], a Lyapunov-based controller has been developed to stabilize the inverted pendulum cart system. In [30, 31], fuzzy controllers have been presented for the stabilization control of inverted pendulum systems. In addition, Mazenc and Praly [32] have presented a control law based on the technique consisting of adding integrators to handle the control problems of the IPC system. It is worth pointing out that, for almost all of the aforementioned methods, the initial pendulum angles of the IPC system are all assumed to be above the horizontal position or even located near the upright position with a small angle deviation from the vertical line, which means that the swing-up part has not been included in those control schemes. That is to say, the problem of getting into the vertically upward region, i.e., the swinging up, has typically been considered and investigated separately [23, 24, 33]. On the other hand, a few literatures [17, 25, 26] have considered such a combined problem, but they mainly focus on addressing the swing-up control and the stabilization control of the IPC system, and often require complicated switching between swinging up and control around the upright position. To the best of the authors’ knowledge, up to now, the unified controller has not been presented and investigated to perform and realize the pendulum tracking control and the swing-up control simultaneously.

In recent years, a special class of neural dynamics has been exploited for the solution of time-varying (or say, dynamic) problems [34,35,36,37,38,39,40,41,42]. As this neural dynamics method proposed by Zhang et al. zeroes out each element of the error function, it is named as zeroing dynamics (also known as Zhang dynamics, ZD) method [34,35,36,37]. Specifically, ZD is designed on the basis of an indefinite matrix-/vector-valued error function, and takes full advantage of the time-derivative information of time-varying coefficients. The ZD method is an error-based dynamic method, of which the core is the ZD design formula that forces each element of the error function to converge to zero exponentially. Such an idea can actually be found in the control field, i.e., forcing the error between the actual output of the considered system and the desired output to be zero (or near zero in practice) [41]. Differing from the ZD method, the conventional gradient dynamics (GD) is designed on the basis of a scalar-valued nonnegative error function (termed energy function). The GD method is an energy-based minimization method, of which the core is the GD design formula such that the minimum point of the energy function (i.e., a form of error function) can be reached along the negative gradient direction [43]. Besides, the GD method designed intrinsically for the solution of static (or say, time-invariant) problems has been extended to time-varying problems solving [35, 37, 43,44,45,46,47,48]. Lately, it has been found that, by means of the GD method, the division operation can be transformed into a generalized version containing no division, which is actually a time-varying minimization problem [44]. Thus, the GD method can be used to design a singularity-conquering controller in a division-free manner, which gets rid of the potential possibility of generating singularities, and thus remains valid at the singularities encountered during the tracking-control process. It is worth pointing out that both of the two methods aim at forcing the error functions to be zero, which is essentially consistent with the objective of tracking control. By following the above control strategies about the ZD and GD methods, from the viewpoint of dynamic problems solving, the controllers are designed for the control of pendulum tracking (including swinging up) of the IPC system in a new manner. To be more specific, in this paper, by combining the ZD and GD methods together, which is termed zeroing-gradient (ZG) method, two nonlinear controllers are then designed for the pendulum control of the IPC system; i.e., the so-called ZG controllers. Moreover, according to the numbers of times of utilizing ZD and GD methods, such two controllers are referred to as z2g0 controller and z2g1 controller, respectively. By employing the ZD method twice and without using the GD method, the z2g0 controller is thus obtained. By contrast, the z2g1 controller is developed by using the ZD method twice and the GD method once.

The control objective of this work is to swing up the pendulum from the stable pendant position to the unstable upright position, and then let the pendulum track a desired trajectory effectively. As we may know, there usually exists a control singularity when the pendulum is horizontal. This singularity problem would directly lead to the failure of swinging up for the conventional controllers, which thus makes the control process complicated to realize. To address the singularity problem, a global stabilization strategy for an inverted pendulum has been presented in [26], which uses actuator saturation to handle the singularity, and switches the reference position to realize the global stabilization of the IPC system. However, though the IPC system with singularity can be controlled by using the stabilization control, that approach may cost much in terms of implementation and complicate the stability analysis. Compared with the stabilization control strategy, the singularity-conquering ZG controller proposed in this paper not only realizes the simultaneous control of pendulum swinging up and pendulum angle tracking, but also solves the singularity problem elegantly in a unified form and without using any switching strategy. Besides, it is worth pointing out here that this paper mainly focuses on designing and investigating a ZG controller to achieve the control of pendulum tracking (including swinging up) instead of the stabilization control.

2 ZG control method and related work

In this section, for better readability, the basic principle of the proposed ZG control method as well as the general design procedure of a singularity-conquering ZG controller is firstly discussed in detail. Afterward, the related work is introduced, and the comparisons between the ZG control method and the optimal control method are presented.

2.1 ZG control method

For better illustrating the basic principle of the proposed ZG control method as well as the general design procedure of a singularity-conquering ZG controller, the multiple-input and multiple-output nonlinear system is taken as an illustrative example. Consider the following multiple-input and multiple-output (MIMO) nonlinear system:

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{\mathbf {x}}=\mathbf {f}(\mathbf {x},\mathbf {u}),\\ \mathbf {y}=\mathbf {h}(\mathbf {x},\mathbf {u}), \end{array}\right. } \end{aligned}$$

where the system state vector \(\mathbf {x}=[x_1,x_2,\ldots ,x_n]^{{\text{ T }}}\in \mathbb {R}^{n}\), the system control input vector \(\mathbf {u}=[u_1,u_2,\ldots ,u_m]^{{\text{ T }}}\in \mathbb {R}^{m}\), and the system output vector \(\mathbf {y}=[y_1,y_2,\ldots ,y_m]^{{\text{ T }}}\in \mathbb {R}^{m}\). \(\mathbf {f}(\mathbf {x},\mathbf {u})=[f_1(\mathbf {x},\mathbf {u}),f_2(\mathbf {x},\mathbf {u}), \ldots ,f_n(\mathbf {x},\mathbf {u})]^{{\text{ T }}}\in \mathbb {R}^{n}\) and \(\mathbf {h}(\mathbf {x},\mathbf {u})=[h_1(\mathbf {x},\mathbf {u}),h_2(\mathbf {x},\mathbf {u}), \ldots ,h_m(\mathbf {x},\mathbf {u})]^{{\text{ T }}}\in \mathbb {R}^{m}\) both are the continuous and smooth function vectors, and \(\mathbf {y}_\text {d}=[y_{\text {d}1},y_{\text {d}2},\ldots ,y_{\text {d}m}]^{{\text{ T }}}\in \mathbb {R}^{m}\) is the given smooth and bounded desired output vector. The tracking control objective of the above system is to design a controller such that the system output vector \(\mathbf {y}\) tracks the desired output vector \(\mathbf {y}_\text {d}\) and the corresponding tracking-error vector \(\mathbf {e}=\mathbf {y}-\mathbf {y}_\text {d}\) asymptotically approaches zero (or near zero in practice). In order to design a ZG controller for the tracking control of MIMO nonlinear system, the general framework of ZG design method is presented as follows.

The first step of ZG design method: According to the ZG controller design method, one needs to repeatedly construct a series of zeroing functions (ZFs) with regard to \(y_{1}\) and \(y_{\text {d}1}\), and apply the ZD design formula \(\dot{v}=-\lambda v\), until the expansion of ZF includes the explicit expression of \(\mathbf {u}\) (specifically, including the component of \(\mathbf {u}\)), such as the \(\varphi _1\)th ZF \(z_{1\varphi _1}(\mathbf {x},\mathbf {u})\) with \(\varphi _1\) being a positive integer. By this time, the first step of ZG design method is finished. Thus, define the ZF vector in the first step as below (which is actually a scalar in this case):

$$\begin{aligned} z_{1}(\mathbf {x},\mathbf {u})=z_{1\varphi _1}(\mathbf {x},\mathbf {u})\in \mathbb {R}. \end{aligned}$$

It is worth pointing out here that if the explicit expression of \(\mathbf {u}\) can still not be obtained, no matter how many ZFs are constructed, such a ZG controller cannot be designed for the nonlinear system to track the desired output \(y_{\text {d}1}\). Then, proceed to the second step.

The second step of ZG design method: Construct a series of ZFs with regard to \(y_{2}\) and \(y_{\text {d}2}\), and apply the ZD design formula, until the expansion of ZF includes the explicit expression of \(\mathbf {u}\), such as the \(\varphi _2\)th ZF \(z_{2\varphi _2}(\mathbf {x},\mathbf {u})\) with \(\varphi _2\) being a positive integer. If the explicit expression of \(\mathbf {u}\) can still not be obtained, no matter how many ZFs are constructed, such a ZG controller cannot be designed for the nonlinear system to track the desired output \(y_{\text {d}2}\). Similar to the first step, define the following ZF vector in the second step:

$$\begin{aligned} z_{2}(\mathbf {x},\mathbf {u}) =\left[ z_{1\varphi _1}(\mathbf {x},\mathbf {u}),z_{2\varphi _2} (\mathbf {x},\mathbf {u})\right] ^{{\text{ T }}}\in \mathbb {R}^2. \end{aligned}$$

The third step of ZG design method: By following the above two steps, repeatedly construct a series of ZFs with regard to \(y_{3}\) and \(y_{\text {d}3}\) and apply the ZD design formula. At last, the \(\varphi _3\)th ZF \(z_{3\varphi _3}(\mathbf {x},\mathbf {u})\) with \(\varphi _3\) being a positive integer is obtained. Similar to the above two steps, the ZF vector in the third step can be defined as

$$\begin{aligned} z_{3}(\mathbf {x},\mathbf {u})=\left[ z_{1\varphi _1}(\mathbf {x}, \mathbf {u}),z_{2\varphi _2}(\mathbf {x},\mathbf {u}) ,z_{3\varphi _3}(\mathbf {x},\mathbf {u})\right] ^{{\text{ T }}}\in \mathbb {R}^3. \end{aligned}$$

Similarly, if the explicit expression of \(\mathbf {u}\) can still not be obtained, no matter how many ZFs are constructed, such a ZG controller cannot be designed for the nonlinear system to track the desired output \(y_{\text {d}3}\ldots \)

The m th step of ZG design method: Similar to the above design procedures, the \(\varphi _m\)th ZF \(z_{m\varphi _m}(\mathbf {x},\mathbf {u})\) with regard to \(y_{m}\) and \(y_{\text {d}m}\) can be obtained, and then the following ZF vector in the mth step is defined:

$$\begin{aligned} z_{m}(\mathbf {x},\mathbf {u})= & {} \left[ z_{1\varphi _1}(\mathbf {x},\mathbf {u}),z_{2\varphi _2}(\mathbf {x},\mathbf {u}), z_{3\varphi _3}(\mathbf {x},\mathbf {u}),\ldots ,\right. \\&\left. z_{m\varphi _m}(\mathbf {x},\mathbf {u})\right] ^{{\text{ T }}}\in \mathbb {R}^m. \end{aligned}$$

Similar to the above \((m-1)\) steps, if the explicit expression of \(\mathbf {u}\) can still not be obtained, no matter how many ZFs are constructed, such a ZG controller cannot be designed for the nonlinear system to track the desired output \(y_{\text {d}m}\). Then, proceed to the last step.

The last step of ZG design method: First of all, an energy function is defined as \(\varepsilon =\Vert z_{m}\Vert _2^2/2\). Then, the GD design formula is adopted as \(\dot{\mathbf {u}}=-\gamma \partial \varepsilon /\partial \mathbf {u}\). Finally, by substituting \(\varepsilon \) into the GD design formula, a ZG controller in the form of \(\dot{\mathbf {u}}\) can be obtained for the tracking control of MIMO nonlinear system. It is worth particularly pointing out that a ZG controller in the form of u (specifically, a ZD controller) can also be obtained without using the last step of ZG design method and that the above ZG controller in the form of \(\dot{\mathbf {u}}\) can conquer the singularity problem effectively.

Fig. 1
figure 1

Schematic of IPC system

2.2 Related work

Recently, a neural network-based adaptive dynamic surface control has been presented in [27] for the pendulum angle tracking control of the IPC system. There are also a number of other control techniques available for tracking control of the IPC system, such as optimal control [28], backstepping control [49], proportional-integral-derivative control [50], and sliding mode control [51]. However, it is worth pointing out that most of those methods are just designed for the cart path tracking control of the IPC system. To the best of the authors’ knowledge, the investigation on the simultaneous control of pendulum swinging up and pendulum angle tracking has rarely been studied before, which is exactly the main motivation of the present research. For readers’ convenience, the detailed comparisons of the ZG control method with the optimal control method as well as the backstepping control method will be carried out systematically in ensuing Sect. 4 to clarify the differences and advantages of the proposed ZG control method.

Moreover, in the authors’ previous studies, the ZD method and GD method have generally been exploited for nonlinear problems solving independently and comparatively, e.g., [41, 44, 46], but been hardly ever considered combining them together for the control of pendulum tracking (including swinging up) of IPC system. Specifically, in [41], the applications of the Z-type dynamic method (i.e., the ZD method) to solve the population control problem of the classical predator–prey Lotka–Volterra model have been illustrated; in [44], a GD-aided IOL (input–output linearization) controller has been proposed for the tracking control of affine-form nonlinear system with loose condition on relative degree; in [46], Zhang neural dynamics and gradient neural dynamics have been presented and compared for solving online nonlinear time-varying equations. Differing from the previous work, in this paper, the ZD method and GD method are combined to utilize the advantage of each method as well as the superiority of their combination for the pendulum tracking control of the IPC system.

3 Mathematical model of IPC system

It is known that the IPC system is an inherently unstable system with nonlinear and underactuated characteristics. This system is widely used as a conventional mathematical model of control in academic researches. Also, in this paper, the control of pendulum tracking (including swinging up) is investigated on the basis of the mathematical model of the IPC system as shown in Fig. 1. The standard assumptions are considered, i.e., massless rod and point masses. Let \((m_\text {c}, p)\) be the mass and position of the cart, which can move freely on the horizontal plane. In addition, \(m_\text {p}\) is the mass of the pendulum, concentrated in the ball, \(\theta \) is the angle between the vertical line and the pendulum (positive clockwise), and l is the length of the pendulum. In some practical applications, the investigated system may also have a rotation stiffness (denoted by R), which can be mathematically formulated as \(R=M/\theta =aI/\theta \), where M is the applied moment, I is the moment of inertia, a is the angular acceleration, and \(\theta \) is the rotation angle. Evidently, there exists a certain relationship between the rotation stiffness R and the moment of inertia I. By utilizing the Newton’s second law or Euler–Lagrange formulation, the dynamics of the complete system can be obtained as

$$\begin{aligned} \begin{bmatrix} m_\text {p}+m_\text {c}&\quad m_\text {p}l \cos \theta \\ m_\text {p}l\cos \theta&\quad I+m_\text {p}l^2 \end{bmatrix} \begin{bmatrix} \ddot{p}\\ \ddot{\theta } \end{bmatrix}= & {} \begin{bmatrix} m_\text {p}l \dot{\theta }^2\, \sin \theta -b\dot{p}\\ m_\text {p}gl \,\sin \theta \end{bmatrix}\nonumber \\&+\begin{bmatrix} u\\ 0 \end{bmatrix}, \end{aligned}$$
(1)

where g is the gravitational acceleration constant, b is the coefficient of viscous friction for motion of the cart, and u is the control input of the IPC system, corresponding to the horizontal force applied to the cart. Note that, for the convenience of further research, it is assumed that the moment of inertia (or say, the rotation stiffness) of the IPC system is negligible (i.e., \(I\approx 0\)), as done in [50, 52, 53]. According to Eq. (1), the state equations of the IPC system can be expressed as

$$\begin{aligned} \left\{ \begin{array}{lll} \dot{x}_1=x_2,\\ \dot{x}_2=\frac{\displaystyle u-bx_2+m_\text {p}(lx_4^2-g\cos x_3)\sin x_3}{\displaystyle m_\text {c}+m_\text {p}\sin ^2x_3},\\ \dot{x}_3=x_4,\\ \dot{x}_4=\frac{\displaystyle (m_\text {c}+m_\text {p})g\sin x_3-(u-bx_2+m_\text {p}lx_4^2 \sin x_3)\cos x_3}{\displaystyle l(m_\text {c}+m_\text {p}\sin ^2x_3)}, \end{array} \right. \end{aligned}$$
(2)

where \(x_1=p\), \(x_2=\dot{p}\), \(x_3=\theta \), and \(x_4=\dot{\theta }\) are selected as state variables. Evidently, \(x_2\) and \(x_4\) correspond to the velocity of the cart and the angular velocity of the pendulum, respectively. In addition, let the output of the IPC system \(y=\theta =x_3\). This paper aims at developing a control law that can combine swing-up control and tracking control of the pendulum for IPC system (2).

4 Controller design for IPC system

In the section, based on the ZD and GD methods, z2g0 and z2g1 controllers are designed for the pendulum tracking control of IPC system (2). Throughout the rest of the paper, the desired trajectory \(y_\text {d}\) and its derivatives up to a sufficiently high order are assumed to be known and bounded.

4.1 Design of z2g0 controller

In order to construct the z2g0 controller, the ZD method is exploited two times, while the GD method is not used. Specifically speaking, the following three steps are adopted to develop the z2g0 controller.

In the first step, by following ZD method [35,36,37], the first zeroing function (ZF) is defined as

$$\begin{aligned} v_1=y-y_\text {d}=x_3-y_\text {d}. \end{aligned}$$
(3)

Then, the ZD design formula is employed:

$$\begin{aligned} \dot{v}_1=-\lambda _1 v_1, \end{aligned}$$
(4)

where \(\lambda _1 >0 \in \mathbb {R}\) stands for a positive design parameter used to scale the convergence rate of the ZD solution. Substituting (3) into (4), one can have \(\dot{x}_3-\dot{y}_\text {d}= -\lambda _1 (x_3-y_\text {d})\).

In the second step, to generate a direct relationship between the output y and the input u, the second ZF is defined as \(v_2=\dot{x}_3-\dot{y}_\text {d}+\lambda _1 (x_3-y_\text {d})\). Afterward, applying the ZD formula (i.e., \(\dot{v}_2=-\lambda _2 v_2\)) once more, one can obtain

$$\begin{aligned} \dot{x}_4-\ddot{y}_\text {d}+\lambda _1 (x_4-\dot{y}_\text {d})=-\lambda _2 \left( x_4-\dot{y}_\text {d}+\lambda _1 (x_3-y_\text {d})\right) . \end{aligned}$$
(5)

Finally, defining \(f_{1}=\ddot{y}_{\text {d}}+(\lambda _1+\lambda _2)(\dot{y}_{\text {d}}-x_4)+\lambda _1 \lambda _2 (y_{\text {d}}- x_3)\), which is a function of the state variables, and combining equations (2) and (5), one can obtain a nonlinear controller in the form of u:

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} f_{1}&{}=\ddot{y}_{\text {d}}+(\lambda _1+\lambda _2)(\dot{y}_{\text {d}}-x_4)+\lambda _1 \lambda _2 (y_{\text {d}}- x_3),\\ f_2&{}=l(m_\text {c}+m_\text {p}\sin ^2x_3),\\ f_3&{}=(m_\text {c}+m_\text {p})g\sin x_3,\\ f_4&{}=bx_2-m_\text {p}lx_4^2\sin x_3,\\ u&{}=f_4-\frac{\displaystyle f_1f_2-f_3}{\displaystyle \cos x_3}. \end{aligned} \end{array}\right. } \end{aligned}$$
(6)

For presentation convenience, the above controller can be termed z2g0 controller, in view of the fact that the ZD method is exploited twice and without using the GD method during the controller design procedure.

Through the above three steps, a concise z2g0 controller is obtained for the tracking control of IPC system (2). This controller design strategy can also be applied to many other nonlinear systems. It is noted that, similar to other conventional controllers, the z2g0 controller has a fundamental drawback, i.e., (6) has singularities at \(x_3=\theta =(k+1/2)\pi \) with \(k=0, \pm 1, \pm 2, \ldots \). In other words, when the pendulum is horizontal, controller (6) will collapse. This means that z2g0 controller (6) cannot achieve the swing-up control.

4.2 Design of z2g1 controller

To remedy the basic drawback (i.e., the singularity problem) of z2g0 controller (6), one can adopt the ZD and GD methods in a unified manner [54] and then propose the z2g1 controller for the pendulum control of IPC system (2).

Specifically, given z2g0 controller (6), one can first define \(h=\cos x_3(u-f_4)+(f_1f_2-f_3)\). Evidently, in order to implement the pendulum control, h should theoretically be zero. Subsequently, energy function \(\phi =h^2/2\) is constructed accordingly. Finally, employing the GD design formula, i.e., \(\dot{u}=-\gamma \partial \phi /\partial u\), with \(\gamma >0 \in \mathbb {R}\) used to scale the convergence rate of the GD solution, one can obtain a nonlinear controller in the form of \(\dot{u}\):

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} f_{1}&{}=\ddot{y}_{\text {d}}+(\lambda _1+\lambda _2)(\dot{y}_{\text {d}}-x_4)+\lambda _1 \lambda _2 (y_{\text {d}}- x_3),\\ f_2&{}=l(m_\text {c}+m_\text {p}\sin ^2x_3),\\ f_3&{}=(m_\text {c}+m_\text {p})g\sin x_3,\\ f_4&{}=bx_2-m_\text {p}lx_4^2\sin x_3,\\ \dot{u}&{}=-\gamma \cos x_3 h =-\gamma \cos x_3 \left( \cos x_3(u-f_4)\right. \\ &{}\quad \left. +\,\,(f_1 f_2-f_3)\right) , \end{aligned} \end{array}\right. } \end{aligned}$$
(7)

for the pendulum control of IPC system (2). Evidently, such a controller is designed by combining the ZD and GD methods, i.e., containing two procedures. Specifically, the ZD method is used twice and the GD method is used once. Thus, controller (7) can be termed z2g1 controller for comparative purposes. Intuitively, z2g1 controller (7) has no division operation and thus has no singularity. That is to say, the z2g1 controller can conquer the singularity problem, which means that the pendulum can pass the horizontal position. As a result, z2g1 controller (7) can achieve the pendulum tracking control and swing-up control simultaneously.

Remark 1

As mentioned above, coefficients \(\lambda _1\), \(\lambda _2\) and \(\gamma \) are used as the design parameters. It is evident that the ZG controllers are designed with only one restriction, i.e., design parameters being larger than zero. Basically speaking, the control of a ZG controller can be effective, provided that such a restriction is satisfied. Moreover, the basic principle on the choice of design parameters can be outlined as follows. In general, if the values of design parameters become larger, the convergence rate of control process is faster and the tracking error is smaller. Thus, the control effectiveness is directly proportional to the values of design parameters; in other words, the tracking error is inversely proportional to the values of design parameters. Thus, the values of design parameters need to be set sufficiently large or selected appropriately for simulative purposes [35, 44]. In the numerical tests for a specific example, one can try different values of the design parameters to show their effects on the tracking performance and then to determine their optimal values or intervals for usage. Besides, in the authors’ previous work [44] as well as in this paper, the singularity-conquering property of the GD method has been theoretically analyzed and numerically substantiated. Theoretically speaking, when the value of the GD design parameter tends to infinity, the upper bound of the tracking error of the GD-aided controller would converge toward zero. On the other hand, from Theorem 1 in the ensuing Sect. 5, one can know that the tracking error of the IPC system equipped with the z2g0 controller converges to zero exponentially. Therefore, it can be concluded that, even though the control (6) (i.e., the z2g0 controller) is modified as equation (7) by using the GD method, the characteristics of control (6) can still be kept up, with the GD design parameter being sufficiently large.

Remark 2

For better understanding and comparative purposes, the differences between the ZG control method and the optimal control method are presented as below [28, 41, 44, 54,55,56,57,58].

  1. 1.

    The optimal control method is related to finding a control strategy that drives a dynamic system to a desired solution in an optimal manner; e.g., finding an optimal controller such that the actual output tracks a desired trajectory and that a predefined performance index (or cost function) with an integral form on the whole time interval is minimized. In contrast, the proposed ZG control method is based on the combination of ZD and GD methods. Specifically, the ZD method is an error-based dynamic method, of which the core is the ZD design formula that forces the instantaneous error function (termed zeroing function) to converge to zero exponentially; the GD method is an energy-based minimization method, of which the core is the GD design formula such that the minimum point of the energy function can be reached along the negative gradient direction.

  2. 2.

    The design of optimal control method, though mathematically elegant, is usually obtained offline and requires the complete knowledge of system dynamics to be known on the whole time interval, e.g., \([0,+\infty )\). That is to say, the computation involved in the optimal control method includes not only the present and previous data but also the future data. However, it is usually impossible that the future information is known at present time instant in reality. As a consequence, the system may be hard to work accurately in an optimal manner at present time instant. Besides, in view of the uncertainties in system dynamics, the unknown system parameters need to be updated/estimated online by using the tracking error, thereby making the application of optimal control to adaptation potentially less satisfactory. In contrast, the design of ZG control method is just based on the present (or previous) data, which may thus be more practical and applicable in the control field.

  3. 3.

    To design an optimal controller, the performance functional and constraint conditions are firstly selected and determined. Secondly, the Hamilton function of system is constructed. Thirdly, according to the necessary conditions of obtaining the functional extremum, one can obtain several equations, e.g., the governing equation and the canonical equation. Fourthly, solve these equations and then determine the integral constants by using the boundary conditions. Finally, calculate the optimal control and its optimal trajectory. In contrast, to design a ZG controller, the ZG control method only needs to repeatedly construct a series of zeroing functions and apply the simple ZD design formula until the expansion of ZD design formula includes the explicit expression of control input u. Then, a ZG controller in the form of u (specifically, a ZD controller) can be obtained without using the GD method. To obtain a singularity-conquering ZG controller, one can further define an energy function and employ the GD design formula to construct a ZG controller in the form of \(\dot{u}\). Evidently, the design procedure of an optimal controller is generally more complex than that of a ZG controller.

  4. 4.

    As a special case of optimal control, the bang-bang control has been studied extensively, of which the main characteristic is that each component of the control vector is selected and switched between the boundary values of control field. However, the bang-bang control might possibly cause an undesired oscillation problem, as the optimal control is switched frequently from a boundary value to another one (though it may have better effectiveness). Evidently, the optimal control generated is not smooth. In contrast, with the time-derivative information guaranteed and exploited, the control result generated by the ZG control method is usually smooth. Thus, the ZG control method can avoid the above problem effectively.

  5. 5.

    In linear quadratic optimal control system, the design procedure of optimal control method involves the Riccati matrix differential equation solving, where the computationally expensive matrix inversion is required and may result in control singularities. Moreover, the Riccati matrix differential equation is a type of nonlinear differential equation, which is generally difficult to obtain an analytical solution or is relatively complex to obtain a numerical solution, especially for complicated high-dimensional systems. Though the Riccati equation for the linear quadratic optimal control could be solved before the control performing, its solution is obtained offline, which may be less desirable for real-time control systems in practice. In contrast, the above problems do not exist in the design and implementation of ZG control method.

Remark 3

For readers’ convenience and also for comparison, the main design steps in the backstepping method, as well as the differences between the ZG method and the backstepping method, are presented as below [17, 35, 41, 54, 59,60,61].

  1. 1.

    To lay a basis for further comparison with the ZG method, the main design steps in the backstepping method are outlined as follows. To design a backstepping controller, the whole system is firstly divided into several subsystems. Secondly, an error or regulatory variable is defined, and a Lyapunov function is designed accordingly. Thirdly, a virtual control law is chosen to make the derivative of the Lyapunov function negative definite. A stabilizing function, which equals the virtual control, is then found to stabilize the subsystem. The above design procedure is repeated till the last subsystem. Besides, the actual control law can be designed in the same manner. Evidently, the control law design is a recursive process in backstepping control [17].

  2. 2.

    In the design of linear systems, it can be found that the ZG method and the backstepping method have a certain degree of connection. However, in the design of nonlinear systems, the distinctions between such two methods are more than their connections. For instance, in the design of the ZG method, the ZG controller is constructed with only one negligible restriction (i.e., with design parameters larger than zero). However, the Lyapunov function has to be introduced in each step in the design of the backstepping method, and the derivation process can be much more complex than that in the ZG method. Besides, there are many systematic/parametric requirements and limitations in the backstepping control.

  3. 3.

    The usage of ZG method is simple yet effective, which is reflected in the following facts. i) It does not need to introduce Lyapunov function during the design process; and ii) it does not need to define any virtual control. In contrast, with the increase of design steps, the backstepping method becomes more and more complicated, due to the Lyapunov functions introduced in each design step, their time-derivative derivation, and the concept of virtual control.

  4. 4.

    In the design of control systems, the ZG method can solve the singularity problem successfully. In contrast, the backstepping method may introduce the singularity problem but cannot solve it effectively.

Note that, in the authors’ previous work [54], a ZG stabilization controller has been designed by the ZG method for stabilization control of a bilinear system. Through an illustrative example, the numerical comparison of the ZG controller with a backstepping controller has further illustrated the superiority of the proposed ZG controller (as well as the ZG method). Please see Sect. 2 of [54] for more details. Besides, being an interesting and challenging issue, the numerical comparison of the ZG controller with an optimal controller designed by the optimal strategy can be a future research direction of this work.

5 Theoretical analyses on z2g0 controller

This section provides the theoretical analyses on the convergence performance of z2g0 controller (6) for IPC system (2). Specifically, for the z2g0 controller, the following theoretical result on its convergence performance is obtained. In what follows, \(\varepsilon =y-y_{\text {d}}=x_3-y_{\text {d}}=\theta -y_{\text {d}}\) represents the tracking error.

Theorem 1

For a continuously differentiable and bounded desired trajectory \(y_{\text {d}}\), starting from a bounded initial state \([x_1(0),x_2(0),x_3(0),x_4(0)]\), the tracking error \(\varepsilon \) of IPC system (2) equipped with z2g0 controller (6) converges to zero exponentially, provided that \(\cos x_3 \ne 0\), \(\forall t\in [0, +\infty )\).

Proof

Defining \(\mathbf {v}=[v_1,v_2]^\text {T}\in \mathbb {R}^2\) (with superscript \(^{\text {T}}\) denoting the vector or matrix transposition), one can choose a Lyapunov function candidate as

$$\begin{aligned} V=\frac{1}{2}\left\| \mathbf {v}\right\| _2^2=\frac{1}{2} \mathbf {v}^{\text {T}}\mathbf {v}=\frac{1}{2}\left( v_1^2+v_2^2\right) \ge 0, \end{aligned}$$

where \(\Vert \cdot \Vert _2\) represents the Euclidean norm of a vector. Because \(V>0\) for \(\mathbf {v}\ne \mathbf {0}\), and \(V=0\) only for \(\mathbf {v}=\mathbf {0}\) (i.e., \(v_1=0\) and \(v_2=0\)), V is positive definite. Then, one has its time derivative

$$\begin{aligned} \dot{V}=\frac{\text {d}V}{\text {d}t}=v_1\dot{v}_1+v_2\dot{v}_2=-\lambda _1v_1^2-\lambda _2v_2^2\le 0, \end{aligned}$$
(8)

which is negative definite, because \(\dot{V}<0\) for \(\mathbf {v}\ne \mathbf {0}\), and \(\dot{V}=0\) only for \(\mathbf {v}=\mathbf {0}\). In addition, if \(\Vert \mathbf {v}\Vert _2 \rightarrow \infty \), the Lyapunov function candidate \(V=\Vert \mathbf {v}\Vert _2^2/2\rightarrow \infty \). By the Lyapunov stability theory, \(\mathbf {v}\) converges to zero. Given that \(\varepsilon =y-y_{\text {d}}=v_1\) is an element of \(\mathbf {v}\), the tracking error \(\varepsilon \) converges to zero.

Next, the exponential convergence performance of the tracking error is proved as follows. In practical applications, there exist two cases for Eq. (8), i.e., \(\lambda _1\ge \lambda _2\) and \(\lambda _1< \lambda _2\). When \(\lambda _1\ge \lambda _2>0\), by defining \(\lambda _1=\lambda _2+\varDelta \lambda \), with \(\varDelta \lambda \ge 0\in \mathbb {R}\), Eq. (8) can be rewritten as

$$\begin{aligned} \dot{V}= & {} -\lambda _1v_1^2-\lambda _2v_2^2=-\lambda _2\left( v_1^2+v_2^2\right) -\varDelta \lambda v_1^2\le \\= & {} -\lambda _2\left( v_1^2+v_2^2\right) -\lambda _2 \mathbf {v}^{\text {T}}\mathbf {v} =-2\lambda _2 V, \end{aligned}$$

so that

$$\begin{aligned} 0\le \frac{1}{2}\left\| \mathbf {v}\right\| _2^2=V\le V(0)\exp \left( -2\lambda _2 t\right) ,~ \forall t\ge 0. \end{aligned}$$

This shows that \(\mathbf {v}\) exponentially converges to zero with the rate \(2\lambda _2\). When \(0<\lambda _1<\lambda _2\), one can analogously have \(\dot{V}\le -2\lambda _1 V,\) and then

$$\begin{aligned} 0\le \frac{1}{2}\left\| \mathbf {v}\right\| _2^2 =V\le V(0)\exp \left( -2\lambda _1 t\right) , \forall t\ge 0, \end{aligned}$$

which implies that \(\mathbf {v}\) tends to zero exponentially with the rate \(2\lambda _1\). Summarizing the above analyses, one can conclude that the tracking error \(\varepsilon =v_1\) (as an element of \(\mathbf {v}\)) is exponentially convergent to zero, which leads to exponentially convergent tracking for IPC system (2). The proof is thus completed. \(\square \)

6 Theoretical analyses on z2g1 controller

In this section, the convergence performance of z2g1 controller (7) for the pendulum control of IPC system (2) is proved. Analogously, one can define the tracking error as \(\varepsilon =y-y_{\text {d}}\). Moreover, based on controllers (6) and (7), it can be readily found that the desired solution (or say, optimal solution) of z2g1 controller (7) is \(u^*=f_4-(f_1f_2-f_3)/ \cos x_3\). Then, for z2g1 controller (7), the following theoretical results on its convergence performance are obtained.

Theorem 2

For a continuously differentiable and bounded desired trajectory \(y_{\text {d}}\), starting from bounded initial state \([x_1(0),x_2(0),x_3(0),x_4(0)]\) and control input u(0), the following results about IPC system (2), equipped with z2g1 controller (7), are achieved.

  • For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), the tracking error \(\varepsilon \) of IPC system (2) converges toward or stays within the error bound

    $$\begin{aligned} \frac{\varrho \sqrt{\eta _2}}{\lambda _1 \lambda _2 \gamma \eta _1 l m_\text {c} }, \end{aligned}$$

    provided that \(|\dot{u}^*|\le \varrho \), \(\exists 0\le \varrho <+\infty \), and \(\eta _1 \le \cos ^2 x_3\le \eta _2\), \(\exists 0<\eta _1\le \eta _2\le 1\).

  • For the case of \(\cos x_3=0\) (i.e., the singularity case), the tracking error \(\varepsilon \) of IPC system (2) is bounded.

Proof

For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), one can define a solution error of controller (7) as \(\epsilon =u-u^*=u-f_4+(f_1f_2-f_3)/ \cos x_3\). Apparently, it can be further deduced that \(\dot{u}=-\gamma \cos x_3 \left( \cos x_3 (u-f_4)+(f_1 f_2-f_3)\right) =-\gamma \cos ^2 x_3\epsilon \). Consequently, one can have the derivative of \(\epsilon \) as \(\dot{\epsilon }=\dot{u}-\dot{u}^*=-\gamma \cos ^2 x_3\epsilon -\dot{u}^*\). Defining a Lyapunov function candidate as \(L=\epsilon ^2/2\ge 0\), one then obtains its time derivative

$$\begin{aligned} \dot{L}=\frac{\text {d}L}{\text {d}t}=\epsilon \dot{\epsilon }=-\gamma \cos ^2 x_3\epsilon ^2-\epsilon \dot{u}^*. \end{aligned}$$
(9)

It follows from Eq. (9) that \(\dot{L}\) has two terms, i.e., \(-\gamma \cos ^2 x_3\epsilon ^2\) and \(-\epsilon \dot{u}^*\). For the first term, given \(\cos ^2 x_3\ge \eta _1\), \(-\gamma \cos ^2 x_3\epsilon ^2\le -\gamma \eta _1\epsilon ^2\) holds true. For the second term, according to the Cauchy’s inequality [62], one can obtain \(-\epsilon \dot{u}^*\le |\epsilon ||\dot{u}^*| \le \varrho |\epsilon |\). Then, the following inequality holds:

$$\begin{aligned} \dot{L}= & {} -\gamma \cos ^2 x_3\epsilon ^2-\epsilon \dot{u}^*\le -\gamma \eta _1\epsilon ^2 + \varrho \left| \epsilon \right| \nonumber \\= & {} -\left| \epsilon \right| \left( \gamma \eta _1 \left| \epsilon \right| -\varrho \right) . \end{aligned}$$
(10)

During time evolution of solution error \(\epsilon \), there exist three situations for (10): i) \(\gamma \eta _1 |\epsilon |-\varrho >0\); ii) \(\gamma \eta _1 |\epsilon |-\varrho =0\); and iii) \(\gamma \eta _1 |\epsilon |-\varrho <0\). The detailed analyses are presented as below.

  • In the first situation (i.e., \(\gamma \eta _1 |\epsilon |-\varrho >0\)), \(\dot{L}<0\) which means that \(\epsilon \) tends to zero (i.e., u tends to \(u^*\)) with time.

  • In the second situation (i.e., \(\gamma \eta _1 |\epsilon |-\varrho =0\), a so-called ball surface), \(\dot{L}\le 0\) which means that \(\epsilon \) tends to zero (i.e., u tends to \(u^*\)) or stays on the surface with \(|\epsilon |=|u-u^*|=\varrho /\gamma \eta _1\). In other words, \(\epsilon \) would not go outside the ball of \(\varrho /\gamma \eta _1\) in this situation.

  • In the third situation (i.e., \(\gamma \eta _1 |\epsilon |-\varrho <0\), inside the ball of \(\varrho /\gamma \eta _1\)), \(\dot{L}\) is less than a positive constant, comprising sub-situations \(\dot{L}\le 0\) and \(0<\dot{L}\le -|\epsilon |(\gamma \eta _1 |\epsilon |-\varrho )\). If \(\dot{L}\le 0\) holds, then it returns to the second situation. Then, let us analyze the worst situation, i.e., \(0<\dot{L}\le -|\epsilon |(\gamma \eta _1 |\epsilon |-\varrho )\). In this situation, \(L=\epsilon ^2/2\) and \(|\epsilon |\) would increase with time, which means that \(\gamma \eta _1 |\epsilon |-\varrho \) increases as well. As a result of the worst situation, there exists a certain time instant such that \(\gamma \eta _1 |\epsilon |-\varrho =0\), which returns to the second situation, i.e., \(\dot{L}\le 0\). In brief, \(\epsilon \) would not go outside the ball of \(\varrho /\gamma \eta _1\) in any situation.

Summarizing the above three situations, one can conclude that the solution error \(\epsilon \) of z2g1 controller (7) is upper bounded by \(\varrho /\gamma \eta _1\), i.e.,

$$\begin{aligned} \limsup \limits _{t\rightarrow +\infty } \left| \epsilon \right| =\limsup \limits _{t\rightarrow +\infty } \left| u-u^*\right| \le \frac{\varrho }{\gamma \eta _1}. \end{aligned}$$
(11)

By following state Eq. (2) and the design procedure of z2g1 controller (7), it can be obtained that

$$\begin{aligned} \dot{v}_2+\lambda _2 v_2= & {} \dot{x}_4-f_1=\frac{f_3+(f_4-u)\cos x_3}{f_2}-f_1\nonumber \\= & {} -\frac{\cos x_3}{f_2}\epsilon . \end{aligned}$$
(12)

In addition, one can have \(\dot{v}_2+\lambda _2 v_2=\ddot{v}_1+(\lambda _1+\lambda _2)\dot{v}_1+\lambda _1\lambda _2 v_1\). Considering \(\varepsilon =v_1\) and Eq. (12), one can further have \(\left( \ddot{\varepsilon }+(\lambda _1+\lambda _2)\dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) f_2/\cos x_3=-\epsilon .\) Therefore, it follows from (11) that

$$\begin{aligned}&\limsup \limits _{t\rightarrow +\infty } \left| \left( \ddot{\varepsilon }+(\lambda _1+\lambda _2) \dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) \frac{f_2}{\cos x_3}\right| \\&\quad =\limsup \limits _{t\rightarrow +\infty } \left| \epsilon \right| \le \frac{\varrho }{\gamma \eta _1}. \end{aligned}$$

Taking into account that \( 0<lm_\text {c} \le f_2=l(m_\text {c}+m_\text {p}\sin ^2x_3) \le l(m_\text {c}+m_\text {p})\) and \(0<|\cos x_3|\le \sqrt{\eta _2}\), one then obtains

$$\begin{aligned}&\limsup \limits _{t\rightarrow +\infty } \left| \left( \ddot{\varepsilon }+(\lambda _1+\lambda _2) \dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) \frac{lm_\text {c}}{\sqrt{\eta _2}}\right| \nonumber \\&\quad \le \limsup \limits _{t\rightarrow +\infty } \left| \left( \ddot{\varepsilon } +(\lambda _1+\lambda _2)\dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) \frac{f_2}{\cos x_3}\right| \le \frac{\varrho }{\gamma \eta _1}, \end{aligned}$$

which leads to

$$\begin{aligned} \limsup \limits _{t\rightarrow +\infty } \left| \left( \ddot{\varepsilon } +(\lambda _1+\lambda _2)\dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) \right| \le \frac{\varrho \sqrt{\eta _2}}{\gamma \eta _1lm_\text {c}}. \end{aligned}$$
(13)

For an enough large time instant \(t_{\text{ e }}\), (13) reduces to

$$\begin{aligned} \left| \left( \ddot{\varepsilon }(t_{\text{ e }})+(\lambda _1+\lambda _2)\dot{\varepsilon }(t_{\text{ e }})+\lambda _1\lambda _2 \varepsilon (t_{\text{ e }})\right) \right| \le \frac{\varrho \sqrt{\eta _2}}{\gamma \eta _1lm_\text {c}}. \end{aligned}$$

According to the Gronwall’s inequality [63], the above formula can be reformulated as \(|\varepsilon (t_{\text{ e }})|\le \varrho \sqrt{\eta _2}/(\lambda _1\lambda _2\gamma \eta _1lm_\text {c})\) or, equivalently,

$$\begin{aligned} \limsup \limits _{t\rightarrow +\infty } \left| \varepsilon \right| \le \frac{\varrho \sqrt{\eta _2}}{\lambda _1\lambda _2\gamma \eta _1lm_\text {c}}, \end{aligned}$$

by considering \(t_{\text{ e }}\rightarrow +\infty \).

For the case of \(\cos x_3=0\) (i.e., the singularity case), one can readily obtain \(\lim _{\cos x_3\rightarrow 0}\dot{u}=0\), because \(\dot{u}=-\gamma \cos x_3 \left( \cos x_3 (u-f_4)+(f_1 f_2-f_3)\right) \). As a result, the control input at the time instant of singularity \(t_{\text {s}}\) is equal to the one at the previous time instant \(t_{\text {s}^-}\), i.e., \(u(t_{\text {s}})=u(t_{\text {s}^-})\). Analogously, one can have \(u(t_{\text {s}})=u(t_{\text {s}^+})\) with \(t_{\text {s}^+}\) being after the time instant of singularity \(t_{\text {s}}\). Note that, at the time instant \(t_{\text {s}^-}\), the control input \(u(t_{\text {s}^-})\) is bounded, which implies that \(u(t_{\text {s}^+})=u(t_{\text {s}})=u(t_{\text {s}^-})\) is bounded. When the input is bounded, the output y of IPC system (2) is also bounded. Then, for the bounded desired trajectory \(y_{\text {d}}\), the tracking error \(\varepsilon =y-y_{\text {d}}\) is bounded at the time instants \(t_{\text {s}^-}\), \(t_{\text {s}}\) and \(t_{\text {s}^+}\). In other words, by means of the z2g1 controller, the singularity problem is conquered successfully. This implies that the pendulum can pass the horizontal position and achieve the swing-up control. After passing the singularity, the tracking error converges toward an error bound again. The proof is now completed. \(\square \)

According to Theorem 2, one can get the result that the tracking error of IPC system (2) equipped with controller (7) is globally convergent to the ball of \(\varrho \sqrt{\eta _2}/(\lambda _1\lambda _2\gamma \eta _1lm_\text {c})\). This means that, when design parameters \(\lambda _1\), \(\lambda _2\), and/or \(\gamma \) are chosen to be infinite, the tracking-error bound diminishes to zero. However, Theorem 2 shows that the tracking error is just asymptotically convergent, which may be less acceptable in applications since it requires an infinitely long time period to achieve the tracking control. Actually, by choosing a relatively loose upper bound, the tracking error can be proved here to be globally and exponentially convergent. The important theoretical results and analysis are given as below.

Theorem 3

For a continuously differentiable and bounded desired trajectory \(y_{\text {d}}\), starting from bounded initial state \([x_1(0),x_2(0),x_3(0),x_4(0)]\) and control input u(0), the following results about IPC system (2), equipped with z2g1 controller (7), are achieved.

  • For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), the tracking error \(\varepsilon \) of IPC system (2) exponentially converges toward or stays within the error bound

    $$\begin{aligned} \frac{\varrho \sqrt{\eta _2}}{\alpha \lambda _1 \lambda _2 \gamma \eta _1 l m_\text {c}} \end{aligned}$$

    with the weighting parameter \(\alpha \in (0,1)\), provided that \(|\dot{u}^*|\le \varrho \), \(\exists 0\le \varrho <+\infty \), and \(\eta _1 \le \cos ^2 x_3\le \eta _2\), \(\exists 0<\eta _1\le \eta _2\le 1\).

  • For the case of \(\cos x_3=0\) (i.e., the singularity case), the tracking error \(\varepsilon \) of IPC system (2) is bounded.

Proof

For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), from (10), it can be readily obtained that

$$\begin{aligned} \dot{L}\le -\gamma \eta _1\epsilon ^2 + \varrho \left| \epsilon \right|= & {} -(1-\alpha )\gamma \eta _1\epsilon ^2\nonumber \\&+\left( -\alpha \gamma \eta _1\epsilon ^2+ \varrho \left| \epsilon \right| \right) , \end{aligned}$$
(14)

where parameter \(\alpha \in (0,1)\) is referred to as a loosing ratio. Evidently, on the right side of (14), the first term \(-(1-\alpha )\gamma \eta _1\epsilon ^2\le 0\) holds all the time. Additionally, regarding the second term on the right side of (14), there exist two sub-situations, i.e., \(-\alpha \gamma \eta _1\epsilon ^2+ \varrho |\epsilon |\le 0\) and \(-\alpha \gamma \eta _1\epsilon ^2+ \varrho |\epsilon |>0\).

When \(-\alpha \gamma \eta _1\epsilon ^2+ \varrho |\epsilon |\le 0\) [i.e., \(|\epsilon |\ge \varrho /(\alpha \gamma \eta _1)\)], one can have

$$\begin{aligned} \dot{L}\le -(1-\alpha )\gamma \eta _1\epsilon ^2=-2(1-\alpha )\gamma \eta _1L. \end{aligned}$$

Solving the above differential inequality, one can obtain

$$\begin{aligned} \frac{1}{2}\epsilon ^2= & {} L\le L(0) \exp \left( -2(1-\alpha )\gamma \eta _1 t\right) \\= & {} \frac{1}{2}\epsilon ^2(0) \exp \left( -2(1-\alpha )\gamma \eta _1 t\right) , \end{aligned}$$

which leads to

$$\begin{aligned} \frac{\varrho }{\alpha \gamma \eta _1} \le \left| \epsilon \right| \le \left| \epsilon (0)\right| \exp \left( -(1-\alpha )\gamma \eta _1 t\right) ,~\forall t\in \left[ 0,t_\text {c}\right] ,\nonumber \\ \end{aligned}$$
(15)

where the convergence time \(t_\text {c}=\text {ln}\left( \alpha \gamma \eta _1|\epsilon (0)| /\varrho \right) /\left( (1-\alpha )\gamma \eta _1\right) \). This means that \(|\epsilon |\) exponentially converges to \(\varrho /(\alpha \gamma \eta _1)\) with the rate \((1-\alpha )\gamma \eta _1\).

When \(-\alpha \gamma \eta _1\epsilon ^2+ \varrho |\epsilon |> 0\) [i.e., \(|\epsilon |<\varrho /(\alpha \gamma \eta _1)\)], \(\epsilon \) stays within the new ball of \(\varrho /(\alpha \gamma \eta _1)\). The analysis is similar to that of the third situation of equation (10) in Theorem 2.

In light of the above analysis, the results are summarized as follows.

  • If \(|\epsilon (0)|\ge \varrho /(\alpha \gamma \eta _1)\), then

    $$\begin{aligned} \left| \epsilon \right| {\left\{ \begin{array}{ll} \le \left| \epsilon (0)\right| \exp \left( -(1-\alpha )\gamma \eta _1 t\right) ,~\forall t\in \left[ 0,t_\text {c}\right] ,\\ \le \varrho /(\alpha \gamma \eta _1),~\forall t\in \left[ t_\text {c},+\infty \right) . \end{array}\right. } \end{aligned}$$
  • If \(|\epsilon (0)|\le \varrho /(\alpha \gamma \eta _1)\), then \(|\epsilon |\le \varrho /(\alpha \gamma \eta _1),~\forall t\in [0,+\infty )\).

Evidently, the exponential convergence rate of the solution error is \((1-\alpha )\gamma \eta _1\). Moreover, when \(t\ge t_\text {c}\), \(|\epsilon |\le \varrho /(\alpha \gamma \eta _1)\) always holds. Similar to the proof given in Theorem 2, the following inequality can be derived as

$$\begin{aligned} \left| \left( \ddot{\varepsilon }+(\lambda _1+\lambda _2) \dot{\varepsilon }+\lambda _1\lambda _2 \varepsilon \right) \right| \le \frac{\varrho \sqrt{\eta _2}}{\alpha \gamma \eta _1lm_\text {c}},~\forall t\ge t_\text {c}. \end{aligned}$$

Analogously, based on the Gronwall’s inequality [63], it can be concluded that \(|\varepsilon |\) exponentially converges to the new error bound \(\varrho \sqrt{\eta _2}/(\alpha \lambda _1\lambda _2\gamma \eta _1lm_\text {c})\) when \(t\ge t_\text {c}\).

In summary, for the case of \(\cos x_3\ne 0\), the tracking error of IPC system (2) equipped with z2g1 controller (7) globally and exponentially converges to or stays within the error bound \(\varrho \sqrt{\eta _2}/(\alpha \lambda _1\lambda _2\gamma \eta _1lm_\text {c})\).

For the case of \(\cos x_3= 0\) (i.e., the singularity case), by following Theorem 2, it can be readily and analogously proved that the tracking error of IPC system (2) equipped with z2g1 controller (7) is bounded. That is to say, the z2g1 controller can conquer the singularity problem, thereby implying that the pendulum can pass the horizontal position and then accomplish the process of swinging up. The proof is thus completed. \(\square \)

Moreover, it is worth investigating the boundedness of both control input u and its derivative \(\dot{u}\) in the pendulum control of IPC system (2) equipped with z2g1 controller (7). Thus, one can have the following theoretical results and analysis.

Theorem 4

Starting from bounded initial state \([x_1(0),x_2(0),x_3(0),x_4(0)]\) and control input u(0), the following results about IPC system (2), equipped with z2g1 controller (7), are achieved.

  • For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), the control input u and its derivative \(\dot{u}\) in the pendulum tracking control of IPC system (2) are upper bounded, respectively, as

    $$\begin{aligned} {\left\{ \begin{array}{ll} \limsup \limits _{t\rightarrow +\infty }\left| \dot{u}\right| \le \varrho \eta _2/\eta _1,\\ \limsup \limits _{t\rightarrow +\infty }\left| u\right| \le \varrho /\gamma \eta _1+\zeta , \end{array}\right. } \end{aligned}$$

    provided that \(|u^*|\le \zeta \), \(\exists 0\le \zeta <+\infty \), \(|\dot{u}^*|\le \varrho \), \(\exists 0\le \varrho <+\infty \), and \(\eta _1 \le \cos ^2 x_3\le \eta _2\), \(\exists 0<\eta _1\le \eta _2\le 1\).

  • For the case of \(\cos x_3=0\) (i.e., the singularity case), the control input u and its derivative \(\dot{u}\) of IPC system (2) are both bounded.

Proof

For the case of \(\cos x_3\ne 0\) (i.e., the non-singularity case), a solution error of controller (7) is defined as \(\epsilon =u-u^*=u-f_4+(f_1f_2-f_3)/ \cos x_3\). Thus, one can have \(h=\cos x_3\epsilon \), and then \(\dot{u}=-\gamma \cos ^2 x_3\epsilon =-\gamma \cos x_3h\). Taking into account that \(0<|\cos x_3|\le \sqrt{\eta _2}\), one then obtains \(|h|=|\cos x_3||\epsilon |\le \sqrt{\eta _2}|\epsilon |\). Evidently, it can be further derived that

$$\begin{aligned} \left| \dot{u}\right| =\left| -\gamma \cos x_3h\right| =\gamma \left| \cos x_3\right| \left| h\right| \le \gamma \eta _2\left| \epsilon \right| . \end{aligned}$$

In addition, from Eq. (11), one can know that the solution error \(\epsilon \) of z2g1 controller (7) is upper bounded by \(\varrho /\gamma \eta _1\), i.e., \(\limsup \nolimits _{t\rightarrow +\infty } |\epsilon |=\limsup \nolimits _{t\rightarrow +\infty } |u-u^*|\le \varrho /\gamma \eta _1\). Consequently, it can be obtained that

$$\begin{aligned} \limsup \limits _{t\rightarrow +\infty } \left| \dot{u}\right| \le \gamma \eta _2\limsup \limits _{t\rightarrow +\infty } \left| \epsilon \right| \le \frac{\varrho \eta _2}{\eta _1}. \end{aligned}$$

That is to say, the derivative of u (i.e., \(\dot{u}\)) is upper bounded by \(\varrho \eta _2/\eta _1\).

Next, the boundedness of the control input u in the pendulum tracking control is proved as follows. Taking into account that \(\epsilon =u-u^*\) and according to the triangle inequality [64], one can obtain \(|u|-|u^*|\le |u-u^*|=|\epsilon |\). Considering that \(\limsup \nolimits _{t\rightarrow +\infty } |\epsilon |\le \varrho /\gamma \eta _1\) and \(|u^*|\le \zeta \), one then has

$$\begin{aligned} \limsup \limits _{t\rightarrow +\infty }\left| u\right| \le \frac{\varrho }{\gamma \eta _1}+\zeta . \end{aligned}$$

From the above inequality, one can readily know that the control input u is upper bounded by \(\varrho /\gamma \eta _1+\zeta \).

For the case of \(\cos x_3=0\) (i.e., the singularity case), one can readily know \(\lim _{\cos x_3\rightarrow 0}\dot{u}=0\), in view of \(\dot{u}=-\gamma \cos x_3 \left( \cos x_3 (u-f_4)+(f_1 f_2-f_3)\right) \). Evidently, \(\dot{u}\) is bounded and tends to zero, as time t evolves to the time instant of singularity \(t_{\text {s}}\). Besides, it can be readily known that the control input at the time instant of singularity \(t_{\text {s}}\) is equal to the one at the previous time instant \(t_{\text {s}^-}\), i.e., \(u(t_{\text {s}})=u(t_{\text {s}^-})\). Analogously, one can have \(u(t_{\text {s}})=u(t_{\text {s}^+})\) with \(t_{\text {s}^+}\) being the time instant after the singularity. Note that, at the time instant \(t_{\text {s}^-}\), the control input \(u(t_{\text {s}^-})\) is bounded, which implies that \(u(t_{\text {s}^+})=u(t_{\text {s}})=u(t_{\text {s}^-})\) is bounded. In other words, for the case of \(\cos x_3=0\) (i.e., the singularity case), the control input u of the IPC system is bounded. After passing the singularity, the control input u and its derivative \(\dot{u}\) both converge toward respective bounds again (which are given in the non-singularity case). The proof on the boundedness of both control input u and its derivative \(\dot{u}\) is thus completed. \(\square \)

Fig. 2
figure 2

Output trajectory, control input and tracking error of IPC system (2) equipped with z2g0 controller (6), with desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). a Output trajectory and desired trajectory. b Control input. c Tracking error. d Order of \(|\varepsilon |\)

7 Simulation, verification and comparison

In the previous sections, for comparative purposes, two controllers, i.e., z2g0 controller (6) and z2g1 controller (7), have been designed and analyzed for pendulum control of the IPC system. Actually, the z2g0 controller designed by using ZD method twice can be considered as a special type of conventional controller, of which the expression involves division operation and the divisor may pass through zero at some time instant(s), just like other conventional controllers. In this section, three simulation examples are provided and performed. Without loss of generality, the parameters of IPC system (2) are set as \(m_\text {c}=0.378\,\hbox {kg}, m_\text {p}=0.037\,\hbox {kg}, l=0.125\,\hbox {m}, g=9.81\,\hbox {m/s}^2\), and \(b=0.001\,\hbox {N}\,\hbox {s/m}\).

Example 1 (control of pendulum tracking without swinging up). A sinusoidal desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\) is firstly considered in this example. Both z2g0 controller (6) and z2g1 controller (7) are applied in the pendulum tracking control of IPC system (2). The initial states of the plant are set as \(x_3(0)=0.5\) and \(x_1(0)=x_2(0)=x_4(0)=0\), as well as the initial input value of z2g1 controller \(u(0)=0\). Moreover, the associated design parameters are chosen as \(\lambda _1=\lambda _2=15\) and \(\gamma =1000\). Note that, in this example, \(x_3=\theta \in (-\pi /2, \pi /2)\); that is to say, the pendulum is above the horizontal position.

Fig. 3
figure 3

Output trajectory, control input and tracking error of IPC system (2) equipped with z2g1 controller (7), with desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). a Output trajectory and desired trajectory. b Control input. c Tracking error. d Order of \(|\varepsilon |\)

The corresponding simulation results are displayed in Figs. 2 and 3. Specifically, Fig. 2 shows the output trajectory, the control input, and the tracking error of IPC system (2) equipped with z2g0 controller (6). As illustrated in Fig. 2a, the output y (i.e., pendulum angle \(\theta \)) converges to the desired trajectory \(y_{\text {d}}\) within a short time, which means that a good tracking is obtained. Besides, it is seen from Fig. 2c that the tracking error \(\varepsilon \) decreases to zero. From Fig. 2d, one can observe that the maximal steady-state tracking error is of order \(10^{-4}\). Furthermore, just as indicated in Fig. 2b, the control input u (i.e., control force) is smooth and has not undergone abrupt changes, which is suitable for engineering applications. Additionally, Fig. 3 shows the output trajectory, the control input, and the tracking error of IPC system (2) using z2g1 controller (7). From Fig. 3, the similar conclusion can be obtained. That is to say, the proposed z2g1 controller (7) works well for the pendulum tracking control of IPC system (2). It is worth pointing out here that the maximal steady-state tracking error with z2g1 controller (7) is slightly larger than that with z2g0 controller (6) but still small enough for general practical applications. Therefore, the feasibility and effectiveness of z2g0 controller (6) and z2g1 controller (7) for the pendulum tracking control is substantiated primarily, when \(x_3=\theta \in (-\pi /2, \pi /2)\). Besides, as seen from Figs. 2 and 3, one can compare and find that when IPC system (2) is equipped with the z2g0 and z2g1 controllers, respectively, the corresponding simulation results are almost the same as each other. So, in some sense, this indicates that z2g1 controller (7) could effectively keep up the characteristics of z2g0 controller (6).

Remark 4

In some real-world applications, the time-delayed phenomena are often arising. Therefore, it is imperative to investigate the sensitivity of the proposed ZG controllers as well as the ZG control method for the situation of time delay. To lay a basis for further investigation, the reference derivative signals \(\dot{y}_{\text {d}}\) and \(\ddot{y}_{\text {d}}\) involved in both z2g0 controller (6) and z2g1 controller (7) can be generally approximated via the backward difference rule [65, 66]. Specifically, the reference derivative \(\dot{y}_{\text {d}}\) can be approximated by employing the backward difference rule with two data points [65, 66] as \(\dot{y}_{\text {d}}(t)\approx \big (y_{\text {d}}(t)-y_{\text {d}}(t-\tau )\big )/\tau \) having a truncation error of \(O (\tau )\), where \(\tau >0\) denotes the time interval or time delay between two measurements. Analogously, the second-order reference derivative \(\ddot{y}_{\text {d}}\) can be approximated by employing the backward difference rule with three data points [65, 66] as \(\ddot{y}_{\text {d}}(t)\approx \big (y_{\text {d}}(t)-2y_{\text {d}}(t-\tau )+y_{\text {d}}(t-2\tau )\big )/\tau ^2\), which also has a truncation error of \(O (\tau )\). Afterward, the time-delayed z2g0 controller can be expressed as below:

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} f'_{1}(t)&{}=\frac{\displaystyle 1}{\displaystyle \tau ^2}\big (y_{\text {d}}(t)-2y_{\text {d}}(t-\tau )+y_{\text {d}}(t-2\tau )\\ &{}\quad -(\lambda _1+\lambda _2)\tau ^2 x_4(t) +\lambda _1\lambda _2\tau ^2(y_{\text {d}}(t)\\ &{}\quad - x_3(t))+(\lambda _1+\lambda _2)\tau (y_{\text {d}}(t) -y_{\text {d}}(t-\tau )\big ),\\ f_2(t)&{}=l(m_\text {c}+m_\text {p}\sin ^2x_3(t)),\\ f_3(t)&{}=(m_\text {c}+m_\text {p})g\sin x_3(t),\\ f_4(t)&{}=bx_2(t)-m_\text {p}lx_4^2(t)\sin x_3(t),\\ u(t)&{}=f_4-\frac{\displaystyle f'_{1}(t)f_2(t)-f_3(t)}{\displaystyle \cos x_3(t)}. \end{aligned} \end{array}\right. } \end{aligned}$$
(16)
Fig. 4
figure 4

Orders of absolute tracking errors \(|\varepsilon |\) of IPC system (2) equipped with time-delayed z2g0 controller (16) and time-delayed z2g1 controller (17), respectively, by using three different time delays \(\tau \) for desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). a Orders of \(|\varepsilon |\) with z2g0 controller (16). b Orders of \(|\varepsilon |\) with z2g1 controller (17)

In the same manner, the time-delayed z2g1 controller can be formulated as below:

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} f'_{1}(t)&{}=\frac{\displaystyle 1}{\displaystyle \tau ^2}\big (y_{\text {d}}(t)-2y_{\text {d}}(t-\tau )+y_{\text {d}}(t-2\tau )\\ &{}\quad -(\lambda _1+\lambda _2)\tau ^2 x_4(t)+\lambda _1\lambda _2\tau ^2(y_{\text {d}}(t)\\ &{}\quad - x_3(t))+(\lambda _1+\lambda _2)\tau (y_{\text {d}}(t) -y_{\text {d}}(t-\tau )\big ),\\ f_2(t)&{}=l(m_\text {c}+m_\text {p}\sin ^2x_3(t)),\\ f_3(t)&{}=(m_\text {c}+m_\text {p})g\sin x_3(t),\\ f_4(t)&{}=bx_2(t)-m_\text {p}lx_4^2(t)\sin x_3(t),\\ \dot{u}(t)&{}=-\gamma \cos x_3(t) \left( \cos x_3(t)(u(t)-f_4(t))\right. \\ {} &{}\quad \left. +\,\,(f'_{1}f_2-f_3)\right) . \end{aligned} \end{array}\right. } \end{aligned}$$
(17)

For better illustrating and comparing the sensitivity of the proposed ZG controllers to the time delay, computer simulations are further performed on the basis of Example 1, with the same desired trajectory and initial states set. Besides, the time delays in the simulations are set as \(\tau =0.5\), 0.05, and 0.005 s, respectively. The corresponding simulation results are illustrated in Fig. 4. Specifically, Fig. 4 shows the orders of absolute tracking errors \(|\varepsilon |\) of the IPC system equipped with time-delayed z2g0 controller (16) and time-delayed z2g1 controller (17), respectively, by using three different time delays \(\tau \) for desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). As illustrated in Fig. 4a, the maximal steady-state tracking error of the IPC system equipped with time-delayed z2g0 controller (16) is of order \(10^{-2}\), \(10^{-3}\), or \(10^{-4}\), corresponding to time delay \(\tau =0.5\), 0.05, or 0.005 s, respectively. From Fig. 4b, the similar observation can be obtained. In addition, it can be seen from both Fig. 4a, b, with slightly larger time delay used, the order of \(|\varepsilon |\) of the IPC system equipped with time-delayed z2g0 controller (16) or time-delayed z2g1 controller (17) remains within an acceptably small level, which, to some extent, means that the proposed ZG design method is still feasible and effective for the pendulum tracking control of IPC system (2) in the situation of time delay.

Fig. 5
figure 5

Output trajectory, control input and tracking error of IPC system (18) interfered by system disturbances and equipped with z2g1 controller, with desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). a Output trajectory and desired trajectory. b Control input. c Tracking error. d Order of \(|\varepsilon |\)

Fig. 6
figure 6

Output trajectory, control input and tracking error of IPC system (2) equipped with z2g1 controller, with output \(y=x_3+\sigma \) interfered by observation disturbance \(\sigma \) and with desired trajectory \(y_{\text {d}}=\sin (0.1\pi t)\cos (0.2\pi t)\). a Output trajectory and desired trajectory. b Control input. c Tracking error. d Order of \(|\varepsilon |\)

Remark 5

In practical applications, the disturbance suppression performance of the IPC system is also worth investigating, for example, suppressing harmonic and wide-band random excitations [56,57,58, 67,68,69,70,71]. Here, we briefly investigate the effects of disturbances on the IPC system. In general, there exist two types of disturbances for the IPC system, i.e., system disturbance and observation disturbance [72]. In the following, the effects of such two types of disturbances on the IPC system are investigated individually. For the convenience of illustration, only the IPC system equipped with the z2g1 controller is adopted here and the disturbance in system or observation is assumed to be a harmonic excitation, just as adopted in [17, 20, 27, 50, 73]. First of all, let us consider the situation of system disturbance. To lay a basis for further investigation on the robustness of the z2g1 controller in the presence of system disturbance, the state equations of the disturbed IPC system [50] can be formulated as

$$\begin{aligned} \left\{ \begin{array}{lll} \dot{x}_1=x_2,\\ \dot{x}_2=\frac{\displaystyle u-bx_2+m_\text {p}(lx_4^2-g\cos x_3)\sin x_3}{\displaystyle m_\text {c}+m_\text {p}\sin ^2x_3}+d_1,\\ \dot{x}_3=x_4,\\ \dot{x}_4=\frac{\displaystyle (m_\text {c}+m_\text {p})g\sin x_3-(u-bx_2+m_\text {p}lx_4^2 \sin x_3)\cos x_3}{\displaystyle l(m_\text {c}+m_\text {p}\sin ^2x_3)}\\ \qquad +\,\,d_2, \end{array} \right. \nonumber \\ \end{aligned}$$
(18)

where \(x_1=p\), \(x_2=\dot{p}\), \(x_3=\theta \), \(x_4=\dot{\theta }\), as well as \(d_1\) and \(d_2\) denote the system disturbances. Besides, the output of the IPC system is the same as before, i.e., \(y=\theta =x_3\). Without loss of generality, the system disturbances are set as \(d_1=d_2=10\sin (20\pi t)\) in the simulation. For better illustrating and comparing the robustness of the proposed ZG controller to the system disturbances, Example 1 is considered here, with the same initial states and desired trajectory employed. The corresponding simulation results are illustrated in Fig. 5. Specifically, Fig. 5 shows the output trajectory, the control input, and the tracking error of IPC system (18) interfered by system disturbances and equipped with the z2g1 controller. As shown in Fig. 5a, c, in the presence of system disturbances \(d_1\) and \(d_2\), the output y (i.e., pendulum angle \(\theta \)) can still approximate the desired trajectory \(y_\text {d}\) rapidly, with the tracking error \(\varepsilon \) converging toward zero and remaining within an acceptably small level. From Fig. 5d, it can be further observed that the maximal steady-state tracking error remains at the order of \(10^{-3}\). By comparing the simulation results shown in Fig. 3, one can find that the effect of the system disturbances on the tracking performance for the IPC system is very small. In other words, the ZG controller can realize the pendulum tracking control of the IPC system with good robustness.

Fig. 7
figure 7

Output trajectories and tracking errors of IPC system (2) equipped with z2g0 controller (6) and z2g1 controller (7), respectively, with desired trajectory \(y_{\text {d}}=0.3\pi \cos (0.5t)\exp (-0.2t)\). a Output trajectory with z2g0 controller (6). b Tracking error with z2g0 controller (6). c Output trajectory with z2g1 controller (7). d Tracking error with z2g1 controller (7)

Fig. 8
figure 8

Control inputs and trajectories \(\cos x_3\) of IPC system (2) equipped with z2g0 controller (6) and z2g1 controller (7), respectively, with desired trajectory \(y_{\text {d}}=0.3\pi \cos (0.5t)\exp (-0.2t)\). a Control input with z2g0 controller (6). b Trajectory \(\cos x_3\) with z2g0 controller (6). c Control input with z2g1 controller (7). d Trajectory \(\cos x_3\) with z2g1 controller (7)

Moreover, the situation of observation disturbance is analyzed as follows. To lay a basis for further investigation on the robustness of the z2g1 controller in the presence of observation disturbance, the output of the IPC system can be described as \(y=x_3+\sigma \), with \(\sigma \) denoting the observation disturbance. Note that the state equations of the IPC system is the same as the one in (2). In the simulation, the observation disturbance is set as \(\sigma =0.03\sin (10\pi t)\). Specifically, Fig. 6 shows the output trajectory, the control input, and the tracking error of IPC system (2) equipped with the z2g1 controller, with output \(y=x_3+\sigma \) interfered by observation disturbance \(\sigma \). As seen from the figure, the z2g1 controller still works well for the pendulum tracking control of IPC system (2) in the presence of the observation disturbance, with the maximal steady-state tracking error remaining at a relatively small level (i.e., \(10^{-3}\)). Therefore, the simulation results shown in Fig. 6 indicate that the z2g1 controller is robust to the observation disturbance to some extent. In summary, these simulation results illustrate well the robustness of the ZG controllers (as well as the ZG design method) for the pendulum tracking control of the IPC system in the presence of system disturbance or observation disturbance. Note that the systematical analysis about the proposed ZG controllers with time delay and disturbance would be one of our future main research topics.

Fig. 9
figure 9

Output trajectories and control inputs of IPC system (2) equipped with z2g0 controller (6) and z2g1 controller (7), respectively, with desired trajectory \(y_{\text {d}}=0.5(\sin (t)+\cos (0.5\pi t))\). a Output trajectory with z2g0 controller (6). b Control input with z2g0 controller (6). c Output trajectory with z2g1 controller (7). d Control input with z2g1 controller (7)

Example 2 (control of pendulum tracking including swinging up). Consider an eventually constant desired trajectory with the form:

$$\begin{aligned} y_{\text {d}}=0.3\pi \cos (0.5t)\exp (-0.2t), \end{aligned}$$

which can be seen, without loss of generality, as regulation of an output to zero. The initial state \(x_3(0)\) [i.e., \(\theta (0)\)] is chosen to be \(\pi \). That is to say, the pendulum is vertical down at the initial time. Hence, the task also includes the swing-up control. The other initial states are chosen as \(x_1(0)=x_2(0)=x_4(0)=0\) for both z2g0 and z2g1 controllers, and the initial control value of z2g1 controller \(u(0)=0\). In addition, the design parameters are set as \(\lambda _1=\lambda _2=15\) and \(\gamma =100\).

The simulation results are plotted in Figs. 7 and 8. Specifically, in Fig. 7, output trajectories and tracking errors of IPC system (2) equipped with z2g0 controller (6) and z2g1 controller (7) are reported. As seen from Fig. 7a and b, the tracking-control process of IPC system (2) equipped with z2g0 controller (6) stops at around 0.3 s. In contrast, the tracking-control process of IPC system (2) equipped with z2g1 controller (7) runs uninterruptedly, which is clearly illustrated in Fig. 7c, d. Meanwhile, it can be seen from Fig. 7d that the tracking error with z2g1 controller (7) goes to zero quickly, which means that the tracking-control purpose is achieved by means of z2g1 controller (7). Considering that the initial value of \(\theta \) is \(\pi \), one can readily know that a good swing-up control is achieved simultaneously, as clearly visualized in Fig. 7c. Besides, Fig. 8 further reveals the reason why z2g0 controller (6) fails but z2g1 controller (7) works well. Intuitively, as shown in Fig. 8a, the value of control input tends to infinity at about 0.16 s, which leads to a crash of z2g0 controller (6). Indeed, when time t is around 0.16 s, \(\cos x_3=0\) holds true such that z2g0 controller (6) encounters the singularity problem, just as displayed in Fig. 8b. Therefore, it follows from (6) that u goes to infinity theoretically, resulting in the failure of z2g0 controller (6). In contrast, as displayed in Fig. 8c, d, even when \(\cos x_3=0\) holds true, the control input of z2g1 controller (7) is bounded and acceptable, which implies that this controller works well. In other words, by making use of z2g1 controller (7), the singularity problem is conquered successfully. In summary, the above comparative results show well the efficacy of z2g1 controller (7) in conquering the singularity problem for the control of pendulum tracking (including swinging up) of IPC system (2).

Fig. 10
figure 10

Absolute tracking errors with different small values of design parameters for IPC system (2) equipped with z2g1 controller (7), with desired trajectory \(y_{\text {d}}=0.5(\sin (t)+\cos (0.5\pi t))\). a With \(\lambda _1=\lambda _2=12\) and \(\gamma =30\). b With \(\lambda _1=\lambda _2=12\) and \(\gamma =45\). c With \(\lambda _1=\lambda _2=16\) and \(\gamma =45\). d With \(\lambda _1=\lambda _2=16\) and \(\gamma =60\)

Example 3 (control of pendulum tracking including swinging up). In this example, the effectiveness of z2g1 controller (7) and the important effect of design parameters \(\lambda _1\), \(\lambda _2\) and \(\gamma \) are further investigated. The desired trajectory \(y_{\text {d}}=0.5(\sin (t)+\cos (0.5\pi t))\) is considered. Additionally, the initial values are chosen to be the same as those in Example 2. Note that, in this example, the initial state \(x_3(0)\) [i.e., \(\theta (0)\)] is also selected as \(\pi \), which means that the pendulum needs to be swung up from the pendant position during the tracking-control process of IPC system (2).

Fig. 11
figure 11

Power consumptions for IPC system (2) equipped with z2g1 controller (7) when tracking different desired trajectories in three different simulation examples. a For Example 1. b For Example 2. c For Example 3

For comparative purposes, both z2g0 controller (6) and z2g1 controller (7) are employed. Meanwhile, the design parameters are set as \(\lambda _1=\lambda _2=16\) and \(\gamma =1000\). The simulation results are shown in Fig. 9. As seen from Fig. 9a, b, when z2g0 controller (6) is employed, the control input u tends to infinity and the tracking-control process stops at time \(t\approx 0.13\) s. In contrast, as indicated in Fig. 9c, d, the desired trajectory is tracked well and the control input is continuous and smooth. Evidently, a good pendulum tracking control is achieved by means of z2g1 controller (7). Besides, from Fig. 9c, one can clearly find that this tracking-control process achieves the swinging up successfully. In brief, the efficacy of z2g1 controller (7) in conquering the singularity problem is verified once more for the control of pendulum tracking (including swinging up) of IPC system (2).

Next, in order to further investigate the simulation results in the situation of relatively small values of design parameters (i.e., \(\lambda _1\), \(\lambda _2\) and \(\gamma \)) as well as their effect on the tracking performance of z2g1 controller (7), different sets of design parameters with small values are tested in the simulations accordingly. Specifically, Fig. 10 shows the absolute tracking errors of IPC system (2) equipped with z2g1 controller (7) by using different small values of \(\lambda _1\), \(\lambda _2\) and \(\gamma \). From the figure, one can observe that, although relatively small values of \(\lambda _1\), \(\lambda _2\) and \(\gamma \) are used, the absolute tracking errors all converge toward zero rapidly and remain with an acceptably small level, which means that z2g1 controller (7) as well as the ZG design method is still effective for the pendulum control of IPC system (2). Besides, it can be readily found that the tracking error bound becomes smaller with larger values of design parameters used, which coincides with the theoretical analyses provided in Sect. 6. In practical applications, the practitioners can choose the appropriate values of \(\lambda _1\), \(\lambda _2\) and \(\gamma \) in accordance with specific requests.

Remark 6

For dynamic control problems, it is important to evaluate the power or energy consumption of controllers [74, 75]. Specifically, the power consumption for the IPC system can be estimated from two essential parts, i.e., cart and pendulum. In terms of the cart, the instantaneous power consumption of the cart due to the horizontal motion can be described by \(P_\text {c}=|ux_2|\), where u is the control input of the IPC system that corresponds to the horizontal force applied to the cart, and \(x_2\) is the velocity of the cart. In terms of the pendulum, the instantaneous power consumption of the pendulum due to the rotational motion can be formulated as \(P_\text {p}=|Iaw|\), where I is the moment of inertia of the pendulum, a is the angular acceleration of the pendulum, and w is the angular velocity of the pendulum. Thus, the total power consumption can be computed by \(P=P_\text {c}+P_\text {p}=|ux_2|+|Iaw|\). Considering that the moment of inertia of the pendulum is assumed to be negligible (i.e., \(I\approx 0\)), one can further formulate the total power consumption as \(P=|ux_2|\). The power consumptions for IPC system (2) equipped with z2g1 controller (7) in above three different examples (i.e., Example 1, Example 2 and Example 3) have been estimated by simulations, where different desired trajectories are used, respectively. The corresponding simulation results are illustrated in Fig. 11. From the figure, it can be observed that all of the power consumptions in the three different simulation examples are acceptably small. By comparison, one can further find that the amplitude of power consumption for Example 2 is the smallest one. This means that the power consumption of controller depends on the selection of desired trajectory to some extent.

In summary, from the above three illustrative examples, the efficacy and superiority of the proposed singularity-conquering z2g1 controller (7) for the control of pendulum tracking (including swinging up) of IPC system (2) in conquering the singularity problem have been substantiated. Besides, the robustness of the proposed ZG controllers (as well as the ZG design method) in the presence of time delay or disturbance has been investigated. The suitability for the situation of relatively small values of design parameters (i.e., \(\lambda _1\), \(\lambda _2\) and \(\gamma \)) and their effect on the tracking performance of z2g1 controller (7) have also been illustrated. Furthermore, the power consumptions for IPC system (2) equipped with z2g1 controller (7) in the above three simulation examples have been estimated. Finally, it is worth pointing out that, in the simulations of the above three examples, the desired trajectory functions are selected in a relatively arbitrary manner to verify the effectiveness of the proposed z2g1 controller (as well as the ZG design method) under different situations. Thus, other continuously differentiable and bounded functions can also be selected as the desired trajectory functions in these simulation examples.

8 Conclusions

In this paper, two controllers, i.e., z2g0 controller (6) and z2g1 controller (7), have been proposed for the pendulum control of IPC system (2). Between them, by using the GD method to eliminate the division operation, z2g1 controller (7) not only achieves the control of pendulum tracking (including swinging up) of the IPC system with satisfactory tracking accuracy but also successfully conquers the troublesome singularity problem. Theoretical analyses on the convergence performance of both z2g0 and z2g1 controllers have been presented. In particular, the tracking error bound of z2g1 controller (7) has been derived analytically. Besides, the boundedness of both control input and its derivative has been investigated and proved. The comparative simulation results of three illustrative examples have substantiated the efficacy and superiority of z2g1 controller (7) in conquering the singularity problem for the control of pendulum tracking (including swinging up) of IPC system (2). In contrast, just like other conventional controllers, z2g0 controller (6) fails to achieve the pendulum control of the IPC system when encountering the singularity problem. Although the proposed ZG control method aims at the IPC system, the gradient strategy can be generalized to the control of some other nonlinear systems with the singularity problem, e.g., an affine-form nonlinear system, an nth-order nonlinear system, and a class of chaotic systems (including Lorenz, Chen and Lu systems) equipped with IOL controllers [76, 77]. It is worth pointing out that the application of the gradient strategy, for example, to random systems, may also be an interesting topic, which will be explored and studied in the future work.