Keywords

1 Introduction

The problem of inverted pendulum has a long history [17, 18, 45] and remains relevant even in the present days (see, e.g.,  [2, 68, 15, 24, 28, 30, 34, 38, 4042, 47, 49, 51] and related references). As is well known the model of inverted pendulum plays a central role in the control theory [1, 5, 6, 11, 16, 19, 27, 36, 47, 49]. It is well established benchmark problem that provides many challenging problems to control design. Because of their nonlinear nature pendulums have maintained their usefulness and they are now used to illustrate many of the ideas emerging in the field of nonlinear control [3]. Typical examples are feedback stabilization, variable structure control, passivity based control, back-stepping and forwarding, nonlinear observers, friction compensation, and nonlinear model reduction. The challenges of control made the inverted pendulum systems a classic tools in control laboratories. Namely, it should be noted that although a lot of control algorithm are researched in the systems control design, Proportional-Integral-Derivative (PID) controller is the most widely used controller structure in the realization of a control system [47]. The advantages of PID controller, which have greatly contributed to its wide acceptance, are its simplicity and sufficient ability to solve many practical control problems.

According to control purposes of the inverted pendulum, the control of inverted pendulum can be divided into three aspects. The first aspect which is widely researched is the swing-up control of inverted pendulum [11, 27, 36].Footnote 1 Interesting and important results on the time optimal control of inverted pendulum were obtained in [11, 36]. In particular, in [36] the optimal transients (taking into account the cylindrical character of the states space of the system under control) were built for different values of the parameters and constraints on the control torque. The second aspect is the stabilization of the inverted pendulum [4, 10]. The third aspect is the tracking control of the inverted pendulum [9]. In practice, stabilization and tracking control are more useful for application.

Such a mechanical system can be found in various field of technical sciences, from robotics to cosmic technologies. E.g., the stabilization of inverted pendulum is considered in the problem of missile pointing because the engine of missile is placed lower than the center of mass and such a fact leads to aerodynamical unstability. Similar problem is solved in the self-balancing transport device (the so-called segway). Also the model of the inverted pendulum (especially, under various kinds of control of the motion of the suspension point) is widely used in the various fields of physics [43], applied mathematics [49], engineer sciences [23, 4042, 44], neuroscience [50], economics [39] and others.

The model of inverted pendulum with oscillating suspension point (see panel a in Fig. 1) was studied in detail by Kapitza [17, 18]. Let us recall that the equation of motion of pendulum has the form:

$$\begin{aligned} \ddot{\phi }-\frac{1}{l}[g+\ddot{f}(t)]\sin {\phi }=0 \end{aligned}$$
(1)

where \(\phi \) is the angle of vertical deviation of the pendulum, l is the pendulum’s length, g is the gravitational acceleration and f(t) is the law of motion of the suspension point (of course, this equation should be considered together with the corresponding initial conditions). In the following consideration we will use this equation as primal.

As is known, if the motion of suspension point is of harmonic character then the (1) reduces to the Mathieu equation, studied in detail, e.g., in [26].

In order to make an adequately description of the dynamics of real physical and mechanical systems, it is necessary to take into account the effects of hysteretic nature such as “backlash”, “stops” etc. [32]. The mathematical models of such nonlinearities according to the classical patterns of Krasnosel’skii and Pokrovskii [21], reduce to operators that are treated as converters in an appropriate function spaces. The dynamics of such converters are described by the relation of “input-state” and “state-output”.

Backlash in the suspension point is a kind of a hysteretic nonlinearity. The hysteretic phenomenons (especially in the form of control parameters) play an important role in such a fields as physics, chemistry, biology, economics etc. It should also be pointed out that the hysteretic phenomenons are insufficiently known in our days. This fact leads to an interesting problem on the presence of a backlash in the suspension point of a pendulum.

As is known, most of the real physical and technical systems contain a various kind of parts that can be represented as a cylinder with a piston [32]. Inevitably, the backlashes appear in such systems during its long operation due to “aging” of the materials. As was mentioned above, such backlashes are of hysteretic nature and the analysis of such nonlinearities is quiet important and actual problem. In this work, we investigate various aspects of hysteretic control in the problem of inverted pendulum (for various forms of motion of the suspension point). More specific, we investigate the dynamical features of such a system depending on the control parameters. Let us note also that the system under consideration can be considered as a successful model for a real mechanical system with a hysteretic type of nonlinearity.

This work is organized in the following way. In Sect. 2 we consider the vertical motion of the suspension point of inverted pendulum. Namely, in Sect. 2.1 we construct the mathematical model of the inverted pendulum under hysteretic control. Section 2.2 is dedicated to the problem of stability of the linearized equation of motion. In particular, in this section the monodromy matrix and the stability condition for inverted pendulum under hysteretic control are found in the explicit form. In Sect. 2.3 the stability zones of the presented system are analyzed in detail. Section 2.4 is dedicated to the analysis of the periodic solutions for the system under consideration taking into account that the hysteretic control takes place. In Sect. 3 we consider the horizontal motion of the suspension point of inverted pendulum . In Sect. 3.1 we consider a mathematical model of this system. In Sect. 3.2 we consider the backlash as a hysteretic nonlinearity using operator technique of Krasnosel’skii and Pokrovskii.Footnote 2 In Sect. 3.3 the dynamical characteristics of the system under consideration are presented in the explicit form. Namely, the expression for stability zones of the system under consideration is obtained and analyzed. In this section we also consider the dissipative motion of the inverted pendulum. Corresponding theorem is formulated and proved. Section 3.4 is dedicated to the problem of non-ideal relay in feedback. Here we formulate and prove the theorem on Lyapunov stability of the system with non-ideal relay in feedback. In Sect. 3.5 we consider the question on optimal control for the system under consideration. In this section we discuss the theorem on the optimal control of pendulum. In Sect. 4 we consider the problem of elastic inverted pendulum with hysteretic nonlinearity in the form of a backlash in suspension point. In Sect. 4.1 we consider the general view of elastic inverted pendulum together with the operator technique for hysteretic nonlinearities. Also in this section we obtain the equation of motion of the elastic pendulum with a hysteretic nonlinearity in the suspension point. Section 4.2 is dedicated to numerical solution of the obtained equations (we use the difference scheme). In Sect. 4.3 we analyze the problem of optimization for the system under consideration. The numerical realization of optimization procedure is made using the so-called bionic algorithm. In Sect. 4.4 the results of numerical simulations are discussed and analyzed. In the last section the main results of the presented work are summarized.

2 Inverted Pendulum Under Hysteretic Nonlinearity: Vertical Oscillation of Suspension

In this section we describe the inverted pendulum under hysteretic nonlinearity in the form of backlash in vertically oscillating suspension point [42].

2.1 Mathematical Model

Let us consider a system where the base of the pendulum is a physical system (PS) formed by a cylinder of length H and the piston P.Footnote 3 Both the cylinder and piston can move in the direction of the vertical axis as it is shown in panel b of the Fig. 1.

Fig. 1
figure 1

Geometry of the problem. Panel a General view of the inverted pendulum. Panel b The suspension point (cylinder and piston)

We determine the piston’s position by the coordinate f(t) and the cylinder’s position by coordinate \(\upsilon (t)\). Let us assume also that the “leading” element in the system (PS) is a cylinder P. In this assumption the system (PS) can be considered as a converter \(\varGamma \) with the input signal f(t) (piston’s position) and the output signal \(\upsilon (t)\) (cylinder’s position). Such a converter is called backlash. The set of its possible states is \(f(t)\le \upsilon (t)\le f(t)+H\) (\(-\infty <f(t)<\infty \)). The cylinder’s position \(\upsilon (t)\) at \(t>t_{0}\) is defined by \(\upsilon (t)=\varGamma [t_{0},\upsilon (t_{0})]f(t)\), where \(\varGamma [t_{0},\upsilon (t_{0})]\) is the operator defined for each \(\upsilon _{0}=\upsilon (t_{0})\) on the set of continuous inputs f(t) (\(t>t_{0}\)) for which \(\upsilon _{0}-H<f(t)<\upsilon _{0}\) [21].

We assume that the piston’s acceleration periodically changes from \(-a\omega ^{2}\) to \(a\omega ^{2}\) with the frequency \(\omega \). This assumption consists in the fact that the linearized equation of motion of such a pendulum can be written in the formFootnote 4:

$$\begin{aligned} \begin{array}{l} \ddot{\phi }-\displaystyle \frac{1}{l}[g+a\omega ^{2}G(t,H)w(t)]\phi =0,\\ \\ w(t)=-\mathrm {sign}[\sin {(\omega t)}],\\ \\ \phi (0)=\phi _{10},\,\,\dot{\phi }(0)=\phi _{20}, \end{array} \end{aligned}$$
(2)

where \(\mathrm {sign}(z)\) is the usual signum function, \(a\omega ^{2}G(t,H)w(t)\) is the acceleration of the suspension point and

$$G(t,H)=\left\{ \begin{array}{ll} 0,&{} t\in (t^{*},t^{*}+\varDelta t),\\ 1,&{} t\,\, \text{ out } \text{ of }\,\,(t^{*},t^{*}+\varDelta t), \end{array}\right. $$

where \(t^{*}\) are the moments after which the acceleration’s sign change takes place, \(\varDelta t=\sqrt{\frac{2H}{a\omega ^{2}}}\) is the time for which the piston passes through the cylinder.

2.2 Stability of Linearized Equation

Let we pass to dimensionless units in (2) using the following change:

$$x\equiv \phi ,\,\tau =\omega t,\,k=\frac{g}{l\omega ^{2}},\,s=\frac{a}{l},\,\varDelta \tau =\sqrt{\frac{2H}{sl}}.$$

As a result, we obtain an equation similar to Meissner equation [26], but with the negative coefficients and hysteretic nonlinearity:

$$\begin{aligned} \begin{array}{l} \ddot{x}-[k-sG(\tau ,H)\mathrm {sign}(\sin {\tau })]x=0,\\ \\ G(\tau ,H)=\left\{ \begin{array}{ll} 0,&{} \tau \in (\tau ^{*},\tau ^{*}+\varDelta \tau ),\\ 1,&{} \tau \,\, \text{ out } \text{ of }\,\,(\tau ^{*},\tau ^{*}+\varDelta \tau ), \end{array}\right. \\ \\ x(0)=x_{10},\,\,\dot{x}(0)=x_{20}, \end{array} \end{aligned}$$
(3)

We can write the (3) in the form of an equivalent system:

$$\begin{aligned} \begin{array}{l} \left\{ \begin{array}{ll} \dot{x}_{1}=&{} x_{2},\\ \dot{x}_{2}=&{} p(\tau )x_{1}, \end{array}\right. \\ \\ x_{1}(0)=x_{10},\,\,x_{2}(0)=x_{20}. \end{array} \end{aligned}$$
(4)

The matrix of this system has the form:

$$\mathbf {P}(\tau )=\left( \begin{array}{cc} 0 &{} 1 \\ p(\tau ) &{} 0 \\ \end{array}\right) , $$

where \(p(\tau )=k-sG(\tau ,H)\mathrm {sign}(\sin {\tau })\). In the frame of our assumptions the matrix \(\mathbf {P}(\tau )\) is a periodic function of time with the period \(2\pi \), namely: \(\mathbf {P}(\tau +2\pi )\equiv \mathbf {P}(\tau )\).

Let we say that the (3) is stable (or unstable) according to Lagrange if the system (4) is stable (or unstable, respectively). It means, that all solutions \(x(\tau )\) of the stable (3) are bounded in \([\tau _{0},\infty )\) together with the derivatives \(\dot{x}(\tau )\).

Following the results of Floquet [35], the investigation of the stability of such systems reduces to the problem of finding the fundamental matrix of the solutions at the moment \(2\pi \) (the so-called monodromy matrix) and evaluation of its eigenvalues (the so-called multipliers). For the stability of the periodic system it is necessary and sufficient that the following condition takes place \(|\rho |<1\) (all the multipliers are placed inside the unit circle).

Fig. 2
figure 2

Functions \(r(\tau )\) and \(p(\tau )\)

Due to the fact that the matrix \(\mathbf {P}(\tau )\) is a piecewise-constant, the fundamental system of solutions and the monodromy matrix can be constructed in the closed form. In order to do this, let us consider behavior of a piecewise-constant function \(r(\tau )=-G(\tau ,H)\mathrm {sign}(\sin {\tau })\) with the period \(2\pi \), and a function \(p(\tau )\), respectively (see Fig. 2).

As we see from Fig. 2, in the interval \((0, 2\pi )\) the system (4) can be described by the following linear systems with the constant coefficients:

$$\begin{aligned} \left\{ \begin{array}{ll} \dot{x}^{1}_{1}=&{} x^{1}_{2},\\ \dot{x}^{1}_{2}=&{} kx^{1}_{1}, \end{array}\right. \,\,\tau \in [0,\varDelta \tau ], \end{aligned}$$
(5)
$$\begin{aligned} \left\{ \begin{array}{ll} \dot{x}^{2}_{1}=&{} x^{2}_{2},\\ \dot{x}^{2}_{2}=&{} -(s-k)x^{2}_{1}, \end{array}\right. \,\,\tau \in [\varDelta \tau ,\pi ], \end{aligned}$$
(6)
$$\begin{aligned} \left\{ \begin{array}{ll} \dot{x}^{3}_{1}=&{} x^{3}_{2},\\ \dot{x}^{3}_{2}=&{} kx^{3}_{1}, \end{array}\right. \,\,\tau \in [\pi ,\pi +\varDelta \tau ], \end{aligned}$$
(7)
$$\begin{aligned} \left\{ \begin{array}{ll} \dot{x}^{4}_{1}=&{} x^{4}_{2},\\ \dot{x}^{4}_{2}=&{} (k+s)x^{4}_{1}, \end{array}\right. \,\,\tau \in [\pi +\varDelta \tau ,2\pi ]. \end{aligned}$$
(8)

Since the fundamental matrix should be continuous, the solutions of (5)–(8) should match at the corresponding points, namely:

$$\mathbf {X}^{1}(0)=\mathbf {E},\,\,\mathbf {X}^{j}(\tau ^{*}_{j})=\mathbf {X}^{j+1}(\tau ^{*}_{j}),$$

where \(i=1,2,3\), \(\tau ^{*}_{i}\) are the moments at which the control changes during the period, \(\mathbf {E}\) is the unity matrix.

Consistent integration of the systems (5)–(8) leads to the following fundamental matrices:

$$\mathbf {X}^{1}(\tau )=\left( \begin{array}{cc} \cosh {(\sqrt{k}\tau )}&{} \frac{1}{\sqrt{k}}\sinh {(\sqrt{k}\tau )}\\ \sqrt{k}\sinh {(\sqrt{k}\tau )}&{} \cosh {(\sqrt{k}\tau )} \end{array}\right) ,$$
$$\mathbf {X}^{2}(\tau )=\mathbf {X}^{1}(\varDelta \tau )\times \left( \begin{array}{cc} \cos {[k_{2}(\tau -\varDelta \tau )]}&{} \frac{1}{k_{2}}\sin {[k_{2}(\tau -\varDelta \tau )]}\\ -k_{2}\sin {[k_{2}(\tau -\varDelta \tau )]}&{} \cos {[k_{2}(\tau -\varDelta \tau )]} \end{array}\right) ,$$
$$\mathbf {X}^{3}(\tau )=\mathbf {X}^{2}(\pi )\times \left( \begin{array}{cc} \cosh {[\sqrt{k}(\tau -\pi )]}&{} \frac{1}{\sqrt{k}}\sinh {[\sqrt{k}(\tau -\pi )]}\\ \sqrt{k}\sinh {[\sqrt{k}(\tau -\pi )]}&{} \cosh {[\sqrt{k}(\tau -\pi )]} \end{array}\right) ,$$
$$\mathbf {X}^{4}(\tau )=\mathbf {X}^{3}(\pi +\varDelta \tau )\times \left( \begin{array}{cc} \cosh {[k_{1}(\tau -\pi -\varDelta \tau )]}&{} \frac{1}{k_{1}}\sinh {[k_{1}(\tau -\pi -\varDelta \tau )]}\\ k_{1}\sinh {[k_{1}(\tau -\pi -\varDelta \tau )]}&{} \cosh {[k_{1}(\tau -\pi -\varDelta \tau )]} \end{array}\right) .$$

Putting \(\tau =2\pi \) in \(\mathbf {X}^{4}(\tau )\), we obtain the following form of the monodromy matrix of the system (4):

$$\begin{aligned} \begin{array}{l}\mathbf {A}=\mathbf {X}(2\pi )\\ \\ \quad \quad =\left( \begin{array}{cc} \cosh {(\sqrt{k}\varDelta \tau )}&{} \frac{1}{\sqrt{k}}\sinh {(\sqrt{k}\varDelta \tau )}\\ \sqrt{k}\sinh {(\sqrt{k}\varDelta \tau )}&{} \cosh {(\sqrt{k}\varDelta \tau )} \end{array}\right) \times \left( \begin{array}{cc} \cos {(k_{2}\gamma )}&{} \frac{1}{k_{2}}\sin {(k_{2}\gamma )}\\ -k_{2}\sin {(k_{2}\gamma )}&{} \cos {(k_{2}\gamma )} \end{array}\right) \\ \\ \quad \quad \quad \times \left( \begin{array}{cc} \cosh {(\sqrt{k}\varDelta \tau )}&{} \frac{1}{\sqrt{k}}\sinh {(\sqrt{k}\varDelta \tau )}\\ \sqrt{k}\sinh {(\sqrt{k}\varDelta \tau )}&{} \cosh {(\sqrt{k}\varDelta \tau )} \end{array}\right) \times \left( \begin{array}{cc} \cosh {(k_{1}\gamma )}&{} \frac{1}{k_{1}}\sinh {(k_{1}\gamma )}\\ k_{1}\sinh {(k_{1}\gamma )}&{} \cosh {(k_{1}\gamma )} \end{array}\right) ,\end{array} \end{aligned}$$
(9)

where \((k_{1})^{2}=k+s\), \((k_{2})^{2}=s-k\) (\(s>k\)), \(\gamma =\pi -\varDelta \tau \). Let we write also the characteristic equation for the matrix \(\mathbf {A}\):

$$\begin{aligned} \Vert \mathbf {A}-\rho \mathbf {E}\Vert =\left| \begin{array}{cc} a_{11}-\rho &{} a_{12}\\ a_{21}&{} a_{22}-\rho \end{array}\right| =\rho ^{2}+\alpha \rho +\beta =0, \end{aligned}$$
(10)

where \(\beta =(-1)^{2}\exp \displaystyle \left( \int \limits _{0}^{T}\mathrm {Sp}[\mathbf {P}(\tau )]\mathrm {d}\tau \right) =1\) [29] and \(\alpha =-(a_{11}+a_{22})\).

The product of the roots \(\rho _{1}\) and \(\rho _{2}\) of (10) is equal to unity, so the motion will be stable at \(|\alpha |<2\) only, i.e., when the modules of multipliers are equal to unity, but these multipliers are different. Thus, we obtain the following condition for the stability of solutions of (3):

$$\begin{aligned} |a_{11}+a_{22}|<2. \end{aligned}$$
(11)

Using (9) the condition (11) can be written in the explicit form:

$$\begin{aligned} \begin{array}{l} \Big |\cos {(k_{2}\gamma )}\left[ 2\cosh {(2\sqrt{k}\varDelta \tau )}\cosh {(k_{1}\gamma )}+\sinh {(2\sqrt{k}\varDelta \tau )}\sinh {(k_{1}\gamma )}\left( \frac{\sqrt{k}}{k_{1}}+\frac{k_{1}}{\sqrt{k}}\right) \right] \\ +\sin {(k_{2}\gamma )}\left[ \sinh {(2\sqrt{k}\varDelta \tau )}\cosh {(k_{1}\gamma )}\left( \frac{\sqrt{k}}{k_{2}}-\frac{k_{2}}{\sqrt{k}}\right) \right. \\ \left. +\cosh ^{2}{(\sqrt{k}\varDelta \tau )}\sinh {(k_{1}\gamma )}\left( \frac{k_{1}}{k_{2}}-\frac{k_{2}}{k_{1}}\right) +\sinh ^{2}{(\sqrt{k}\varDelta \tau )}\sinh {(k_{1}\gamma )}\left( \frac{k}{k_{1}k_{2}}-\frac{k_{1}k_{2}}{k}\right) \right] \Big |<2. \end{array} \end{aligned}$$
(12)

Thus, the stability zone of the system (4) in the space of parameters is defined by the inequality (12).

2.3 Stability Zones

Let us consider the (3) at \(H=0\), i.e., in the absence of the hysteretic nonlinearity:

$$\begin{aligned} \ddot{x}-[k-s\cdot \mathrm {sign}(\sin {\tau })]x=0, \end{aligned}$$
(13)

then \(\varDelta \tau =0\) and the inequality (12) takes the form:

$$\begin{aligned} \Big |\cosh {(\pi k_{1})}\cos {(\pi k_{2})}+\frac{1}{2}\left( \frac{k_{1}}{k_{2}}-\frac{k_{2}}{k_{1}}\right) \sinh {(\pi k_{1})}\sin {(\pi k_{2})}\Big |<1. \end{aligned}$$
(14)
Fig. 3
figure 3

Stability zones in the absence of the hysteretic control (\(H=0\)): panel a corresponds to (refeq1.13); panel b corresponds to the Meissner equation

Now we construct numerically a solution of (14) with relation to the parameters k and s (see the panel a in Fig. 3). In panel b of the Fig. 3 we show also the stability zone for the Meissner equation obtained by Sato [37].

As we can see, these diagrams are the mirror images of each other because of opposite signs at x in the corresponding equations.

Let us construct the stability zone for the system (9). Such a system has a three-dimensional parameter space because of dependence on the three parameters takes place (the dimensionless variables k, s and the piston’s length H). We set the length of the pendulum as \(l=1\,\text{ m }\).

Fig. 4
figure 4

Stability zones in the presence of the hysteretic control . Panel a is \(H=0\,\text{ m }\), panel b is \(H=0.2\,\text{ m }\), panel c is \(H=0.4\,\text{ m }\), panel d is \(H=0.6\,\text{ m }\), panel e is \(H=0.8\,\text{ m }\), panel f is \(H=1\,\text{ m }\)

Fig. 5
figure 5

Stability zones in the positive half-plane (\(k>0\), \(s>0\)) in the presence of the hysteretic control. Panel a is \(H=0\,\text{ m }\), panel b is \(H=0.2\,\text{ m }\), panel c is \(H=0.4\,\text{ m }\), panel d is \(H=0.6\,\text{ m }\), panel e is \(H=0.8\,\text{ m }\), panel f is \(H=1\,\text{ m }\)

Fig. 6
figure 6

Stability zones in the coordinates a and \(\omega \) for different values of the parameter H. Panel a is \(H=0\,\text{ m }\), panel b is \(H=0.05\,\text{ m }\), panel c is \(H=0.1\,\text{ m }\), panel d is \(H=0.2\,\text{ m }\), panel e is \(H=0.5\,\text{ m }\), panel f is \(H=1\,\text{ m }\)

Figure 4 shows that the stability zones do not qualitatively change, but only slightly deformed with growth of H. Note that in the presented problem the parameters k and s can take the positive values only. The change of the stability zone in the positive half-plane is shown in Fig. 5. Also in this figure we see that the growth of the parameter H leads to the increasing of the lower boundary of the stability zone. Moreover, we see in this figure that with increasing of the hysteretic parameter (see the panel f) the boundaries of the stability zones become multi-valued functions (namely, the function s(k)). Such a behavior of the boundaries is connected with the fact that the main equation of the model contains the hysteretic nonlinearity (hysteretic behavior of the control parameter H).

Stability zones in the space of parameters of the system (see (2)) are shown in Fig. 6. This figure shows that the area of stability zone essentially unchanged with increasing of the length of piston H, just only shifted (for the values of H in the interval \(H\in [0,0.5]\)). This means that for any H in the presented interval there exists a pair of values \(\omega \) and a to ensure the stability of the vertical position of the inverted pendulum with oscillating suspension and the hysteretic nonlinearity. However, as we can see in panel f, at \(H=1\), there are two domains of values \(\omega \) and a that ensure the stability of the vertical position. It should also be pointed out that in full analogy with the Fig. 5 the boundaries of the stability zones become multi-valued functions (in this case, the function \(\omega (a)\)) when the hysteretic parameter H increases. Such a behavior of the boundaries follows from the fact that in the presence of the hysteretic control the main (2) (together with the corresponding monodromy matrix (9)) becomes essentially nonlinear.

Fig. 7
figure 7

The dependence of the frequency \(\omega \) on the hysteretic parameter H (on the border of the stability zone, i.e., the condition \(|a_{11}+a_{22}|=2\) takes place) for various a: thin curve is \(a=0.1\,\text{ m }\), thick curve is \(a=0.2\,\text{ m }\), dashed curve is \(a=0.3\,\text{ m }\)

In Fig. 7 we plot the dependencies of the oscillation frequency (the frequency which lies on the border of the stability zone, in other words, the frequency which ensuring the stability of solutions of (2)), on the length of the piston H at different values of a (oscillation amplitude for the piston).

Fig. 8
figure 8

Panels a and b characteristics of the inverted pendulum described by (2) (modeling parameters are presented in the main text); panel c the control function (solid line corresponds to hysteretic control, dashed line corresponds to the absence of the hysteretic control ); panel d phase portrait

Let us note, that the parameters which satisfy the inequality (12) correspond to the almost periodic oscillations [20] relative to the top of the pendulum. In order to confirm these results we present the plots of characteristics of oscillations (in the linearized model described by (2)) of the inverted pendulum with length \(l=1\,\text{ m }\) and hysteretic nonlinearity \(H=0.05\,\text{ m }\) (Fig. 8). The amplitude and frequency of oscillation of the piston are \(a=0.15\,\text{ m }\) and \(\omega =30\,\text{ s }^{-1}\), respectively. The initial conditions are \(\phi (0)=0.2\) and \(\dot{\phi }(0)=1\,\text{ s }^{-1}\).

2.4 Periodic Solutions

Now, let us consider behavior of pendulum on the edges of stability zone. In the characteristic equation for the monodromy matrix (10) such a situation corresponds to two cases: \(\alpha =-2\) (left edge) and \(\alpha =2\) (right edge). The multipliers in this case have took the values \(\rho _{1}=\rho _{2}=1\) and \(\rho _{1}=\rho _{2}=-1\), respectively.

If \(\rho _{1}=\rho _{2}=1\) then the corresponding normal solution will satisfy the equality \(\mathbf {X}(t+2\pi )=\mathbf {X}(t)\). Therefore the (2) has a periodic solution and the period of such a solution coincides with the period of the coefficients \(T_{1}=\frac{2\pi }{\omega }\).

In the second case (\(\rho _{1}=\rho _{2}=-1\)) the corresponding normal solution will satisfy the equality \(\mathbf {X}(t+2\pi )=-\mathbf {X}(t)\) (through the one more period \(\mathbf {X}(t+4\pi )=-\mathbf {X}(t+2\pi )=\mathbf {X}(t)\)). This fact means that in the case when the multipliers equal to \(-1\) the (2) has a periodic solution with the period \(T_{2}=\frac{4\pi }{\omega }\).

The solutions are periodic (and, hence, limited) in both of the presented cases. We will say that they are stable by Lagrange. We assume also that all of the pendulum’s parameters (in periodic regime of oscillations) should satisfy the following condition:

$$\begin{aligned} a_{11}+a_{22}=2,\,\, \text{ for } \text{ the } \text{ period }\,\, T_{1}, \end{aligned}$$
(15)
$$\begin{aligned} a_{11}+a_{22}=-2,\,\, \text{ for } \text{ the } \text{ period }\,\, T_{2}. \end{aligned}$$
(16)

However, these conditions are necessary only, but not sufficient due to the fact that not for all of the non-zero initial values (for a given control with the parameters which satisfy to one of these equations) the periodic solutions will exist. Note also that for the presented control described by the function \(\upsilon (t)=-a\omega ^{2}G(t,H)\mathrm {sign}[\sin {(\omega t)}]\) the initial conditions lie in the first and third quadrants.

Put the following initial condition \((\phi _{10},\phi _{20})\), and consider the case of periodic oscillations with the period \(T_{1}\). In this case the equality \(\mathbf {X}(0+T_{1})=\mathbf {A}\mathbf {X}(0)=\mathbf {X}(0)\) takes place and, also:

$$\begin{aligned} \left( \begin{array}{cc} a_{11} &{} a_{12} \\ a_{21} &{} a_{22} \\ \end{array}\right) \left( \begin{array}{c} \phi _{10} \\ \phi _{20} \\ \end{array}\right) = \left( \begin{array}{c} \phi _{10} \\ \phi _{20} \\ \end{array}\right) . \end{aligned}$$
(17)

This implies that the initial conditions satisfy the following expressions:

$$\begin{aligned} \phi _{10}=\frac{a_{12}}{a_{11}-1}\phi _{20},\,\,\phi _{20}=\frac{a_{21}}{a_{22}-1}\phi _{10}, \end{aligned}$$
(18)

i.e., lie on a straight line \(z_{1}:\dot{\phi }=K_{1}\phi \), where the coefficient \(K_{1}\) is:

$$\begin{aligned} K_{1}=\frac{a_{11}-1}{a_{12}}=\frac{a_{21}}{a_{22}-1}. \end{aligned}$$
(19)

This equality ensures that the condition (15) is valid. If for the initial conditions \((\phi _{10},\phi _{20})\) can be found a pair of the parameters a and \(\omega \) which lies on the border of the stability zone (at fixed H) and satisfies the (18) then this pair is unique. The opposite statement is also true.

In similar manner, we find that the periodic solutions with period \(T_{2}\) exist for initial conditions that satisfy the equations:

$$\begin{aligned} \phi _{10}=\frac{a_{12}}{1+a_{11}}\phi _{20},\,\,\phi _{20}=\frac{a_{21}}{1+a_{22}}\phi _{10}. \end{aligned}$$
(20)

In analogous manner, these initial conditions lie on a straight line \(z_{2}:\dot{\phi }=K_{2}\phi \) with the coefficient

$$\begin{aligned} K_{2}=\frac{a_{11}+1}{a_{12}}=\frac{a_{21}}{a_{22}+1}. \end{aligned}$$
(21)

Corresponding parameters a and \(\omega \) have been obtained from the numerical solution of (19) and (21). For the solutions of (2) with the initial conditions that satisfy (19) the parameters a and \(\omega \) are \(a=0.2\,\text{ m }\) and \(\omega =18.73\,\text{ s }^{-1}\) (hysteretic nonlinearity \(H=0.05\,\text{ m }\)). For the solutions with the initial conditions that satisfy (21) the corresponding parameters are \(a=0.43\,\text{ m }\) and \(\omega =15.02\,\text{ s }^{-1}\) (at the same value of the hysteretic nonlinearity). However, the obtained periodic solutions (using the corresponding parameters a and \(\omega \)) are not stable (in the strict sense). Therefore, the numerical simulation of these solution is can not be made without special regularization procedure.

Fig. 9
figure 9

Surfaces in the space of parameters \(\omega \), a and H that satisfy the (19) (top panel) and (21) (bottom panel)

However, let we plot (see the Fig. 9) the surfaces in the space of parameters \(\omega \), a and H that satisfy the existence conditions for the periodic solutions (19) and (21). The complicated shape of the obtained surfaces is connected with the fact that the values of the parameters that determine the periodic solutions are placed on the boundary of the stability zone (see, e.g., the (10) and (11)) where the corresponding solutions are not stable. Moreover, the obtained surfaces (more specific, the dependencies that determine such surfaces) are the solutions of the essentially nonlinear (19) and (21) (the parameters \(a_{ij}\) in these equations are the elements of the monodromy matrix (9)).

3 Inverted Pendulum Under Hysteretic Nonlinearity: Horizontal Oscillation of Suspension

In this section we briefly describe the mathematical model of the inverted pendulum with the horizontal moving suspension point [40]. Also, in terms of the in-out converter we mathematically describe such a nonlinearity as backlash.

Fig. 10
figure 10

General view of the inverted pendulum with the suspension point in the form of a cylinder C with a piston P

3.1 Mathematical Model

The equations of motion of the inverted pendulum with the horizontal moving suspension point together with the initial conditions (see the Fig. 10) can be written in the following form:

$$\begin{aligned} \begin{array}{c} A\ddot{\varphi }=mgl\sin {\varphi }-m\ddot{u}l\cos {\varphi },\\ \\ \varphi (0)=\varphi _{0},\,\,\dot{\varphi }(0)=\omega (0)=\omega _{0}, \end{array} \end{aligned}$$
(22)
$$\begin{aligned} u(t)=\varGamma [u_{0},h]x(t), \end{aligned}$$
(23)

where A is a general moment of inertia of the pendulum, \(\varphi (t)\) is the angle of vertical deviation of the pendulum, u(t) is a law of motion for the cylinder of the length h, x(t) is a law of motion for the piston which can be interpreted as a control parameter, \(\varGamma [u_{0},h]\) is defined below. The (22) describes the so-called in-out relations of the hysteretic converter in the form of backlash.

In the following we will consider the case, when the acceleration of the piston is constant, namely

$$|\ddot{x}|=k=\text{ const }.$$

Let us assume also that the deviations of the pendulum are small so we can rewrite the (22) in the linearized form:

$$\begin{aligned} \begin{array}{c} A\ddot{\varphi }=mgl\varphi -m\ddot{u}l,\\ \\ \varphi (0)=\varphi _{0},\,\,\dot{\varphi }(0)=\omega (0)=\omega _{0}. \end{array} \end{aligned}$$
(24)

3.2 Backlash as Hysteretic Nonlinearity

The mathematical models of hysteretic nonlinearities according to classical patterns of Krasnosel’skii and Pokrovskii [21], reduce to operators that are treated as converters in an appropriate function spaces. The dynamics of such converters are described by the relation of “input-state” and “state-output”.

The out state of the converter in the form of backlash (such an out state is considered on the monotonic inputs) can be described by the following relation

$$\begin{aligned} u(t)=\varGamma [u_{0},h]x(t)=\left\{ \begin{array}{rcl} u_{0},&{} &{}\text{ for }\,\,u_{0}\leqslant x(t)\leqslant u_{0}+h,\\ x(t),&{} &{}\text{ for }\,\,x(t)< u_{0},\\ x(t)-h,&{} &{}\text{ for }\,\,u_{0}+h<x(t). \end{array}\right. \end{aligned}$$
(25)

This relation can be illustrated by the Fig. 11.

Fig. 11
figure 11

Schematic view of the backlash (25) action

With a special limit construction and using the semigroup identity in the form

$$\begin{aligned} \varGamma [u(t_{1}),h]x(t)=\varGamma \left[ \varGamma [u_{0},h]x(t_{1}),h\right] x(t), \end{aligned}$$
(26)

the \(\varGamma \)-operator can be applied to all continuous inputs. It should also be noted that the presence of hysteretic-type operator in the (24) complicates the stabilization of the pendulum as a whole. In general, the control impact for such a system will be retarded (we should “predict” the future position of the pendulum).

3.3 Stabilization of Inverted Pendulum with Hysteretic Nonlinearity

In this section we consider the state feedback control of the inverted pendulum with hysteretic nonlinearity in the form of backlash. We obtain the analytic expression for the stability zones of such a system as well as we formulate the theorems that determine the stabilization of the considered system.

3.3.1 Dynamical Characteristics: Analytic Results

Let us consider the state feedback control of the inverted pendulum, i.e., we assume that the input state of the hysteretic converter obeys the following relation:

$$\begin{aligned} \ddot{x}=k\,\mathrm {sign}(\alpha \varphi +\omega ), \end{aligned}$$
(27)

where \(\alpha >0\) and \(\mathrm {sign}(z)\) is the usual signum function.

The linearized (24) can be rewritten in the equivalent matrix form (we determine the general moment of inertia as \(A={ml}^{2}\) and use the notation \(B=\sqrt{\frac{g}{l}}\)) as follows:

$$\begin{aligned} \left( \begin{array}{c} \dot{\varphi }\\ \dot{\omega } \end{array}\right) =V\left( \begin{array}{c} \varphi \\ \omega \end{array}\right) +W, \end{aligned}$$
(28)

where

$$\begin{array}{c} V=\left( \begin{array}{cc} 0&{}1\\ B^{2}&{}0 \end{array}\right) ,\,\,\,W=\left( \begin{array}{c} 0\\ -\frac{\ddot{u}}{l} \end{array}\right) ,\\ \\ u(t)=\varGamma [u_{0},h]x(t),\,\,\ddot{x}=k\mathrm {sign}(\alpha \varphi +\omega ),\\ \\ \varphi (0)=\varphi _{0},\,\,\dot{\varphi }(0)=\omega (0)=\omega _{0}. \end{array}$$

The eigenvalues of the matrix V are B and \(-B\) so that the corresponding eigenvectors are \(\left( \begin{array}{c} 1\\ B \end{array}\right) \) and \(\left( \begin{array}{c} -1\\ B \end{array}\right) \), respectively. Here, it should be noted that if the phase coordinates of the system under consideration at some time moment will be placed on the line \(B\varphi +\omega =0\), then in the future (in the next time moments), in the absence of control, the phase coordinates will asymptotically tend to zero. Therefore, the control should be arranged (on the conceptual level) in such a manner as to “preserve” the phase coordinates in the vicinity of this line.

On each of the interval where the function \(\ddot{u}\) is constant the system (28) can be solved and the result is:

$$\begin{aligned} \left( \begin{array}{c} \varphi (t)\\ \omega (t) \end{array}\right) =\varLambda (t)\left( \begin{array}{c} \varphi _{0}\\ \omega _{0} \end{array}\right) +\ddot{u}_{0}\upsilon (t). \end{aligned}$$
(29)

Here

$$\begin{aligned} \begin{array}{c} \varLambda (t)= \left( \begin{array}{cc} \cosh {Bt}&{}\frac{1}{B}\sinh {Bt}\\ B\sinh {Bt}&{}\cosh {Bt} \end{array}\right) \\ \\ \upsilon (t)= \left( \begin{array}{c} -\frac{1}{g}(\cosh {Bt}-1)\\ -\frac{B}{g}\sinh {Bt} \end{array}\right) , \end{array} \end{aligned}$$
(30)

\(\varphi _{0}\) and \(\omega _{0}\) are initial deviation and frequency of the pendulum respectively, \(\ddot{u}_{0}\) is an acceleration of the cylinder on the interval where the function \(\ddot{u}\) is constant.

The behavior of the system (29) on the whole time interval can be represented by the following recurrent relation:

$$\begin{aligned} \left( \begin{array}{c} \varphi _{k}(t)\\ \omega _{k}(t) \end{array}\right) =\varLambda (t-t_{k-1})\left( \begin{array}{c} \varphi _{t_{k-1}}\\ \omega _{t_{k-1}} \end{array}\right) +\ddot{u}_{t_{k-1}}\upsilon (t-t_{k-1}). \end{aligned}$$
(31)

Here \(t_{k}\) are the moments at which the control changes, \(\varphi _{t_{k-1}}\) and \(\omega _{t_{k-1}}\) are the values of angle and angle velocity at the moment \(t_{k-1}\), respectively, and \(\ddot{u}_{t_{k-1}}\) is an acceleration of the cylinder on the interval \([t_{k-1},t_{k}]\).

3.3.2 Dissipative Motion

The (24) is called dissipative if there exists a limited domain \(\varOmega \) on the product of the phase space of the system (28) and the state space of the hysteretic converter (25) that for any initial values \((\varphi _{0}, \omega _{0}, u)\in \varOmega \), the solutions of the (24) remain uniformly limited. In other words, this system is called dissipative if there exists a region in the phase space and matching region in the state space of the hysteretic converter that the solution which began in this region do not go to infinity.

Let us formulate the following theorem:

Theorem 1

The sufficient condition for existence of the dissipative regime of the pendulum’s motion in a vicinity of the upper position is:

$$\begin{aligned} e^{B\tau }\,\left| B\varphi _{0}+\omega _{0}\right| \leqslant \left| \frac{kB}{g}\right| , \end{aligned}$$
(32)

where \(\tau =\sqrt{\frac{2h}{k}}\) is the time for which the piston passes through the cylinder.

Proof

As is followed from the (31), the movement of the phase parameters on the line \(B\varphi +\omega =0\) (such a line corresponds to stabilization of the system) occurs during the time t:

$$\begin{aligned} t=\frac{1}{B}\ln {\left( \frac{-\frac{Bk}{g}}{B\varphi _{0}+\omega _{0}-\frac{Bk}{g}}\right) }. \end{aligned}$$
(33)

Let the piston passes through the cylinder during the time \(\tau \). Then, the phase parameters of a pendulum are:

$$\begin{aligned} B\varphi _{\tau }+\omega _{\tau }=e^{B\tau }(B\varphi _{0}+\omega _{0}). \end{aligned}$$
(34)

After substitution of (34) into (33) one gets:

$$ t=\frac{1}{B}\ln {\left( \frac{-\frac{Bk}{g}}{e^{B\tau }(B\varphi _{0}+\omega _{0})-\frac{Bk}{g}}\right) }. $$

This equation has a real value if

$$\frac{-\frac{Bk}{g}}{e^{B\tau }(B\varphi _{0}+\omega _{0})-\frac{Bk}{g}}>0,$$

or

$$ e^{B\tau }|B\varphi _{0}+\omega _{0}|<\left| \frac{Bk}{g}\right| . $$

Let us note that the inequality (32) determines the stability zones of the system under consideration.

3.4 Non-ideal Relay in Feedback

As is known, the measuring devices of any mechanical systems do not always work perfectly. So, let us consider the problem stabilization of the inverted pendulum in the case when the uncertainty in the control takes place. Let us assume that this uncertainty is fixed, then the acceleration of the suspension point (control parameter) corresponds to the output state of the non-ideal relay converter:

$$\begin{aligned} \begin{array}{c} y(t)=B\varphi (t)+\omega (t),\\ \\ \ddot{u}=k R\left[ -\varepsilon ,\varepsilon ,\mathrm {sign}\left( \ddot{u}(t_{0})\right) ,y_{0}\right] y(t), \end{array} \end{aligned}$$
(35)

where \(\varepsilon >0\). Detailed description of this converter is given in [21].

The parameter \(\varepsilon \) can be considered as an uncertainty in the measurement of the value \(B\varphi +\omega \). Let us assume also that the following inequality takes place:

$$\varepsilon <\frac{kB}{g}.$$

Otherwise the stabilization of the pendulum can not be observed.

Dynamics of the system with non-ideal relay in the feedback described by the equations:

$$\begin{aligned} \begin{array}{c} \left( \begin{array}{c} \dot{\varphi }\\ \dot{\omega } \end{array}\right) =V\left( \begin{array}{c} \varphi \\ \omega \end{array}\right) +W,\\ \\ \ddot{u}=k R\left[ -\varepsilon ,\varepsilon ,\mathrm {sign}\left( \ddot{x}(t_{0})\right) ,y_{0}\right] y(t),\\ \\ \varphi (0)=\varphi _{0},\,\,\omega (0)=\omega _{0} \end{array} \end{aligned}$$
(36)

Let us assume that at initial time \(y(t_{0})=\varepsilon \). The time for which the phase coordinates of the system (30) under influence of the control will move to the position \(y(t_{c})=-\varepsilon \) can be found using the following expressions:

$$\begin{aligned} \begin{array}{c} -\varepsilon =y(t_{c});\\ \\ -\varepsilon =\left( \begin{array}{cc}B&{}1\end{array}\right) \varLambda (t_{c})\left( \begin{array}{c} \varphi _{0}\\ \omega _{0} \end{array}\right) +\left( \begin{array}{cc}B&{}1\end{array}\right) k\upsilon (t_{c});\\ \\ -\varepsilon =e^{Bt_{c}}\varepsilon -\frac{kB}{g}\left( e^{Bt_{c}}-1\right) ; \end{array} \end{aligned}$$
(37)
$$\begin{aligned} t_{c}=\frac{1}{B}\ln {\left( \frac{\frac{kB}{g}+\varepsilon }{\frac{kB}{g}-\varepsilon }\right) }. \end{aligned}$$
(38)

A similar result takes place if \(y(t_{0})=-\varepsilon \). Thus, the total period of the control (35) is \(T=2t_{c}\) and \(y(2t_{c})=y(t_{0})=\varepsilon \). If \(y(t_{0})\ne \varepsilon \) and \(y(t_{0})\ne -\varepsilon \), then for a finite time the phase coordinates of the system (under the control (35)) will move to the position \(y(t)=\varepsilon \) or \(y(t)=-\varepsilon \).

Using the results presented above we can consider the question on the asymptotical (Lyapunov) stability of solutions of the system (36). We can formulate the following theorem:

Theorem 2

The system (36) has an asymptotically (Lyapunov) stable solution in the form of closed loop:

$$\begin{aligned} \left( \begin{array}{c} \varphi (\theta )\\ \omega (\theta ) \end{array}\right) =\left( \begin{array}{cc} \cosh {B\theta }&{}\frac{1}{B}\sinh {B\theta }\\ B\sinh {B\theta }&{}\cosh {B\theta } \end{array}\right) \left( \begin{array}{c} 0\\ \varepsilon \end{array}\right) +\left( \begin{array}{c} -\frac{k}{g}(\cosh {B\theta }-1)\\ -\frac{Bk}{g}\sinh {B\theta } \end{array}\right) , \end{aligned}$$
(39)

at \(0\leqslant \theta <t_{c}\),

$$\begin{aligned} \left( \begin{array}{c} \varphi (\theta )\\ \omega (\theta ) \end{array}\right) =\left( \begin{array}{cc} \cosh {B\theta }&{}\frac{1}{B}\sinh {B\theta }\\ B\sinh {B\theta }&{}\cosh {B\theta } \end{array}\right) \left( \begin{array}{c} 0\\ -\varepsilon \end{array}\right) +\left( \begin{array}{c} \frac{k}{g}(\cosh {B\theta }-1)\\ \frac{Bk}{g}\sinh {B\theta } \end{array}\right) , \end{aligned}$$
(40)

at \(t_{c}\leqslant \theta \leqslant 2t_{c}\) with the attraction domain for solution \(\left| B\varphi _{0}+\omega _{0}\right| \leqslant \left| \frac{kB}{g}\right| \).

Proof

In order to prove this theorem it is needed to validate that for any initial conditions from the attraction region the following relations will take place:

$$\begin{aligned} \lim _{n\rightarrow \infty }|y(nt_{c})|=\varepsilon , \end{aligned}$$
(41)
$$\begin{aligned} \lim _{n\rightarrow \infty }\varphi (nt_{c})=0. \end{aligned}$$
(42)

It is evident that the condition (41) is executed for any n (this fact can be proved by a direct substitution). The condition (42) for \(\varphi (nt_{c})\) determines by the following equality (this equality can be obtained by a simple but cumbersome calculations):

$$\varphi (nt_{c})=\left( \frac{1}{1+\frac{k}{g}}\right) ^{n}\varphi _{0}\,.$$

Of course,

$$\lim _{n\rightarrow \infty }\left( \frac{1}{1+\frac{k}{g}}\right) ^{n}=0.$$

As an illustration of this result, in the Fig. 12 we present the phase portrait of the system (36). The simulation parameters are: \(m=1\,\text{ kg }\), \(k=0.2\,\text{ m }\cdot \text{ s }^{-2}\), \(g=9.8\,\text{ m }\cdot \text{ s }^{-2}\), \(l=0.3\,\text{ m }\), \(\varepsilon =0.02\,\text{ s }^{-1}\), \(\varphi _{0}=-0.01\), \(\omega _{0}=0.0771\,\text{ s }^{-1}\).

Fig. 12
figure 12

Phase portrait of the system (36). Blue straight lines limit the zone of dissipative motion; pink lines are \(B\varphi +\omega =\varepsilon \) and \(B\varphi +\omega =-\varepsilon \); red line is \(-B\varphi +\omega =0\). Simulation parameters are \(k=0.2\,\text{ m }\cdot \text{ s }^{-2}\), \(g=9.8\,\text{ m }\cdot \text{ s }^{-2}\), \(l=0.3\,\text{ m }\), \(\varepsilon =0.02\,\text{ s }^{-1}\), \(\varphi _{0}=-0.01\), \(\omega _{0}=0.0771\,\text{ s }^{-1}\)

The case when measuring devices have the random uncertainty in the measurements (desynchronization in the control) is of particular interest. Our numerical experiments show that increasing of the simulation time leads to the fact that the probability of the stabilization of the system decreases and tends to zero. This means that the pendulum can not save upright position under desynchronization.

3.5 Optimal Control

In many technical problems the question on stabilization has a general interest. However, together with the stabilization of the system there is the problem of optimal control (this problem corresponds to asymptotically optimal characteristics of the system). In the considered problem of stabilization of the inverted pendulum the problem of optimal control corresponds to minimizing of the functional which determines the deviation of the pendulum from the vertical position. Let us consider a functional (the so-called objective functional) as follows:

$$\begin{aligned} \mathfrak {J}=\frac{1}{2T}\int \limits _{t_{0}}^{T}\left( \varphi ^{2}+\gamma \omega ^{2}\right) \mathrm {d}t. \end{aligned}$$
(43)

When the equations describing the dynamics of the system (23) are executed it is necessary to achieve the minimization of the functional (43). Let us note also that the law of stabilization should be sought only in the set of functions that stabilize the system (28), i.e., when the following phase restrictions take place:

$$\begin{aligned} |B\varphi (t)+\omega (t)|\leqslant \left| \frac{Bk}{g}\right| . \end{aligned}$$
(44)

Solution of the posed problem can be expressed in the form of the following theorem on the optimal control of the pendulum:

Theorem 3

Let a system of (28) is given together with the initial conditions that correspond to a dissipative regime of motion of the pendulum. Then, under the control (25), the functional (43) will be minimized, and the trajectory of the pendulum \(\left( \begin{array}{c} \varphi \\ \omega \end{array}\right) \) will lie entirely in the dissipativeness region in a vicinity of the upper position (44).

The proof of this theorem is based on the Pontryagin’s maximum principle as well as on the analysis of a zero-dynamics set [31].

Here we would like to note that the law of optimal control (following the presented theorem), moves the phase coordinates of the system (28) to the position \(y(t)=0\), and then stops. Such a control stabilizes the pendulum in the upper position. But, it is absolutely clear that in real systems it is difficult to get such a position, so it is necessary to consider the problem of finding the optimal control in another way.

One way of finding the optimal control is based on the assumption that the measuring instruments (in most cases) laid “errors” (or, uncertainties) and, thus, the switching of control is based on the principle of non-ideal relay.

4 Elastic Inverted Pendulum Under Hysteretic Nonlinearity: Stabilization and Optimal Control

4.1 Elastic Inverted Pendulum

4.1.1 Problem

Let us consider the model of stabilization of inverted pendulum in the vicinity of vertical position. The pendulum is considered as an elastic rod which is hingedly fixed on the cylinder. Motion of cylinder is excited by the horizontal motion of a piston (see Fig. 13).

Fig. 13
figure 13

Model of elastic inverted pendulum: geometry of the problem

Mathematical model of a similar mechanical system was considered in [48]. Investigation of dynamics of an elastic inverted pendulum was carried out in [12, 13, 25, 46].

Here (xy) is an inertial base of an elastic rod with mass m and density \(\rho \); the Ox axis coincides with a tangent to rod’s profile in the suspension point; \(\theta \) is an angle of slope for the co-ordinates of a rod, I is a centroidal moment of inertia of the rod’s section; \((X,\bar{x})\) is a co-ordinates of a considered mechanical system, M is a mass of a cylinder with length L, F is a force joined to a piston with mass \(m_{p}\) (such a force is treated as control).

The purpose of this section is the investigation of the possible stabilization (in a vicinity of vertical position) of elastic inverted pendulum in the presence of backlash in a suspension point together with investigation of various aspect of such a dynamical system.

4.1.2 Hysteretic Nonlinearity

As previously (see the Sect. 3.2), we consider the hysteretic nonlinearity using operator technique of Krasnosel’skii and Pokrovskii [21]. Namely, output of the backlash-inverter on the monotonic inputs can be described by the following expression:

$$X(t)=\varGamma [X_{0},L]Y(t)=\left\{ \begin{array}{ll} 0, &{} |Y(t)-X_{0}|\leqslant \frac{L}{2};\\ \\ Y(t)-\frac{L}{2}, &{} Y(t)-X_{0}>\frac{L}{2};\\ \\ Y(t)+\frac{L}{2}, &{} Y(t)-X_{0}<-\frac{L}{2}; \end{array} \right. $$

As is noted above, using special limit construction and semigroup identity the \(\varGamma \)-operator can be applied to all continuous inputs.

4.1.3 Physical Model

Let us assume that the deviation y and angle \(\theta \) are small, i.e., \(x\approx \bar{x}\) and the boundary conditions that determine the curvature of the pendulum areFootnote 5:

$$\begin{aligned} \left\{ \begin{array}{l} y(0,t)=y_{xx}(0,t)=0,\\ y_{xx}(l,t)=y_{xxx}(l,t)=0. \end{array} \right. \end{aligned}$$
(45)

The function \(X(\bar{x},t)\) describes behavior of the pendulum’s profile in time and shows deviation of the pendulum’s points relative to vertical axis, \((X,\bar{x})\) are coordinates of the pendulum’s profile, \(X(0,t)=s(t)\) is a displacement of the suspension point in horizontal plane.

Coordinate system transformation in the matrix form is given by

$$\begin{aligned} \left( \begin{array}{c} X\\ \bar{x} \end{array}\right) = \left( \begin{array}{rc} \cos {\theta }&{}\sin {\theta }\\ -\sin {\theta }&{}\cos {\theta } \end{array} \right) \left( \begin{array}{c} y\\ x \end{array}\right) +\left( \begin{array}{c} X(0,t)\\ 0 \end{array}\right) . \end{aligned}$$
(46)

Let us construct the physical model of the considered mechanical system taking into account the backlash in the suspension point of an elastic rod. In order to do this we use the Lagrange formalism, i.e., we analyze relation between the kinetic and potential energies in this system.

Taking into account that y and \(\theta \) are small the Lagrange function can be written as:

$$\begin{aligned} \displaystyle L(t)&=\frac{Ms_{t}^{2}}{2}\nonumber \\&\displaystyle +\frac{1}{2}\int \limits _{0}^{l}\left[ \rho s_{t}^{2}+\rho y_{t}^{2}+\rho (x\theta _{t})^{2}+\rho (2s_{t}x\theta _{t}+2x\theta _{t}y_{t}+2s_{t}y_{t})+2\rho gy\theta -EIy_{xx}^{2} \right] \mathrm {d}x. \end{aligned}$$
(47)

We can integrate the (47) in the interval \((t_{0},t_{f})\) and obtain the action function:

$$\begin{aligned} \displaystyle W&=\frac{1}{2}\int \limits _{t_{0}}^{t_{f}}Ms_{t}^{2}\mathrm {d}t \nonumber \\&\quad \quad \displaystyle +\frac{1}{2}\int \limits _{t_{0}}^{t_{f}}\int \limits _{0}^{l}\left[ \rho \left( s_{t}^{2}+y_{t}^{2}+x^{2}\theta _{t}^{2}+2s_{t}x\theta _{t}+2x\theta _{t}y_{t}+2s_{t}y_{t}+ 2gy\theta \right) -\frac{EI}{\rho }y_{xx}^{2}\right] \mathrm {d}x\mathrm {d}t. \end{aligned}$$
(48)

Using the variational principle and using Taylor’s expansion we obtain the following equation:

$$\begin{aligned} y_{tt}+\frac{EI}{\rho }y_{xxxx}=-s_{tt}-x\theta _{tt}+g\theta . \end{aligned}$$
(49)

Taking \(\theta \) as the generalized coordinate in the Lagrange function we obtain:

$$\begin{aligned} \frac{\mathrm {d}}{\mathrm {d}t}\frac{\partial {L}}{\partial {\theta _{t}}}-\frac{\partial {L}}{\partial {\theta }}=0. \end{aligned}$$
(50)

Substitution of (47) in (50) gives:

$$\begin{aligned} \int \limits _{0}^{l}x\left( x\theta _{tt}+y_{tt}+s_{tt}\right) \mathrm {d}x=g\int \limits _{0}^{l}y\mathrm {d}x. \end{aligned}$$
(51)

Taking into account (49) we have

$$\begin{aligned} \int \limits _{0}^{l}x\left( g\theta -\frac{EI}{\rho }y_{xxxx}\right) \mathrm {d}x=g\int \limits _{0}^{l}y\mathrm {d}x. \end{aligned}$$
(52)

or

$$\begin{aligned} \frac{gl^{2}\theta }{2}-\frac{EI}{\rho }\int \limits _{0}^{l}xy_{xxxx}\mathrm {d}x=g\int \limits _{0}^{l}y\mathrm {d}x. \end{aligned}$$
(53)

Using the initial conditions (45) we can show that the integral in the left part of (53) is equal to zero. Then, multiplying both parts of this equality by \(\frac{\rho }{g}\) we obtain

$$\begin{aligned} \frac{ml\theta }{2}=\rho \int \limits _{0}^{l}y\mathrm {d}x. \end{aligned}$$
(54)

Integrating (49) and multiplying by \(\rho \) we have

$$\begin{aligned} \begin{array}{c} \displaystyle \rho \int \limits _{0}^{l}\left( y_{tt}+\frac{EI}{\rho }y_{xxxx}\right) \mathrm {d}x=\rho \int \limits _{0}^{l}\left( -s_{tt}-x\theta _{tt}+g\theta \right) \mathrm {d}x,\\ \\ \displaystyle EI\left[ y_{xxx}(l,t)-y_{xxx}(0,t)\right] +\rho \int \limits _{0}^{l}y_{tt}\mathrm {d}x=-s_{tt}\rho l-\frac{\rho l^{2}\theta _{tt}}{2}+\rho gl\theta . \end{array} \end{aligned}$$
(55)

Taking into account the relations \(\rho l=m\), \(y_{xxx}(l,t)=0\) (from initial conditions), and using

$$\rho \int \limits _{0}^{l}y_{tt}\mathrm {d}x=\frac{ml\theta _{tt}}{2},$$

which follows from (54), we have the following equation:

$$\begin{aligned} ml\theta _{tt}+ms_{tt}=mg\theta +EIy_{xxx}(0,t). \end{aligned}$$
(56)

In the next step, taking s as the generalized coordinate in the Lagrange function we obtain:

$$\begin{aligned} \frac{\mathrm {d}}{\mathrm {d}t}\frac{\partial {L}}{\partial {s_{t}}}-\frac{\partial {L}}{\partial {s}}=f(t). \end{aligned}$$
(57)

Here f(t) is a force joined to the suspension point of a rod.

General peculiarity of the system under consideration is the presence of backlash in the suspension point. Due to the fact that the backlash can be considered as a hysteretic nonlinearity we can use the technique of hysteretic converters. As was mentioned above, according to classical patterns of Krasnosel’skii and Pokrovskii [21], the hysteretic operators are treated as converters in an appropriate function spaces. The dynamics of such converters are described by the relation of “input-state” and “state-output”.

Thus, the force joined to suspension point can be found from the relation:

$$\begin{aligned} f(t)=\varGamma \left[ X(0,t),Y(t),L,F_{0}\right] F=\left\{ \begin{array}{ll} 0, &{} |X(0,t)-Y(t)|\leqslant L;\\ F, &{} |X(0,t)-Y(t)|>L, \end{array} \right. \end{aligned}$$
(58)

where L is the length of a cylinder, F is a force (this force affects the piston) which can be treated as a control.

The equation of motion of piston is:

$$\begin{aligned} m_{p}Y_{tt}(t)=F. \end{aligned}$$
(59)

Here Y is a displacement of the piston in a horizontal plane.

Substitution of (47) in (57) gives the following:

$$\begin{aligned} Ms_{tt}+\rho \int \limits _{0}^{l}\left( s_{tt}+x\theta _{tt}+y_{tt}\right) \mathrm {d}x=f(t). \end{aligned}$$
(60)

Using (49) we obtain

$$\begin{aligned} Ms_{tt}+\rho \int \limits _{0}^{l}\left( g\theta -\frac{EI}{\rho }y_{xxxx}\right) \mathrm {d}x=f(t). \end{aligned}$$
(61)

Making the same transformations as in (55), we obtain the following equality:

$$\begin{aligned} Ms_{tt}=f(t)-mg\theta -EIy_{xxx}(0,t). \end{aligned}$$
(62)

Thus, we have the following system of equations:

$$\begin{aligned} \left\{ \begin{array}{l} ml\theta _{tt}+ms_{tt}=mg\theta +EIy_{xxx}(0,t),\\ Ms_{tt}=f(t)-mg\theta -EIy_{xxx}(0,t). \end{array} \right. \end{aligned}$$
(63)

Passing to coordinate system \((X,\bar{x})\), the system of equation which describes the physical model of the considered mechanical system will have the following form:

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle X_{tt}+\frac{EI}{\rho }X_{xxxx}=gX_{x}(0,t),\\ \\ MX_{tt}(0,t)=f(t)-mgX_{x}(0,t)-EIX_{xxx}(0,t),\\ \\ ml(X_{tt})_{x}(0,t)+mX_{tt}(0,t)=mgX_{x}(0,t)+EIX_{xxx}(0,t),\\ \\ f(t)=\varGamma \left[ X(0,t),Y(t),L,F_{0}\right] F,\\ \\ m_{p}Y_{tt}(t)=F, \end{array} \right. \end{aligned}$$
(64)

where \(X=X(x,t)\), due to \(\bar{x}\approx x\).

Let us express \(X_{tt}(0,t)\) from the first equation of the system and substitute it into the second equation:

$$\begin{aligned} g(M+m)X_{x}(0,t)-\frac{\textit{MEI}}{\rho }X_{xxxx}+EIX_{xxx}=f(t). \end{aligned}$$
(65)

Let us integrate the (65) over x, the result is

$$\begin{aligned} g(M+m)X(0,t)-\frac{\textit{MEI}}{\rho }X_{xxx}+EIX_{xx}=\int \limits _{0}^{l}f(t)\mathrm {d}x=lf(t). \end{aligned}$$
(66)

Taking into account (45) we have:

$$\begin{aligned} g(M+m)X(0,t)-\frac{\textit{MEI}}{\rho }X_{xxx}=lf(t). \end{aligned}$$
(67)

Finally, the system of equations that describes the dynamics of the system under consideration has the following form:

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle X_{tt}+\frac{EI}{\rho }X_{xxxx}=gX_{x}(0,t),\\ \\ MX_{tt}(0,t)+mgX_{x}(0,t)+EIX_{xxx}(0,t)=f(t),\\ \\ (M+m)X_{tt}(0,t)+ml(X_{tt})_{x}(0,t)=f(t),\\ \\ \displaystyle g(M+m)X(0,t)-\frac{\textit{MEI}}{\rho }X_{xxx}=lf(t),\\ \\ f(t)=\varGamma \left[ X(0,t),Y(t),L,F_{0}\right] F,\\ \\ m_{p}Y_{tt}(t)=F. \end{array} \right. \end{aligned}$$
(68)

4.1.4 Stabilization

Let us consider the problem of control of the pendulum using the feedback principles, i.e., the force which affects the piston can be presented by the following equality:

$$\begin{aligned} F=k\,\mathrm {sign}(\alpha e_{1}+e_{2}), \end{aligned}$$
(69)

where \(\alpha >0,\,k>0\) and

$$\begin{aligned} e_{1}=\int \limits _{0}^{l}X_{x}\mathrm {d}l, \end{aligned}$$
(70)
$$\begin{aligned} e_{2}=\int \limits _{0}^{l}(X_{t})_{x}\mathrm {d}l. \end{aligned}$$
(71)

Here \(e_{1}\) is an average angle of rod’s deviation, \(e_{2}\) is an average angular velocity of the rod.

Thus, in order to solve the stabilization problem for the elastic inverted pendulum we should use the system of (68) together with the equalities (69)–(71):

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle X_{tt}+\frac{EI}{\rho }X_{xxxx}=gX_{x}(0,t),\\ \\ MX_{tt}(0,t)+mgX_{x}(0,t)+EIX_{xxx}(0,t)=f(t),\\ \\ (M+m)X_{tt}(0,t)+ml(X_{tt})_{x}(0,t)=f(t),\\ \\ \displaystyle g(M+m)X(0,t)-\frac{\textit{MEI}}{\rho }X_{xxx}=lf(t),\\ \\ f(t)=\varGamma \left[ X(0,t),Y(t),L,F_{0}\right] F,\\ \\ m_{p}Y_{tt}(t)=F,\\ \\ F=k\,\mathrm {sign}(\alpha e_{1}+e_{2}),\\ \\ \displaystyle e_{1}=\int \limits _{0}^{l}X_{x}\mathrm {d}l,\\ \\ \displaystyle e_{2}=\int \limits _{0}^{l}(X_{t})_{x}\mathrm {d}l. \end{array} \right. \end{aligned}$$
(72)

The solution of the posed problem on stabilization of elastic inverted pendulum in the vicinity of the upper position is consisted in search of the optimal values for coefficients \(\alpha \) and k.

4.2 Numerical Realization

4.2.1 Difference Scheme

Let us introduce the rectangular lattice. To do so, let we cross the domain of function \(X=X(x,t)\) by the net of straight lines that are parallel to coordinate axis (see Fig. 14).

Fig. 14
figure 14

Rectangular lattice which corresponds to domain of function X(xt)

It is evident that the value of X(xt) in the knots of presented lattice is:

$$\begin{aligned} X_{i,j}=X(ih_{\mathrm {x}},jh_{\mathrm {t}}), \end{aligned}$$
(73)

where \(h_{x}\) is the step of a lattice by the x axis, \(h_{t}\) is the step of a lattice by the t axis, \(i=\overline{0,n}\), \(j=\overline{0,m}\), \(h_{x}=\frac{L}{n}\), \(h_{t}=\frac{T}{m}\), T is the time interval for calculation of the single iteration by time.

For the calculation of derivatives we can use the right finite difference:

$$\begin{aligned} X_{x}(x,t)\approx \frac{X_{i+1,j}-X_{i,j}}{h_{\mathrm {x}}}, \end{aligned}$$
(74)
$$\begin{aligned} X_{t}(x,t)\approx \frac{X_{i,j+1}-X_{i,j}}{h_{\mathrm {t}}}. \end{aligned}$$
(75)

Then the system (72) in the finite differences will have the following form:

$$\begin{aligned} \left\{ \begin{array}{l} \begin{array}{l} \displaystyle \frac{X_{i,j+2}-2X_{i,j+1}+X_{i,j}}{h_{\mathrm {t}}^{2}}\\ \displaystyle +\frac{EI}{\rho }\frac{6X_{i+2,j}-4X_{i+1,j}-4X_{i+3,j}+X_{i+4,j}+X_{i,j}}{h_{\mathrm {x}}^{4}}=g\frac{X_{1,j}-X_{0,j}}{h_{\mathrm {x}}}, \end{array}\\ \\ \begin{array}{l} \displaystyle M\frac{X_{0,j+2}-2X_{0,j+1}+X_{0,j}}{h_{\mathrm {t}}^{2}}+mg\frac{X_{1,j}-X_{0,j}}{h_{\mathrm {x}}}\\ \displaystyle +EI\frac{3X_{1,j}-3X_{2,j}+X_{3,j}-X_{0,j}}{h_{\mathrm {x}}^{3}}=f_{j}, \end{array}\\ \\ \begin{array}{l} \displaystyle (M+m)\frac{X_{0,j+2}-2X_{0,j+1}+X_{0,j}}{h_{\mathrm {t}}^{2}}\\ \displaystyle +ml\frac{2X_{0,j+1}-X_{0,j+2}-2X_{1,j+1}+X_{1,j+2}-X_{0,j}+X_{1,j}}{h_{\mathrm {t}}^{2}h_{\mathrm {x}}}=f_{j}, \end{array}\\ \\ \displaystyle g(M+m)X_{0,j}-\frac{\textit{MEI}}{\rho }\frac{3X_{1,j}-3X_{2,j}+X_{3,j}-X_{0,j}}{h_{\mathrm {x}}^{3}}=f_{j}h_{\mathrm {x}},\\ \\ \displaystyle f_{j}=\varGamma \left[ X_{0,j},Y_{j},L,F_{0}\right] F_{j},\\ \\ \displaystyle m_{p}\frac{Y_{j+2}-2Y_{j+1}+Y_{j}}{h_{\mathrm {t}}^{2}}=F_{j},\\ \\ \displaystyle F_{j}=k\,\mathrm {sign}(\alpha e_{1j}+e_{2j}),\\ \\ \displaystyle e_{1j}=\sum \limits _{i=0}^{n}\left( X_{i+1,j}-X_{i,j}\right) ,\\ \\ \displaystyle e_{2j}=\sum \limits _{i=0}^{n}\frac{X_{i,j}-X_{i,j+1}-X_{i+1,j}+X_{i+1,j+1}}{h_{\mathrm {t}}}, \end{array} \right. \end{aligned}$$
(76)

together with the initial conditions, i.e., the angle, linear and angular velocities:

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle \frac{X_{1,0}-X_{0,0}}{h_{\mathrm {x}}}=\varphi ,\\ \\ \displaystyle \frac{X_{0,1}-X_{0,0}}{h_{\mathrm {t}}}=V,\\ \\ \displaystyle \frac{X_{0,0}-X_{0,1}-X_{1,0}+X_{1,1}}{h_{\mathrm {t}}h_{\mathrm {x}}}=V_{\varphi },\\ \\ \displaystyle \frac{X_{2,j}-2X_{1,j}+X_{0,j}}{h_{\mathrm {x}}^{2}}=0. \end{array} \right. \end{aligned}$$
(77)

On the basis of (76) and (77) we can obtain the explicit difference scheme. In Fig. 15 we show all the knots of a net that are took part in the solution of system (72) on the each consequent iteration together with the direction of calculation. In brackets we show the number of equation in the system (76).

Fig. 15
figure 15

Calculation scheme

In the next step we would like to construct the algorithm for solution of (72) taking into account the explicit difference scheme (76) together with the initial conditions (77).

Fig. 16
figure 16

Domain of calculations

4.2.2 Algorithm

The algorithm contains two stage of calculations: the forward and inverse stages. In the forward stage we compute the lower four layers by i, i.e., the values of \(X_{i,j}\), where \(i=\overline{0,3}\), \(j=\overline{0,m}\). In the inverse stage we compute the residuary layers, i.e., \(X_{i,j}\), where \(i=\overline{4,n}\), \(j=\overline{0,m}\). At the same time, in order to find the position of the rod’s profile at the present time moment it is enough to find the values of \(X_{i,j}\) in the region bordered by a triangle (see Fig. 16). In other words, we need to organize the net with \(n=2m\) for the comfortable simulations.

The algorithm:

  1. 1.

    Let us assign the parameters of system \(m,\,M,\,l,\,I,\,E,\,\rho \);

  2. 2.

    Let us assign the initial conditions \(X_{0,0},\,Y_{0},\,\varphi ,\,V,\,V_{\varphi }\);

  3. 3.

    Let us assign the parameters of difference schema \(n,\,m,\,h_{\mathrm {x}},\,h_{\mathrm {t}}\);

  4. 4.

    Let us assign the parameters of control \(F_{0},\,\alpha ,\,k\).

  5. 5.

    Forward stage: From the initial conditions (77) and fourth equation of the system (76) we find:

    $$f_{j}=\varGamma \left[ X_{0,j},Y_{j},L,F_{0}\right] F;$$
    $$\begin{array}{l} j=0,\\ X_{1,0}=\varphi h_{\mathrm {x}}+X_{0,0},\\ X_{2,j}=2X_{1,j}-X_{0,j},\\ \displaystyle X_{3,j}=\left[ (M+m)gX_{0,j}-f_{j}h_{\mathrm {x}}\right] \frac{\rho h_{\mathrm {x}}^{3}}{\textit{MEI}}+3X_{2,j}+X_{0,j}-3X_{1,j}; \end{array}$$
    $$\begin{array}{l} j=1,\\ X_{0,1}=V h_{\mathrm {t}}+X_{0,0},\\ X_{1,1}=V_{\varphi }h_{\mathrm {t}}h_{\mathrm {x}}-X_{0,0}+X_{0,1}+X_{1,0},\\ X_{2,j}=2X_{1,j}-X_{0,j},\\ \displaystyle X_{3,j}=\left[ (M+m)gX_{0,j}-f_{j}h_{\mathrm {x}}\right] \frac{\rho h_{\mathrm {x}}^{3}}{\textit{MEI}}+3X_{2,j}+X_{0,j}-3X_{1,j}; \end{array}$$
  6. 6.

    Let us calculate the residuary points at \(i=\overline{0,3},\,j=\overline{0,m}\):

    $$\begin{array}{l} j=0\ldots (m-2),\\ \displaystyle Y_{j+2}=\frac{Fh_{\mathrm {t}}^{2}}{m_{p}}+2Y_{j+1}-Y_{j},\\ f_{j}=\varGamma \left[ X_{0,j},Y_{j},L,F_{0}\right] F,\\ \\ \begin{array}{l} \displaystyle X_{0,j+2}=\frac{h_{\mathrm {t}}^{2}}{M}\left( f_{j}-mg\frac{X_{1,j}-X_{0,j}}{h_{\mathrm {x}}}-EI\frac{3X_{1,j}-3X_{2,j}+X_{3,j}-X_{0,j}}{h_{\mathrm {x}}^{3}}\right) \\ \quad \quad \quad \quad \quad \displaystyle +\,2X_{0,j+1}-X_{0,j}, \end{array}\\ \\ \begin{array}{l} \displaystyle X_{1,j+2}=\frac{h_{\mathrm {t}}^{2}h_{\mathrm {x}}}{ml}\left[ f_{j}-(M+m)\frac{X_{0,j+2}-2X_{0,j+1}+X_{0,j}}{h_{\mathrm {t}}^{2}}\right] \\ \quad \quad \quad \quad \quad \displaystyle +\,2X_{0,j+1}+X_{0,j+2}+2X_{1,j+1}+X_{0,j}-X_{1,j}, \end{array}\\ \\ X_{2,j+2}=2X_{1,j+2}-X_{0,j+2},\\ \displaystyle X_{3,j+2}=\left[ (M+m)gX_{0,j+2}-f_{j}h_{\mathrm {x}}\right] \frac{\rho h_{\mathrm {x}}^{3}}{\textit{MEI}}+3X_{2,j+2}+X_{0,j+2}-3X_{1,j+2}; \end{array} $$
  7. 7.

    Inverse stage: Let we find \(X_{i,j}\) at \(i=\overline{4,n},\,j=\overline{0,m}\):

    $$\begin{array}{l} \displaystyle X_{i+4,j}=\left( g\frac{X_{1,j}-X_{0,j}}{h_{\mathrm {x}}}-\frac{X_{i,j+2}-2X_{i,j+1}+X_{i,j}}{h_{\mathrm {t}}^{2}}\right) \frac{\rho h_{\mathrm {x}}^{4}}{EI}\\ \quad \quad \quad \quad \quad \displaystyle -\,6X_{i+2,j}+4X_{i+1,j}+4X_{i+3,j}-X_{i,j}; \end{array}$$
  8. 8.

    Let we redefine the initial parameters \(X_{0,0},\,\varphi ,\,V,\,V_{\varphi }\);

  9. 9.

    Let we redefine the control parameters

    $$\begin{array}{l} \displaystyle e_{1}=\sum \limits _{i=0}^{n}\left( X_{i+1,0}-X_{i,0}\right) ,\\ \\ \displaystyle e_{2}=\sum \limits _{i=0}^{n}\frac{X_{i,0}-X_{i,1}-X_{i+1,0}+X_{i+1,1}}{h_{\mathrm {t}}},\\ \\ F=k\,\mathrm {sign}(\alpha e_{1}+e_{2}); \end{array} $$
  10. 10.

    Let we turn to step 5.

As we can see from this algorithm, the numerical value of force F should be recalculated on each new time interval T.

4.3 Optimization

As was mentioned above, the solution of the problem on stabilization of elastic inverted pendulum in the vicinity of the upper position is consisted in search of the optimal values for coefficients \(\alpha \) and k from the equality (69). In the system under consideration the problem of optimization corresponds to minimizing of the functional which determines the deviation of the pendulum from the vertical position. Let us consider an objective functional:

$$\begin{aligned} \mathfrak {J}=\frac{1}{T}\int \limits _{0}^{T}\left\{ \int \limits _{0}^{l}(X_{x})^{2}\mathrm {d}l+\int \limits _{0}^{l}[(X_{t})_{x}]^{2}\mathrm {d}l\right\} \mathrm {d}t. \end{aligned}$$
(78)

Here T is the time interval in which we find an optimal control.

Solution of the (72) that describe the dynamics of the system under consideration should be obtained under conditions that provides the minimization of functional (78). Physically this means that the problem is equivalent to minimization of mean-square deviation of the pendulum relative to vertical position.

In order to solve the optimization problem in the system under consideration, we use the bionic algorithms of adaptation because the hysteretic peculiarities in the considered pendulum’s model lead to some difficulties in use of the classical optimization algorithms due to non-differentiability of the functions in the system of equations.

Such algorithms are a part of the line of investigation which can be called as “adaptive behavior”. Main method of this line consists in the investigation of artificial organisms (in the form of computer program or a robot) that are called as animats (these animats can be adapted to environment). The behavior of animats emulates the behavior of animals.

One of the actual line of investigation in the frame of animat-approach is an emulation of searching behavior of animals [22, 33]. Let us consider the bionic model of adaptive searching behavior on the example of caddis flies larvae or Chaetopteryx villosa. Main schema of searching behavior can be characterized by two stages:

  • Motion in a chosen direction (conservative tactics);

  • Random change of the motion direction (stochastic searching tactics).

We consider this model for the simple case of maximum search for the function of two variables. Let we describe main stage of the considered model:

  1. 1.

    We consider an animat which is moved in the two-dimensional space xy. Main purpose of animat is maximum search for the function f(xy).

  2. 2.

    Animat is functioned in discrete time \(t=0,1,2,\ldots \). Animat estimates the change of current value of f(xy) in comparison with the previous time \(\varDelta f(t)=f(t)-f(t-1)\).

  3. 3.

    Every time animat moves so its coordinates x and y change by \(\varDelta x(t)\) and \(\varDelta y(t)\) respectively.

  4. 4.

    Animat has two tactics of behavior: (a) conservative tactics; (b) stochastic searching tactics.

Displacement of animat in the next time \(\varDelta x(t+1)\), \(\varDelta y(t+1)\) for these tactics determines in a different ways. Switching between the cycles drives by M(t). Time dependence of M(t) can be determined using the equation:

$$\begin{aligned} M(t)=k_{1}M(t-1)+\xi (t)+I(t), \end{aligned}$$
(79)

where \(k_{1}\) is a parameter which determines the switching persistence of tactics \((0<k_{1}<1)\), \(\xi (t)\) is a normal distributed variate with an average value equal to zero and mean-square deviation equal to \(\sigma \), I(t) is an intensity of irritant. For the value of I(t) there are two possibilities:

$$\begin{aligned} I(t)=k_{2}\varDelta f(t) \end{aligned}$$
(80)

and

$$\begin{aligned} I(t)=k_{2}\frac{\varDelta f(t)}{f(t-1)}, \end{aligned}$$
(81)

where \(k_{2}>0\). As follows from (80) to (81) the intensity is positive when the step leads to increasing of function, otherwise the intensity is negative. It should be noted also that the (81) can be applied in the case \(f(t)>0\).

We assume that at \(M(t)>0\) animat follows the tactics (a) and at \(M(t)<0\) it follows tactics (b). So, the value of M(t) can be considered as a motivation to selection of tactics (a).

Thus, the algorithm of maximum search can be considered as follows:

Tactics (a): Animat moves in the chosen direction. The displacement of animat is determined by \(R_{0}\)

$$\begin{aligned} \varDelta x(t+1)=R_{0}\cos {\varphi _{0}},\end{aligned}$$
(82)
$$\begin{aligned} \varDelta y(t+1)=R_{0}\sin {\varphi _{0}}, \end{aligned}$$
(83)

where the angle \(\varphi _{0}\) defines the constant direction of motion of animat:

$$\begin{aligned} \cos {\varphi _{0}}=\frac{\varDelta x(t)}{\sqrt{\varDelta x^{2}+\varDelta y^{2}}},\end{aligned}$$
(84)
$$\begin{aligned} \sin {\varphi _{0}}=\frac{\varDelta y(t)}{\sqrt{\varDelta x^{2}+\varDelta y^{2}}}. \end{aligned}$$
(85)

Tactics (b): Animat makes an accidental turn. The displacement of animat is determined by \(r_{0}\) but the direction of motion is accidentally varied

$$\begin{aligned} \varDelta x(t+1)=r_{0}\cos {\varphi },\end{aligned}$$
(86)
$$\begin{aligned} \varDelta y(t+1)=r_{0}\sin {\varphi }, \end{aligned}$$
(87)

where \(\varphi =\varphi _{0}+w\), \(\varphi _{0}\) is an angle which characterizes the direction of motion at current time t, w is a normal distributed variate (average value of w equal to zero and mean-square deviation equal to \(w_{0}\)), \(\varphi \) is an angle which characterizes the direction of motion at time \(t+1\).

In that way we can use the proposed algorithm for searching the optimal control in the problem of stabilization of elastic inverted pendulum . Taking into account the reasoning presented above we can apply the presented algorithm to functional \(\mathfrak {J}(\alpha ,k)\) where the coefficients \(\alpha \) and k determine the character of control of the mechanical system under consideration following the (69). Due to the fact that the presented bionic algorithm is used to maximum search of the function of two variables we will consider minimization of functional (78) as a procedure for finding the coefficients \(\alpha \) and k that lead to realization of the condition

$$\begin{aligned} -\mathfrak {J}(\alpha ,k)\rightarrow {\max }. \end{aligned}$$
(88)

4.4 Numerical Results

4.4.1 Elastic Inverted Pendulum

Now we can make a simulation of the behavior of elastic inverted pendulum using the corresponding difference scheme in the absence of backlash (\(L=0\)). Using the bionic algorithm we can find the optimal values of coefficients \(\alpha \) and k.

The characteristics and initial conditions for the mechanical system under consideration are:

$$m=1\,\text{ kg },\, M=10\,\text{ kg },\, l=1\,\text{ m },\, \rho =0.5,\, E=10,\, I=4,\, \theta _{0}=0.06^{\circ }.$$

In the searching process for optimization using the bionic algorithm we have obtained the following values of the coefficients: \(\alpha =22.04\) and \(k=1.15\).

In order to estimate the stability of the system under consideration we use the Lyapunov criterion. Namely, we use the following Lyapunov function :

$$V=e_{1}^{2}+e_{2}^{2}.$$

Phase trajectory of such a system together with the dynamics of Lyapunov function in time (in discrete time which corresponds to difference scheme) are presented in the Fig. 17. In this figure the integral angle \(e_{1}\) and integral angular velocity \(e_{2}\) correspond to (70) and (71), respectively.

Fig. 17
figure 17

Phase trajectory (left panel) and dynamics of Lyapunov function (right panel) in the absence of backlash (\(L=0\)). The parameters are \(\alpha =22.04\) and \(k=1.15\)

In the Fig. 18 we present the phase trajectory and Lyapunov function for another values of \(\alpha \) and k: \(\alpha =50\) and \(k=0.4\).

Fig. 18
figure 18

The same as in Fig. 17 but for another values of parameters \(\alpha \) and k, i.e., \(\alpha =50\) and \(k=0.4\)

As we can see from presented figures the Lyapunov function satisfies the following condition (during all the considered time interval):

$$V(t)<\,\text{ const }.$$

This means that the considered inverted pendulum eventually tends to stable vertical position.

4.5 Elastic Inverted Pendulum with Backlash in Suspension

Now, let we add the backlash in the suspension point of a considered mechanical system and let we investigate the behavior of such a system with the same parameters as in previous subsection. Using the bionic algorithm we have obtained the following optimal values of coefficients: \(\alpha =9\) and \(k=2\).

The mass of a piston is \(m_{p}=1\,\text{ kg }\). Main parameters of the system are the same as in previous section. The phase trajectories of such a system (as previously we use \((e_{1},e_{2})\) coordinates) and dynamics of Lyapunov function for different values of a control coefficients are presented in Fig. 19.

Fig. 19
figure 19

Phase trajectories (left panels) and dynamics of Lyapunov function (right panels) in the presence of a backlash in suspension point. Parameters of a backlash and control coefficients are: (a) \(L=0.01\,\text{ m }\), \(\alpha =9\), \(k=2\); (b) \(L=0.02\,\text{ m }\), \(\alpha =9\), \(k=2\); (c) \(L=0.02\,\text{ m }\), \(\alpha =10.5\), \(k=1.5\)

As we can see from the presented figure (both from the phase trajectories and Lyapunov function) the considered system (at the same main parameters and different values of L and control coefficients \(\alpha \) and k) also eventually tends to stable state.

5 Conclusions

In this work we have considered the problem of inverted pendulum under hysteretic control in the form of a backlash in suspension. In the first part of this work the explicit condition for the stability of such a system has been obtained using the monodromy matrix technique (for the monodromy matrix is also obtained the explicit expression). The periodic solutions in such a system is also analyzed and the corresponding equations for the parameters a and \(\omega \) are obtained. Here it should be pointed out that the dynamics of the inverted pendulum with hysteretic control qualitatively differs from the dynamics of the pendulum with conventional control. The presence of the hysteresis element complicates the study of the dynamics of mechanical systems. As a result, the main results were obtained using the numerical simulations only.

In the second part of this work we have considered the mathematical model of the inverted pendulum with hysteretic nonlinearity under state feedback control. The obtained results not only accurately predict the behavior of a pendulum under hysteretic control, but also allow to determine the possibility of the dissipative motion in the vicinity of the top position. The existence of dissipative motion depends on the initial deviation of the pendulum’s position as well as on the physical parameters of the system under consideration. Introduction of non-ideal relay in the state feedback control allows us to describe the periodic modes of the system (28). However, it should also be noted that the results obtained for the presence of non-ideal relay in the state feedback control can be used for description of real physical (and, in particular, mechanical) systems because the parameters of such systems can be measured with the inevitable uncertainties only. Also, our numerical experiments show that the presence of the backlash with nonzero step in the feedback control of inverted pendulum leads to dissipative motion only and asymptotic convergence to an upright position is fundamentally unattainable. We have also considered the question on the optimal control of the system under consideration. The theorem on the optimal control of pendulum has been formulated and discussed.

In the last part we investigate the stabilization problem of elastic inverted pendulum with a backlash in suspension point. Also the problem of optimization for the system under consideration is analyzed. Main coefficients that provide the solution of optimization problem for the considered system are obtained using the so-called bionic algorithm. All the numerical results on stabilization of the system under consideration have been obtained using the numerical method based on the difference scheme. The results of numerical simulations shown that the considered system eventually tends to stable state both in the case of the absence of backlash and in the case of its presence. These facts have been presented in the form of corresponding phase portraits for the considered system. Moreover, in order to estimate the stability of elastic pendulum with hysteretic nonlinearity in the suspension point we have used the Lyapunov criterion and the dynamics of corresponding Lyapunov function has also been presented.