Unstable Mechanical Objects: Motion Control, Stabilization

We consider here mechanical objects that have desired operating regime unstable without additional control signal. The resources of control are assumed limited. First of all the motion equations of a multi-link pendulum mounted on a moving base – wheel are designed. Equations that describe only the pendulum motion are separated. The problem of controlling a single inverted pendulum on a wheel is studied. Control law that ensures large basin of attraction of the top unstable equilibrium is developed. The 'inverse' system – the inertia wheel pendulum with fixed suspension point is investigated. For this system the control algorithm is developed to stabilize globally the top equilibrium of the pendulum. This control law is tested successfully in simulation and experiments. The double pendulum with fixed suspension point is considered. The limited in absolute value control torque is applied in the inter-link joint. The control algorithm to ensure global stabilization of the inverted pendulum is designed. For maximizing basin of attraction of unstable system, we use all control resources to suppress the unstable modes. At the end of the paper, the problem of gyroscopic stabilizing of the upright unstable position of a robot-bicycle is studied.


Introduction
The paper is dedicated to the synthesizing control algorithms for objects that may have desired operating regimes unstable without additional guidance. If the desired operating regime is stable without control, i.e., the object of control is naturally stable, then the purpose of the control system is to improve the quality of transient processes. But if the desired operating regime is unstable without control -the object is naturally unstable, the primary goal of the control system becomes stabilization of this regime. In this case, it is virtually impossible to implement the desired operating regime without any control, and the matters of transient quality fade into insignificance.
The problems of designing a control law for an unstable object and stabilizing a desired operating regime are concerned with certain difficulties. In any real system, control resources are in some way or another limited. Hence an unstable object cannot be translated to a desired operating regime from any state. In other words, the set of states from which the unstable object can be driven to the desired operation regime for a set of control resource limitations occupies an area of the phase space. This area is called "controllability domain". The basin of attraction of the desired operating regime, appearing when some specific control law is designed belongs to the controllability domain; mostly, it occupies only a part of this domain. Here, as usual, the basin of attraction is the set of initial states from which the system under admissible feedback control asymptotically tends to the desired regime of motion. If the basin of attraction is small with respect to practically possible disturbances of the object motion, then the desired operating regime is practically unrealizable. This means that the control resources are insufficient, or the control law is not efficient. Thus, if limitations are imposed on control resources, the problem of constructing a control law that would maximize the basin of attraction becomes crucial. This problem is discussed in this paper. It often happens that the number of control inputs in the system is less than its number of degrees of freedom, or, in other words, the system is under-actuated. This case is also discussed in our study.
Approaches to control law design for unstable systems developed in this paper are based on methods of optimal control theory, stability theory. Concepts of attainability, controllability domains and basins of attraction are used. Methods of control law design for systems with degree of instability equal to one or two are developed here. In a majority of considered problems the control laws used to Universal Journal of Mechanical Engineering 5(5): 150-169, 2017 151 stabilize a desired working regime of a discussed object is constructed in such a way that all resources of the control are used for suppressing unstable modes of motion. Such method of control law design provides maximal basin of attraction of the desired working regime. Problems of both local and global stabilization are investigated in the paper. When solving global stabilization problems, it is necessary to construct essentially nonlinear control functions. Optimal control and optimal trajectories are designed for some problems. The time-optimal control is designed using Pontryagin maximum principle. The optimal control is obtained in form of feedback. In some cases, intuitive consideration is used to create a control law.
Under-actuated systems are studied by some authors (see the corresponding references further in the text). We also consider this kind of systems, but in our study these systems are furthermore unstable and their resources are restricted. Problem of control design for unstable under-actuated systems as well as with limited resources becomes very difficult.
The approaches developed here can be applied, for example, to design automatic control of Segway, Solowheel and other unstable wheeled vehicles.
A group of particular systems is studied. However, the approaches to control synthesizing that are used for these systems, in author's opinion, can be also used in other cases. Control algorithms are created that provide maximal basin of attraction for a variety of mechanical objects. These objects include different pendulum-like systems and wheeled vehicles. Among these objects, a double-wheel robot-bicycle with gyroscopic stabilization system is considered.
This paper is extended and corrected version of the relatively short paper [1] based on the keynote lecture submitted to conference "Dynamical Systems -Theory and Applications" (December, 7-10, 2015, Lodz, Poland).

Planar n-link Pendulum on a Wheel
Let us consider n-link pendulum on a wheel which can roll without slipping over a horizontal supporting plane. The pendulum links move in the same vertical plane as the wheel. Pendulum is mounted on a wheel via a joint O (see Figure 1). . The mass of the k-th link is denoted as k m , the length of this link (the distance between the k-th joint and the joint number 1 k + ) -as k l , the radius of gyration with respect to the k-th joint -as k r . Let the center of mass of each link be located on the segment that connects its ends (the joints), and the distance to this center of mass from the k-th joint be k b . We design mathematical model of the pendulum on a wheel using Lagrange's approach of second kind. After many analytical computations the motion equations can be written in the following compact matrix form: control torque L is applied to the first link at joint O, ( ) A β is the symmetric matrix ( ) ( ) 1 1 n n + × + of the kinetic energy: ( (the asterisks in representation of matrix ( ) A β are placed wherever the omitted expressions can be restored assuming that the matrix is symmetric), . ( The first column in matrix ( ) B β , as well as in G, is zero. This is natural, since the motion equations do not involve angle 0 β or its velocity 0 β  . Note that system (1) -(4) includes the second powers of generalized velocities (see third expression in (2)) and does not include their products. The submatrix of the n-th order that is in the right-bottom corner of matrix is skew-symmetric. Relatively simple structure of system (1) is a result of the choice of generalized coordinates: angles of the link deviations from the vertical line were chosen, and not the inter-link angles. The mathematical model of a human-like mechanism studied in [2] has a similar structure.
Solving equation (1) for the highest order derivatives yields The last n equations in system (5) involve only angles k β ( ) 1, 2, . . . , k n = with their derivatives. These equations can be separately written as a system ( ) System (1) -(4) is different from the known system of equations used to describe motion of an n-link pendulum with a fixed base [3], [4]. Note that system (1) -(4) is under-actuated one.
Unlike the wheel-based pendulum, torque L applied in joint O of the pendulum on a cart does not influence directly on the cart motion. To derive motion equations of this system, the angular acceleration 0 β  in system (1)must be replaced with linear acceleration x  of the cart using relation 0 x R β =−   , and the first element -L in column-matrix Q must be set equal to zero. To make use the expressions for coefficients of matrices ( ) A β , ( ) B β , the value of R must be set equal to one, and ρ -to zero. Excluding acceleration x  from these equations yields a system of n equations like (6).

Single-link Pendulum on a Wheel
If 1 n = , then the original system consists of a single-link pendulum mounted on a wheel (see Figure 2). For simplicity instead of notations 0 β and 1 β we use here ϕ and β respectively. The device shown in Figure 2 can be considered as a plane model of "Segway" or "Solowheel" [5], [6], [7] with person on it. Parameters , , m r and b are respectively mass of the link (person), its radius of inertia, and distance from point O to its mass center. This system has two degrees of freedom, and, according to matrix equation (1), it is described by two scalar equations ( ) controlling parameter -torque L. Thus, this system is under-actuated one.
The angular acceleration ϕ  of the wheel can be extracted from equation (7) and substituted into (8). After we introduce non-dimensional time τ and non-dimensional torque µ as t gb r τ = and L mgb µ = .
Then we obtain equation similar to (6), which for one link on a wheel becomes scalar equation of second order. This equation involves only angle β of the link inclination. It contains parameters of the pendulum, but also (what is interesting) parameters of the wheel M, R, and ρ. This scalar equation can be rewritten as the system of second order: Here ( ) Prime mark ' represents differentiating with respect to non-dimensional time τ. If wheel mass M → ∞ , then , 0 d e → , and equations (9) convert into motion equations of a "regular" pendulum with stationary pivot, that is natural. System (9) is different from these equations. It involves factor 2 2 1 cos d − β at derivative ′ ω , which does not appear in equations that describe motion of a regular pendulum. This factor effectively reduces (if 2 β ≠ π ) the inertia moment of the pendulum as compared to the same pendulum with a fixed pivot. It is like the wheel-based pendulum has less inertia.
We assume that the absolute value of control torque L is limited by constant 0 The set of piecewise-continuous functions ( ), µ τ each of them complying with inequality (10), will further be denoted as W, so Linearization of system (9) about its equilibrium (11) yields the following equations: Equations (13) and (14) describe the behavior of "unstable" variable y corresponding to positive eigenvalue ( ) 1 a and of "stable" variable z corresponding to negative respectively. When 1 a = , 1 c = equations (12) - (14) lead to linearized equations of the regular pendulum with a stationary pivot.

Domain of Controllability of Pendulum on the Wheel
Consider a set P of initial states, where for each state there exists an admissible control function ( ) , W µ τ ∈ that moves the system (13), (14), into its equilibrium 0, Such set P is called domain of controllability [8]. This set is bounded only with respect to the unstable (see equation (13)) coordinate y [8]. It is described by the following inequality: Interval (15) of axis y is illustrated in Figure 3.  Figure 4 illustrates on the plane of variables , ′ β β domain of controllability P for wheel-based pendulum and domain of controllability Q for the regular pendulum with a fixed pivot. It is worth to compare these domains. Stripe P is wider than stripe Q, because 1 c > and 0 1 a < < . However, domain Q does not lie inside domain P, because the straight lines that confine domain Q are not parallel to the lines that confine domain P.
. Rhombs Q Π and P Π are drawn to illustrate (symbolically), that in the neighborhood of the origin 0 ′ β = β = domain Q lies inside domain P. Thus domain of controllability Q of the regular pendulum is in a sense smaller than domain of controllability P of the pendulum on a wheel. Thus, the wheel-based pendulum is easier to stabilize. This is reasonable, since in the latter case the torque generated by the motor actuates not only the body of the pendulum, but also the wheel, accelerating the pivot (the wheel center O) and contributing even more to system stabilization.
Writing inequality (15) Using inequality (16), it is possible to evaluate the influence of various parameters on the controllability domain. These evaluations are helpful, for example, when constructing a transportation device like Segway, Solowheel. The unstable motion mode of system (13), (14) can be "suppressed" by means of control function that is effectively a linear feedback with saturation -nonlinear feedback: It is easy to see that under all initial conditions the solution to scalar equation (13) under control (17) as . Then, in accordance with relation (17), as . And then solution to equation (14) for any initial value converges to zero. Thus, trivial solution to system (13), (14), (17) is asymptotically stable under initial conditions , regardless of initial condition . Hence basin of attraction B of the coordinates origin for control function (17) coincides with domain of controllability P: . Therefore, this basin of attraction is maximal as possible for system (13), (14) and for system (12). As usual, basin of attraction is understood as a set of initial coordinate pairs from which a controllable system converges asymptotically to a desired state.
To summarize, for maximizing basin of attraction B for system (13), (14), all resources of control must be spent on suppressing the unstable mode. And it is possible to maximize the basin of attraction using linear with saturation feedback.

Domain of Controllability for Nonlinear System and
Time-Optimal Control Expressions (15) or (16) describe the set P of initial states from which linear system (12) or (13), (14) can be translated to the origin . Now the task is to build in stripe of the phase plane a set D of states from which nonlinear system (9) can be translated to equilibrium without oscillations about position The task of finding such a domain is important for investigation of motion of a device like Segway, because when a passenger is stabilized on such a device, any large angular deviations from the vertical are unacceptable. And, of course, angular deviations greater than are impossible. The sought domain of controllability D is apparently symmetric with respect to point 0, 0. β = ω = Figure 6 illustrates domain of controllability D for non-linear system (9)  Figure 6 are the borders of controllability domain P (15) of linear system (12). The green borders of domain D are build using the first integrals of system (9)  β ω + β − β + β µ = (18) Expression (18) becomes energy integral of system (9) when At Figure 6 one can see that domain P (15) in the neighborhood of the desired equilibrium (11) encloses a "considerable" part of exact domain D. Figure 7 illustrates the controlled time-optimal motion inside domain D of the system. Switch curve is shown by pink color and noted as K. Blue lines on the same Figure 7 are the time-optimal trajectories. The phase point at first moves along a blue line until it reaches switch curve K. Then it moves along this curve K all the way to the origin. The picture of time-optimal control is obtained using Pontryagin maximum principle [9].

Pendulums with Stationary Pivot
Here we consider several systems, which contain singleor double-link pendulum on the motionless base. Control algorithms are suggested for relocating the pendulum from its bottom stable equilibrium, into the top unstable one.

Pendulum with a Flywheel
Unstable Mechanical Objects: Motion Control, Stabilization The pendulum can rotate in vertical plane. The data used in the control system includes angle and angular velocity of the link rotation and angular velocity of the flywheel rotation with respect to the link. Figure 9 illustrates the structure of the pendulum. Link OC is connected to the stationary support at joint O. The axis of the joint is perpendicular to the pendulum movement plane (that is the drawing plane). The flywheel is symmetric with respect to its rotation axis. It is installed at the end point of link OC, namely, at point C. The flywheel is shown as a circle with its center point C. The flywheel can rotate clockwise or counter-clockwise about a horizontal axis that goes through point C and is perpendicular to the pendulum swing plane. The axis of the motor that rotates the flywheel is parallel to joint axis O. Thus the flywheel together with the motor armature has one degree of freedom with respect to the pendulum link. Such pendulum with a flywheel is often referred to as «inertia wheel pendulum» [11], [12].
Here . Moment of inertia of the link with respect to joint O is denoted by . Let M designate the total mass of the flywheel together with the motor, and are respectively the moments of inertia of the flywheel and of the motor armature with respect to their rotation axes, m is the link mass, b -the distance between joint O and link center of mass. Equations (19), (20) do not contain angle ϕ, angular velocity , but contain angular acceleration . The motor armature rotates with respect to its stator at velocity Ω, and , where χ denotes reduction ratio. System (19), (20) has two degrees of freedom, but only one controlling parameter L. Thus, system (19), (20) like system (7), (8) is under-actuated one.
Extracting angular acceleration from equation (20) and substituting it in (19) will yield an equation that contains angle β, its first and second derivatives, and does not contain variables ϕ, , and . If torque L does not depend on angular velocity ω, then the resulting equation of second order that describes only the oscillations of the pendulum can be separated from system (19), (20). It should be noted, however, that this equation does contain (what is interesting) the parameters of the flywheel. This is similar to the problem of controlling a wheel-based pendulum, as described in subsection 2.1.
Torque L is developed by a DC motor and it is proportional to the electric current flowing in the armature coil. Considering inductivity of this coil negligible this torque can be represented as Product describes torque arising due to back electromagnetic forces (e.m.f.). Positive constant coefficients and can be derived from the technical data provided for each particular DC motor. If back e.m.f. is not negligible, then system (19), (20) of third order can't be reduced to one equation of second order. In this case we have to consider both equations (19) and (20).
We will consider the limitation imposed on voltage u supplied to the motor Introduce nondimensional time τ according to formula t = ϑτ . Here ϑ is some constant. Then equations (19), (20), (21) can be transposed into nondimensional form as follows: are nondimensional parameters of the system, and are nondimensional angular velocity of the flywheel and nondimensional voltage.
In new nondimensional notation, inequality (22) System of equations (23), formulated in terms of nondimensional variables, is considerably simpler than original system (19), (20). It includes three parameters (24), that are nondimensional ones. With 0 v = nonlinear system (23), has a trivial solution that corresponds to the top, unstable equilibrium of the pendulum and motionless flywheel. The problem of global stabilization of equilibrium (27) is worth discussing in detail.

Translating the Pendulum from the Bottom Equilibrium into the Top One
Stable bottom equilibrium of the pendulum with a flywheel is described by relations We will design control algorithm to translate the pendulum from its bottom stable position (28) to the top unstable equilibrium (27). To solve this problem of translating the pendulum must first be given a swing, and then when it reaches the topmost position, it must be "caught" and stabilized. It is possible to prove that switching control law with voltage v applied to the motor as makes the pendulum swing. Mathematical model (23) does not account for friction torque in joint O, because it was made as small as possible ("almost zero") when the device was built. It still needs to be mentioned, however, that the friction, no matter how small, is always present in practice, but it is difficult to parameterize and include into the mathematical model. Control law (29) swings the pendulum, pumping energy into it. We stop the swinging as energy E of the pendulum reaches value -its potential energy in the top equilibrium. Then, in absence of friction, the pendulum will get into basin of attraction of equilibrium (27), where from another control law will translate it to the top equilibrium and will stabilize it. But if friction is present, then, with no extra pumping, the energy will dissipate, and as a result, the pendulum may not reach the basin of attraction. If the pumping is stopped when the value of energy is greater than , then the pendulum may bypass the desired equilibrium. So, after the desired energy level is reached, it is kept by pumping under control until the pendulum gets into the basin of attraction of equilibrium (27).

Local Stabilization in the Top Equilibrium with Large Basin of Attraction
This subsection discusses the problem of stabilization of the pendulum in its top, unstable equilibrium 0 β = , We assume that at the beginning of this process the pendulum is already within some neighbourhood of the desired position.
Equation system of third order (23) has the only nonlinear component -sin β . The round swings of the pendulum will not be considered, and also angle β will be assumed close to zero during the process of stabilization. Then substituting for function sin β its argument β transposes system (23) into an approximate linear system of equations , the zero eigenvalue "drifts" leftwards, the other two eigenvalues also drift, but still remain positive and negative at all values of 0 e > . This statement proves to be true since function ( ) F λ changes its sign three times when its argument λ varies from -∞ to +∞. Its plot intersects negative semiaxis λ twice and positive semiaxis once. Indeed, The second last inequality in (33) is true because (see notation (24)). This inequality can be proved directly, it is also related to the fact that the matrix of kinetic energy is positive-definite. Thus, equation (32) has three different real roots. One positive: , and two negative: .
That means the open-loop system, i.e. system without control, is unstable. The degree of the instability of this system is equal to one.
A linear transformation of variables β, ′ β , σ with constant nondegenerate matrix K transposes system (31) into Jordan form, and the system breaks into three scalar equations that are cross-related only by control input v: k j e = χ in equality (36) are the elements of the first line of transformation matrix K. All elements of transformation matrix K can be calculated analytically. The following equalities also take place: Note that eigenvalues i j λ ≠ λ ( ) ; , 1, 2, 3 i j i j ≠ = . Therefore, system (35), and consequently original system (31) is completely controllable in Kalman's sense [13], [14].
In terms of state space the set of initial states from which system (35) can be translated into the origin while inequality (26) is maintained is a stripe (see [8] and also inequality (15)) 1 1 0 1 So, domain of controllability P is limited only in its "unstable" variable 1 y . The unstable motion mode of system (35) can be "suppressed" by means of control function that is effectively a linear feedback with saturation: coincides with domain of controllability P: . Therefore, this basin of attraction is maximal as possible for linear system (35) and consequently for linear system (31). The more the basin of attraction at a local stabilization, the easier it is to build control, providing a global stabilization.
Control law (39) is similar to control law (17) for pendulum based on a wheel.
Control algorithm to translate the pendulum from its bottom stable position (28)

Double-link Pendulum with Limited Torque Applied in Elbow
Planar double pendulum is a system with two degrees of freedom. Controlling such system is a complicated task, if there is only one control input and the system is under-actuated one. This control input can be, for example, a torque L applied in the joint between the two links -in the "elbow". Such pendulum with a torque in the elbow is often referred to as «acrobot» [15], [16]. The problem gets even more complicated if the control parameter is limited in its value. Limitation imposed on control input is significant when the desired mode of system motion without control is unstable. In this case, as a result, a set of initial states from which the system can be put into a desired mode is limited. Current section considers the problems of local stabilization, and also the global stabilization, of an unstable equilibrium of a double-link inverted pendulum. The problems of optimal swinging and damping of the double pendulum are also discussed here.
Plane double-link pendulum is shown in Figure 12.
Here expression Here K is the angular momentum of the system with respect to pivot point O Equations (43) and (45) may be taken instead of (40) and (41) as a new system of motion equations. The new phase variables are K, ϕ, and new control parameter is α. However, equations (43), (45) involve derivative together with angle α itself. This makes angle α difficult to use as a control parameter and to solve the problems of optimal control design that are formulated below. In order to exclude derivative from consideration we introduce new variable -the reduced angle p. The left-hand side of relation (45) may be written as where ( ) Then equation (45) can be written as After substituting angle ϕ from expression (49) into (43), the latter transposes to Relations (50), (51) may be considered as a second-order system of equations where the variables are reduced angle p and angular momentum K. Angle α in equations (50), (51) is an external variable. This variable may be interpreted as a intermediate control parameter, assuming that applying torque L in the inter-link joint is possible to realize any behavior of this angle.
Since for all values of angle α, value p monotonically increases on time intervals where , and it monotonically decreases on intervals where . On each of these intervals system (50), (51) can be rewritten as a single equation of the first order So, an idealized model (50), (51) or (52) with control parameter α will be investigated. It is assumed that angle α can vary in a given range The set of admissible control functions will be denoted as U.
Let the initial state of the system be given  (51)). It follows from differential equation (51) that at such value of (0) α derivative K  is positive. So the angular momentum K that was equal to zero at 0 t = , at the beginning of motion (when 0 t > ) will start to increase, and it will become positive. Let initial condition (0) p and the values of min max , α α be such that with each admissible control function ( ) t U α ∈ angular momentum K at some time instant 1 0 t > becomes zero: has a different corresponding time 1 t . It follows from (50) that on entire time interval 1 (0, ) t angle p increases strictly monotonically, because on this interval angular momentum 0 K > . Let us consider the following problem of optimal pendulum swinging. It is required to find such law of varying the control parameter α that angle p reaches its maximum possible value at some time 1 0, t > when the angular momentum K becomes zero (again) for the first time since the beginning of motion: 1 ( ) 0 K t = . This can be symbolically written as: The stated problem is the problem of maximizing the reduced angle p at the end of a "half-cycle" of pendulum To solve problem (55) it is necessary and sufficient to maximize derivative during the whole motion. In other words, the right-hand side of equation (52) must be maximal. If , then at each time instant angle α must be chosen from within range (53) so that product would be maximal. Therefore, the sought optimal control function can be written as The maximum of function with respect to variable α is attained on the boundary of segment (53) or inside this segment. If , then the double pendulum will move like if it were a single pendulum. At that, . Function (56) is not identically equal to zero, so under control law (56) . Thus at an end of an oscillation semiperiod (the end of half-cycle) the deviation of value from zero will be greater than at the beginning of this semiperiod, i.e. .
N o t e. If at time instant , when angular momentum K becomes zero, angle α changes instantaneously (stepwise), then, as it follows from equation (43), momentum K remains zero. It follows from (50) that reduced angle p also remains unchanged. As for angle ϕ, it changes stepwise, according to expression (49). If the value of α is taken from within interval (53) so that function takes its minimum value, the value of angle ϕ at time instant is maximized (see relation (49)).
So, to maximize the deviation angle ϕ at time instant when the angular momentum becomes zero, i.e. at the end of a half-cycle, it is required, first, to use control (56), and second, to assign at time instant value α that minimizes function . If we want to maximize the oscillation magnitude of the pendulum at the next semiperiod, when 0  dK dp Unstable Mechanical Objects: Motion Control, Stabilization Figure 13. Dynamics of angular momentum K and angles p, α, ϕ Figure 14 shows the trajectory of optimal pendulum swinging in phase plane ( ) , . p K The same trajectory but in terms of variables ϕ and K is shown in Figure 15. Figures  14 and 15 also show that proposed control function swings the double pendulum. Figure 15 better than Figure 13 shows the discontinuity points of function ( ).  Figure 15 as horizontal segments. These segments are located on the abscissa, where angular momentum K changes its sign, and also in some other points of plane ( )

, . K ϕ
The inter-link angle α is considered as an intermediate control parameter. The actual control is performed by torque L applied in the inter-link joint. Using this torque, it is possible to track a desired dynamics of the inter-link angle ( , ) p K * α (see expression (58)). Such tracking may be provided by means of a linear feedback (a PD-controller) with saturation: Here and are the constant feedback coefficients, respectively for deviation of angle α from its desired value and for angular velocity . These coefficients are to be assigned. The feedback signal limitation emerges naturally due to restriction (42). We use control law (61) in full system of equations (40), (41).  To solve problem of quick pendulum damping, it is necessary and sufficient that during all motion derivative is the least possible. In other words, the right-hand side of equation (52) must be minimal. So, when the sought optimal control law can be presented in form (57) and when -in form (56). Thus, the control for quick damping can be written in the form like (58): (62)

Local Stabilization in Top Position with Large Basin of Attraction
In Figure 16, the double-link pendulum «near» the top unstable position is shown Suppose that during the pendulum swinging under control (61) it reaches some sufficiently small neighborhood of the top, unstable equilibrium (see Figure  16) Once this happens, the task is to stabilize equilibrium (63) locally. When designing a stabilization law, it is appropriate to maximize the basin of attraction of the desired equilibrium, because the larger the basin of attraction, the easier it is for the pendulum to get inside that basin during swinging process. In other words, the larger the basin of attraction, the more robust the control algorithm is.
Method of designing a control algorithm that provides a "large" basin of attraction is the following. First, we linearize equations (40), (41) about desired top equilibrium. The resulting linear system has (without control) two positive 1 2 0 µ > µ > and two negative 1 , −µ 2 −µ eigenvalues. This system is then transposed to Jordan form, and two equations are separated that correspond to the positive eigenvalues 1 2 , µ µ ( ) Note that with control function 0 ( ) L t L ≡ system (64) has a stationary point (that is unstable): and with control function -stationary point (also unstable): Domain Q of controllability of linear system is limited in , , , Y y y y y with respect to "unstable" variables 1 y and 2 y . It is not limited with respect to the other two Jordan variables 3 y , 4 y that correspond to the negative eigenvalues Set S is the domain of controllability of system (64), i.e. it is the set of initial states , from which system (64) can be translated to origin (67) by means of admissible control function The boundary of this set S is formed by two integral trajectories of system (64) that are symmetric with respect to origin (67). These trajectories result from assigning constant control signals and [8]. One of these trajectories that result from putting begins at at point (66), and as it converges to point (65). Its parametric equations are as follows: Unstable Mechanical Objects: Motion Control, Stabilization (42). The question of existence of corner points in domains of attainability, controllability is regarded in study [18], [19]. The presence of such points is related to the fact that Bellman's function may be not smooth (in our case, the Bellman's function shows the relationship between the minimal time of bringing the system to the origin (67) and its initial state in phase plane ). Consider a double pendulum with identical homogeneous links, in other words 1 2 m m m = = , 1 2 2 r r l = = , The eigenvalues for a double pendulum with such links are the following: Column vector d that corresponds to control torque is: The boundaries of controllability domain S with two corner points are shown in Figure 17 by dashed line. The pendulum parameters that satisfy conditions (70) are: A straight line that passes through corner points (65), (66) can be described by equation Let us design the control (stabilization) law as a linear feedback that involves the unstable variables 1 y and 2 . y Consider control law as follows: Here γ is an "overall" feedback gain that needs to be determined. Applying linear feedback (75) will apparently "suppress" the instability of variables 1 y and 2 . y Since the control torque L is limited in absolute value (see inequality (42)), a saturated linear feedback should be taken instead of (75): Note that variables 1 y , 2 y are linear combinations of original variables , ϕ α, , ϕ  . α  Thus, expression (76) describes a feedback that actually involves all phase coordinates of original system.
Using the characteristic equation of the second-order system (64) with linear feedback (75) (λ stands for the spectral parameter) ( ) it is possible to show that feedback gain γ can be chosen to stabilize system (64), (75). For both roots of equation (77) to be in the left semiplane of complex plane, it is necessary and sufficient that the second coefficient is positive, i.e.
( ) If criterion of asymptotic stability (78) is satisfied, then there exists such a neighbourhood of the origin (67) that the solution to system (64), (76) that starts from initial state belonging to this neighbourhood asymptotically converges to the origin (67). This neighbourhood itself should be contained in domain of controllability S. Otherwise, system (64) could be translated to the origin by means of a limited in absolute value control input from points . This would be in a contradiction with the definition of controllability domain S.
If the time is reversed t t → − , then system (64) transposes to system ( ) Under condition (78) origin (67) is an unstable equilibrium of system (79), (76). Let initial state of this system, be close enough to the origin, within the attraction basin of system (64), (76). The corresponding solution to system (79), (76) at will remain inside domain of controllability S, that itself is limited in the plane of variables (see for example Figure 17). The solution to system (79), (76) that begins in a small neighbourhood of the origin converges to a periodic solution as [20]. Such periodic solution is a stable limit cycle of system (79), (76). At the same time, it is an unstable solution to system (64), (76), and thus it is the boundary of attraction basin B of the origin (67). This basin of attraction is certainly contained in domain of controllability S: To find the limit cycle, the initial state of system (79), (76) can be taken also outside domain of controllability S.
Along with controllability domain S, Figure  In practice, when the boundaries of these two domains can't be distinguished visually.
In studies [21], [22] it is demonstrated that linear feedback with saturation may be chosen in such a way that basin of attraction B of system (64), is arbitrarily close to domain of controllability S. Method described above slightly differs from the way proposed in these studies.

On the Global Stabilization of Double Pendulum
Let at the initial time instant 0 t = both pendulum links hang down, and their angular velocities be equal to zero (0) , (0) 0 ϕ = π α =, (0) (0) 0 The goal of the control is to translate the double pendulum from lower stable equilibrium (80) to the upper unstable equilibrium and to stabilize it in this equilibrium. Figure 18 illustrates the process of translating the pendulum from stable equilibrium (80) into unstable one (81). The pendulum links are taken similar and homogeneous (see relations (70)) with parameters (73).
Control algorithm contains two stages. At the first stage control (61)   There are four plots in Figure 18. The top (first) one shows the time dynamics of angle ϕ, the next one (second) -the dynamics of inter-link angle α, the third one -torque L applied in the inter-link joint, and, finally, the bottom plot illustrates the dynamics of the total energy E of the system -kinetic energy plus potential one. The magnitude of pendulum oscillations (in terms of angle ϕ) grows rapidly. At the beginning of the process control torque L most of the time takes the terminal values 0 . L L = The total energy of the pendulum during its swinging increases "almost" monotonically. At the end of the process illustrated in Figure 18 2 ϕ → π and 0, α → i.e. the pendulum asymptotically reaches its equilibrium (81). The value of 0 α at the beginning of the process is chosen relatively large ( 0 0.5 α = ) in order to make the pendulum swing faster. And at the beginning of the process angle α most of the time takes the terminal values 0 . α =α During the swinging process, the value of 0 α is reduces several times in a step-like manner as the full energy increases, in order for the pendulum not to miss the desired equilibrium.
The numerical experiments involving the control algorithm that was stated above were conducted with various initial conditions of the pendulum -not only with both links hanging down and their angular velocities being zero, but with many other states, both close to the bottom equilibrium and far from it.
Concerning global stability, the following can be said. From any initial position, with any initial velocities of the links the pendulum can be translated to the bottom equilibrium, or to a state close to this equilibrium, by applying in the inter-link joint a torque that damps oscillations. If the control algorithm proposed above drives the pendulum from the bottom to the top equilibrium, this provides stability of that equilibrium under all initial conditions, which means, global stability of the inverted pendulum.
Unstable Mechanical Objects: Motion Control, Stabilization In paper [23], a real double pendulum with the control torque in the pivot is described. It steered to a neighborhood of the upper unstable equilibrium by a swing-up feedback. The theoretical conclusions and the efficiency of the control algorithm are confirmed experimentally.

Gyroscopically Stabilized Robot-Bicycle
It is well known that the upright position of a two-wheel bicycle is unstable. This makes it akin to an inverted pendulum. Current section describes the two bicycles designed in Institute of Mechanics of Lomonosov Moscow State University by Anatoli Lenskii, the head of Mechatronics Lab. The steering axis of the headset in each of the bicycles is vertical, and, besides, it passes through the center of the front wheel. Stability of such device is maintained by a controllable gyroscopic stabilizer [7]. It is worth emphasizing that the gyrostabilizer is controllable, not passive. A law is suggested for driving the motor that can control the gyrostabilizer. This motor generates torque that is applied to the gyro precession axis. So the upright position of the bicycle can be kept by means of that gyrostabilizer. Figure 19 shows the two-wheel bicycle that has its front wheel steering and driving at the same time. Motion of this bicycle is realized by means of two electric DC motors. One motor spins the front wheel and thus provides the longitudinal motion. The other one turns the plane of the front wheel about the vertical axis, providing maneuvers of the vehicle. The rear wheel is passive as in conventional bicycle. The bicycle has three relatively independent control circuits. One of them controls the velocity of the front wheel. Another circuit controls the steering angle. The third circuit controls the gyroscopic stabilizer. Current section 4 is dedicated to investigation of the third circuit, that is the most complicated and interesting one. Other control systems are not discussed in frame of this study.   Figure 20 is at the same time steering and driving. Thus it has more capabilities than a bicycle shown in Figure 19. A vehicle with two controlled wheels can move in a more complex way. For example, it can move along some path maintaining orientation of its frame, it can move sidewards. It can turn on the spot, etc. This (second) bicycle has five control circuits. Two of them are used to control wheel spinning, two more control steering in both of the headsets. The work of these four circuits must be aligned, because the angular velocities of the wheels and the steering angles must follow a kinematic constraint (nonholonomic). Otherwise, the wheels will slip. The fifth circuit provides stabilization of the upright position of the bicycle.

Gyroscopic Stabilizer
Gyroscopic stabilization of each of the two described bicycles is done in accordance with a known stabilizer design that bears the name of Scherl and Shilovsky. This design was introduced in year 1909 for stabilization of a monorail train car [24], [25], [26]. The gyroscopic stabilizer automatically supports the unstable upright position of the bicycle, and the bicycle can move autonomously following the motion program along some trajectory.
The gyroscopic stabilizer is installed at the bottom part of the bicycle in between the wheels (see Figures 19,20). It is schematically shown in Figure 21.
The gyrostabilizer includes two identical gyroscopes. The rotor of each gyroscope is contained in a housing that can tilt with respect to the frame (the chassis) of the bicycle about the axis that is perpendicular to the symmetry plane of the vehicle. The centers of the wheels and the headset axes also belong to this symmetry plane. The gyroscope rotor axes lie in this plane as well. The two gyroscope housings are connected by a gear train so that when one of the gyroscope housings tilts some angle β, the other housing tilts the same angle in the opposite direction (see Figure 21). The gyroscope rotors spin in the opposite directions with the same constant angular velocity. So their angular momentum vectors H are directed oppositely (see Figure 21). Torque L is applied to the axis of one of the housings. This torque is produced by an electric motor, the rotor is connected to the housing axis, and the armature is firmly attached to the bicycle frame. The desired state of the bicycle with a gyroscopic stabilizer is the following: Here ψ is the tilt angle of the bicycle, β is the precession angle of the gyroscopes. The equations of motion linearized about state (82) describe oscillations of the bicycle and of the gyroscopes. They can be written as H L β − ψ =   Here B and D stand for inertia moments of the gyroscope rotors together with their housings and of the bicycle as a whole, with respect to their corresponding axes; , E mb = where m is the mass of the whole vehicle, b is the distance between the center of mass of the bicycle and segment 1 2 K K . This segment connects points 1 K and 2 K where the wheels contact the supporting (horizontal) plane; x and y denote the coordinates of the midpoint of segment 1 2 K K , where, by assumption, the center of mass of the bicycle is projected (when it is in upright position). Term Egψ describes (in linear approximation) the gravity moment that strives to trip the bicycle, term 2Hβ  describes the gyroscopic moment that prevents the bicycle from the falling. Expression ( )  describes the moment with respect to line 1 2 K K of the centrifugal forces, the sum of which is considered to be applied in the mass center of the bicycle.
Torque L is produced by an electric motor and considered as control parameter. This torque is formed further as function of bicycle tilt angle ψ, precession angle β, precession angular velocity , β  steering angle δ of the front wheel and its velocity V (we consider here the rear wheel as passive, see Figure 19).
First of all we consider control law to stabilize upright position of the bicycle for the case when it moves along a straight line i.e. when the steering angle of the front wheel 0. δ ≡ In this case cos sin 0 y x α − α =   and system (83) becomes as follows: So, first of all we form control law to stabilize solution (82) to system (84). It is shown in studies [24] - [26] that equilibrium (82) of system (84) can be stabilized by a feedback that involves only three phase variables The first equality in (89) describes the tilt of the bicycle towards the center of the circle that it moves along. At this tilt, the tripping gravity moment is compensated by the moment of centrifugal force. From the second expression in (89) it follows that when the bicycle is moving along a circle, the steady-state value of the precession angle is non-zero. The gyroscopes are known to work best when the precession angle is close to zero. The static error of the precession angle β can be reduced to zero by introducing a target angle (preset value) into expression (85) Under feedback (90), the steady-state values of the tilt angle ψ and the control torque L apparently remain the s ψ same as for feedback (85), but the steady-state value of the precession angle β becomes zero.
Suppose now that there is an error in measuring the bicycle tilt angle. This error ∆ψ will be considered constant ( const ∆ψ = ) during the entire motion process of the vehicle. Such error occurs in experiments, for example, when the vertical was not determined precisely before the start. When such error is present, feedback (90)  If the system is controlled by law (92), then in the steady-state motion but the tilt angle ψ and the torque L remain the same as in expressions (89). So the steady-state value of the precession angle is zero when the control law is as in (92), even though an unknown error is still present. Applying Routh-Hurwitz criterion, it can be verified that the necessary conditions of asymptotic stability of the steady-state solution to system (88), looped by feedback law (92) are inequalities 0 k ψ > , 0 k β > , 0 k > , 0 k ρ > . It is known from the control theory that introducing an integral term to the feedback eliminates the static error, but the control system tends to become unstable. Therefore, coefficient k ρ can't be too large.
At the end, the following law can be used to control the system: Control law (93) was designed having in mind stabilization of the steady-state motion of the bicycle. If 0 δ = , then the bicycle motion becomes straight. In this case, the "target" angle s ψ in the control law becomes zero. In order to use control law (93), angles ψ and β, as well as precession angular velocity , β  bicycle linear speed V and steering angle of the front wheel δ, must be measured during bicycle motion. The bicycle is fully autonomous during its motion in practical experiments. These experiments were carried out on a track used for competitions of mobile robots that were held in France in years 1997 -2000 and in Portugal in 1997, in frame of the International Festival of Science and Technologies. The competition track is illustrated in Figure  22. Numerical and practical experiments prove that the gyroscopic stabilization system and the proposed control law (93) are capable of stabilizing the upright position of a bicycle when it moves at speeds up to 1 m s. Videos have been shot to illustrate the experiments carried out with both bicycles.

Conclusions
Mechanical systems that contain unstable subsystems are considered. In many cases number of control parameters of studied system is less than number of its degrees of freedom. In other words, the under-actuated systems are studied. In real mechanical systems, resources of controlling actuators are limited. For many problems we take into account these limits imposed on the control parameters. In that situation, an unstable under-actuated system can't be translated to a desired operating regime from any state of the phase space. We separate from our system Jordan variables that describe unstable modes. For maximizing the basin of attraction of unstable operating regime, all resources of control have to be used to suppress these unstable modes. Methods of designing control algorithms are developed for the systems with degree of instability equal to one or two. Feedback control laws are created that provide maximal basin of attraction for a variety of mechanical objects. These objects include the pendulums of different kind, the wheeled vehicles. The pendulums on the fixed and movable bases are studied. For some objects optimal control algorithms and optimal trajectories are designed. The optimal control algorithms are obtained in form of feedback. Effectiveness of the 0,