Servo-constraint realization for underactuated mechanical systems

The paper deals with underactuated mechanical systems, featured by less control inputs m than degrees of freedom f , m < f , subject to m servo-constraints (speciﬁed in time outputs) on the system. The arising servo-constraint problem (inverse dynamics analysis) is discussed with an emphasis on the way the servo-constraints are realized, varying from orthogonal to tangential, and a geometrical illustration of the different realization types is provided. Depending on the way the servo-constraints are realized, the governing equations are formulated either as ordinary differential equations (ODEs) or differential-algebraic equations (DAEs), and some computational issues for the ODEs and DAEs are discussed. The existence or non-existence of an explicit solution to the governing equations is further discussed, related to so-called differentially ﬂat problems (without internal dynamics) and non-ﬂat problems (with internal dynamics). It is shown that in case of non-ﬂat problems with orthogonal realization of servo-constraints, stability of the internal dynamics must be assured. Simple case studies are reported to illustrate the proposed formulations and methodologies.

later. The prescribed in time outputs,ỹ(t), are treated as performance goals of the dynamical system, and the following inverse dynamics simulation problem [1,2] arises: given a desired motion of a mechanical system (prescribed in time outputs), and using the dynamic model of the system, determine the control inputs that force the system to complete the prescribed motion. Three basic types of the inverse dynamics problem are listed in Table 1. For an overactuated or fully actuated system, its motion needs to be fully specified by f outputs, dim(y) = f . By contrast, underactuation leads naturally to a partial specification of the system motion so that to coincide the number of outputs with the number of inputs [2] and as such dim(y) = dim(u) = m < f . The present paper deals with the latter type of problems, that is, inverse dynamics analysis of underactuated mechanical systems in partly specified motion.
The m = dim(y) motion specifications are treated hereafter as servo-constraints [3][4][5] on the system, called also program, control or active constraints [6][7][8][9] as opposed to the classical contact (or passive) constraints in terms of hard surfaces, rigid joints/links, slipless rolling contacts, etc. Using the relationship y = (q) and the output specificationỹ(t), the m servo-constraint equations, respectively, at the position, velocity and acceleration levels are: (2) γ (q, q, t) = H(q)q −ẏ(t) = 0 (3) η (q,q, q, t) = H(q)q + h(q,q) −ÿ(t) = 0 (4) where the m × f Jacobian matrix H = ∂ /∂q is of maximal row rank, and the m-vector h =Ḣq participates in describing the output relationship at the acceleration level. Before focusing on the servo-constraint problem for underactuated system, let us assume for a while that the motion is fully specified, dim(y) = m = f , and the system at hand is fully actuated (or overactuated). Using the servo-constraint equations at the position and velocity levels, (2) and (3), respectively, an inverse kinematics problem arises from which the system states can explicitly be determined in time as: (q) −ỹ(t) = 0 ⇒q(t) (5) q(t) =H −1ẏ (t) (6) whereH(t) = H(q(t)). Then, from the servo-constraint equation (4) at the acceleration level, after using q = M −1 (g − k + Bu) from the dynamic equation (1) and assumed that dim(u) = f (the system is fully actuated), a feedforward control law can be derived as where the f × f matrix Y(q) = HM −1 B is by assumption invertible, and, as above, the tilde denotes quantities obtained for the specified in time statesq(t) andq(t). Then, by using in (7) the measured states q andq instead of the specified onesq(t) andq(t) and replacingÿ with its stabilized (PD controller) form y stab =ÿ + α 1 (ẏ −ẏ) + α 0 (ỹ − y) (8) where α 1 and α 0 are the positive definite (diagonal) matrices of feedback coefficients, one obtains a feedback linearization control [10]. By appropriate choice of α 1 and α 0 , asymptotic stable dynamics are obtained, e + α 1ė + α 0 e = 0, where e =ỹ − y. The inverse dynamics control of this type have extensively been used to generate robot control torques [11] and motivated the numerous control approaches applied to practical problems within and outside of robotics. For the case of overactuated systems, dim(u) = m > f (such as biomechanical models with the joint movements regulated by means of redundant sets of muscle forces), a rectangular m × f matrix Y arises. Then, one can either use in (7) a pseudo-inverse Y † = Y T (YY T ) −1 instead of Y −1 , or the control allocation problem (the muscle force sharing problem) can be formulated and solved as an optimization problem [12].
The above-mentioned features of the servo-constraint problem solution for fully actuated (and overactuated) systems do not in general apply for underactuated systems. Firstly, the motion of an underactuated system can only be partly specified, dim(y) = m < f , and as such, the servo-constraint equations (2) and (3) cannot be solved for the system states. The m × m matrix Y = HM −1 B as introduced in (7) can then be either of maximal rank or may be rank deficient. If rank(Y) = m = max, which indicates that all m specified outputs can directly be actuated by the m system inputs, in addition to the output-input inverse dynamics resolution (7), there always remains a residual internal dynamics in the system, which, influenced by the inverse dynamics control, may be stable or not [13][14][15]. Unbounded internal dynamics destabilizes the underactuated system behavior in the partly specified motion. The case rank(Y) < m, and in the extreme rank(Y) = 0, shows then, respectively, that not all or none of the specified outputs can directly be actuated by the system inputs. Then, their realization, if possible, must be done only through the dynamical couplings in the system (without direct involvement of the control forces). Consequent to these underactuation diversities, the design of control of underactuated systems in partly specified motion is a challenging task, resulting in numerous modeling methodologies and solution codes [16][17][18].
In this paper, the servo-constraint problem for underactuated systems is discussed with an emphasis on the way the servo-constraints are realized, and a geometrical illustration of the different realization ways is provided. A standard formulation of the servo-constraint problem in configuration coordinates is compared with a setting in which the actuated coordinates are replaced with the outputs. Depending on the way the servo-constraints are realized, possible ordinary differential equation (ODE) or differential-algebraic equation (DAE) forms of the governing equations are proposed. The existence or non-existence of an explicit solution to the governing equations is further discussed, related to so-called differentially flat problems (with no internal dynamics) [19][20][21][22] and non-flat problems (with internal dynamics). In case of non-flat systems, stability of the internal dynamics must be assured. The computational issues for the ODEs and DAEs are finally discussed. Simple case studies are reported to illustrate the proposed formulations and methodologies.

Geometrical interpretation of realization of servo-constraints
The servo-constraint equations (2) are mathematically equivalent to passive (holonomic and rheonomic) constraints on the system. By way of analogy to constrained system dynamics, the generalized actuating force g u = Bu can then be viewed as a generalized reaction force of the servo-constraints. However, whereas the reactions of passive constraints, being constraint-induced, are orthogonal to the passive constraint manifold [23], the actuating forces are not in general related to servo-constraints and may as such be arbitrary oriented with respect to the servo-constraint manifold. In the extreme case, some (or even all) of the actuating forces may be tangent to the manifold, being unable to directly regulate the motion specifications. The degree of control singularity can be measured by the deficiency in rank of the m × m matrix Y = HM −1 B, which expresses the projection of the actuating forces onto the directions of the constraint gradients (represented as rows of H). It can also be viewed as a representation of the intersection, in the system configuration f -space Q, of the orthogonal m-subspace H (spanned by the servo-constraint gradients) and the actuated m-subspace B (spanned by the vectors represented as columns of B), Y = H ∩ B.
According to the rank of Y (dimension of Y), three types of realization of servo-constraints can be distinguished [5][6][7] The case p = m denotes usually a non-ideal orthogonal (or skew-orthogonal) realization of servo-constraints. The actuating forces are explicitly represented in H, and all the system outputs y can directly be regulated by the inputs u, but there is also a projection of actuation onto the tangent subspace G with respect to the servo-constraint manifold, H ∪ G = Q and H ∩ G = 0, so that the unspecified (internal) dynamics is influenced by the inputs, too; see Fig. 1a for the geometrical interpretation. The other extreme is p = 0, where none of the outputs can directly be actuated by u, and realization of all the motion specifications must be accomplished, if applicable, in a tangential way (Fig. 1b), that is, only through the mechanical couplings between the taskspecified and control-induced motions. The m-subspaces B and H are also disjoint, H ∩ B = 0, which yields

Initial governing DAEs
By combining the dynamic equations (1) with the servo-constraint equations (2), the initial governing equations for an underactuated system in partly specified motion arise as 2 f + m DAEs in 2 f states q and v =q, and m controls uq An important characteristic of a DAE system is its differentiation index [24,25], denoted hereafter by i, which is, roughly speaking, the number of times one needs to differentiate the algebraic equations in order to get, following some algebraic manipulations, an equivalent set of ODEs. The index of DAEs (11) is i = 3 for the case of orthogonal realization ( p = m) and exceeds this value for the other realization cases (0 ≤ p < m). Since most of the DAE solvers are suitable for low-index problems (and/or require that the DAEs have special structure) [25], it is profitable to transform the above initial governing DAEs to reduced-index forms. The index reduction by two can be achieved by transforming (twice differentiating with respect to time) the original (position-level) servo-constraint equations (2), used in (11) 3 , into the acceleration-level form (4), which is a basis for all the followed formulations.

Governing
ODEs for the case of orthogonal realization of servo-constraints As motivated above, the orthogonal realization of servo-constraints is conditioned upon rank(HM −1 B) = m = max, from which invertibility of the m × m matrix Y = HM −1 B is assured. This allows, after applyinġ v =q = M −1 (g − k + Bu) in (4), for the development of the following output-input inverse dynamics model where Y(q) = HM −1 B and f y (q, v) = HM −1 (g − k) + h. The initial governing DAEs (11) can then be transformed to the following set of 2 f ODEs in q and v =q The feedforward controller (12), used further in (13), can then be enhanced by a feedback loop after replacingÿ withÿ stab introduced in (8). The control structure is seen in Fig. 2.
The controller (12) is structurally equivalent to the computed torque control scheme (8) for fully actuated systems in fully specified motion. The present setting for underactuated systems in partly specified motion is more involved, however. This is because, in addition to the explicit output-input inverse dynamics model (12), related to the orthogonal (specified) subspace H, there remains internal (unspecified) system dynamics, represented in the tangent subspace G. The control required for the orthogonal realization of the motion specification may then influence the internal dynamics, which may become unbounded, and as such destabilize the underactuated system behavior (and control) in the partly specified motion. Stability of internal dynamics requires usually an appropriate design of the mechanical system [13] and/or careful imposition of the motion specifications, which will be discussed/illustrated in a case study that will follow.

Reduced-index DAEs for any realization of servo-constraints
The output-input inverse dynamics relationship (12) and then formulation of ODEs (13) is conditioned upon the orthogonal realization of servo-constraints, det(Y) = 0. A generalized formulation of the servo-constraint problem should cover all the realization types, including the mixed orthogonal-tangent and pure tangent ones, both characterized by det(Y) = 0. This aim can be achieved by formulating the governing equations as DAEs with the index reduced by two as compared to the initial governing DAEs (11). As mentioned at the end of Sect. 3.1, the reduction is due to twice differentiation with respect to time of servo-constraint equations (11) 3 /(2) at the position level. The obtained acceleration-level servo-constraint equations (4) are then combined with the system dynamic equations (1). Hereafter, two equivalent but slightly different formulations of this type are reported.
The first DAE formulation, proposed originally in [7], is based on the projection of the dynamic equations (1) into the orthogonal H and tangential subspaces G with respect to the servo-constraint manifold. As motivated in Sect. 2, the subspace H is spanned by the m vectors represented as rows of H. The spanning vectors of G can be represented as columns of any maximum column-rank f × ( f − m) matrix G being an orthogonal complement to H, i.e., HG = 0 ⇔ G T H T = 0. The projection formula of the dynamic equations (1) into H and G is then [23] The projection into H, after using the servo-constraint equations at the acceleration level, Hq =ÿ−h, modifies to HM −1 (g − k) + HM −1 Bu + h −ÿ = 0. With these manipulations, the initial DAEs (11) are transformed into the equivalent 2 f + m DAEs in q, v =q and u Compared with DAEs (11), the present DAEs (15) have index reduced by two, which makes them more tractable in numerical applications. The m algebraic equations (15) 3 ,η = 0, are due to the projection of the underactuated system dynamics into the orthogonal subspace H, and, for rank(HM −1 B) = p, express p explicit inverse dynamics relationships between the m outputsÿ and some p inputs from u (only p from m motion specifications are realized in the orthogonal way, which involves p inputs). The other m − p relationships of (15) 3 , not involved in the inverse dynamics control model, can then be treated as additional constraints on the system motion in the tangential (unspecified) subspace G, which must be regulated through the dynamical couplings in the system. The coupling forces required for the tangential realization of the m − p motion specifications are triggered by appropriate regulation of the system motion in G, described in the projectedin-G f − m dynamic equations (15) 2 . The non-orthogonal realization of servo-constraints implies therefore that f − m ≥ m − p, and then m ≤ ( f + p)/2 for the case of mixed orthogonal-tangential realization and m ≤ f /2 for pure tangential realization (which was already stated at the end of Sect. 2).
The other reduced-index DAE formulation of the governing equations is obtained by applying a coordinate transformation, exploited previously in, e.g., [13,14]. The f configuration coordinates are first partitioned into m actuated and f − m unactuated coordinates, denoted symbolically q = [q T a q T u ] T , and the choice of actuated coordinates q a is conditioned upon an m × m matrix B a , gathering the rows of B related to q a , being of maximal rank, det(B a ) = 0. By replacing the actuated coordinates q a with the outputs y, the new set of coordinates is q = [y T q T u ] T . At the acceleration level, the transformation formula is then where from (1) into (16), the underactuated system dynamics in the new coordinates is formulated in the following resolved formÿ It may be worth noting that, in the case of orthogonal realization, (17) represents the so-called input-output normal form known from nonlinear control theory [10]. The control inputs can then be computed by solving (17) 1 algebraically. For this evaluation, the unactuated states are necessary, which are the solution of the internal dynamics represented by (17) 2 . In a general case, (17) leads to the following set of The two DAE formulations of governing equations, (15) and (18), are equivalent and lead to the same solutions of the servo-constraint problem. Both have dimension 2 f + m, are expressed in q, v and u, and are applicable irrespective of the servo-constraint realization type: orthogonal ( p = m), orthogonal-tangent (0 < p < m) or tangent ( p = 0). They have also the same index, equal to one for the orthogonal realization of servoconstraints and exceeding one for the non-orthogonal realization types [5][6][7]. Finally, the third and fourth algebraic equations of (15) are identical to the third and fifth equations in (18). A difference is that the f kinematic relationshipsq = v in (15) are replaced in (18) with f − m kinematic relationshipsq u = v u and m servo-constraint equations γ (q,q, t) = 0 at the velocity level. The f − m differential equations A(q)v = a(q, v, u) describing the system dynamics in the subspace G are also replaced with f −m differential equationsv u = b(q,q, u) that govern the system dynamics in the unactuated coordinate directions.
A simple numerical scheme to solve DAEs (15), proposed in [7], can be based on Euler backward differentiation scheme in which the time derivatives of q and v are approximated with their backward differences with respect to the time step t. Then, given q n and v n at time t n (u n are not required), the solution q n+1 , v n+1 and u n+1 at time t n+1 = t n + t is obtained as a solution to the following nonlinear equations and in this way, the solutions are advanced from t n to t n+1 . The same scheme, applied to DAEs (18), results in The rough computational schemes are of acceptable accuracy for appropriately small values of t, and the accuracy can possibly be improved by applying higher-order backward difference approximation methods or other specialized DAE solvers [25].
The solution to DAEs (15) and (18) are the variations in time of state variables in the partly specified motion, q(t) and v(t), and of control u(t) required for realization of servo-constraints. A control structure based on the DAE solutions is illustrated in Fig. 3, where the q andq arising as a solution to DAEs (15) or(18) denote the next time step predicted values, while the measured values are used in the solution. The scheme is structurally similar to that shown in Fig. 2. However, whereas the application of the controller from Fig. 2 is limited to only orthogonal realization of servo-constraints, the present controller applies to any type of realization of servo-constraints. As before, the outer loop (the feedback controller part) is achieved by replacing in DAEs (15) and (18) the specified accelerationsÿ withÿ stab introduced in (8), which is efficient in the case of orthogonal realization of servo-constraints. With limited efficiency, the feedback controller was also used for tracking servo-constraints which are realized in the tangential way [5,7,26]. In this case, however, the error dynamics have a higher order, and higher-order derivatives of the output errors should be involved in order to assure asymptotic convergence of the tracking error to zero. The problem is related to the content of the next section.

Possible differential flatness of the servo-constraint problem
Following the definitions and background provided in, e.g., [19][20][21][22], the servo-constraint problem described in (11) is differentially flat if all the 2 f system states q and v =q as well as m control inputs u can be (algebraically) expressed in terms of the desired m outputsỹ(t) and their time derivatives up to a certain order r , which is by one smaller than the differentiation index of the initial DAEs, r = i − 1. The inverse dynamics solution for an underactuated system in partly specified motion is then explicit in time (and unique), denoted asq (t) = q(ỹ,ẏ, ...,ỹ (r −2) ) v(t) = v(ỹ,ẏ, ...,ỹ (r −1) ) u(t) = u(ỹ,ẏ, ...,ỹ (r ) ) (21) and there is no internal dynamics in the flat systems [13][14][15] (by contrast, the non-flat servo-constraint problems are those for which the solution (21) is unavailable, and the inverse dynamics solution is influenced by some internal dynamics, which needs to be bounded). The flatness-based analytical solution (21) is often featured by substantial complexity, which may render its obtainment difficult/impractical for more complex problems of technical relevance.
For fully actuated systems in fully prescribed motion, m = f , the inverse dynamics problem described in DAEs (11) is always flat with the order r = 2, which is stated in equations (5)-(7), and the differentiation index of the DAEs is i = 3. By contrast, for underactuated systems in partly specified motion, m < f , the inverse dynamics problem can be either flat or non-flat. In the case of the orthogonal realization of servoconstraints, the servo-constraint problem (11) is always non-flat, with i = 3 and no order r , and, in addition to the inverse dynamics algebraic solution (12) for the required control, there remains internal dynamics in the system. The servo-constraint problems of this type become thus dynamic problems, and stability of the internal dynamics is of critical importance for the overall problem stability. Finally, the servo-constraint problems for the cases of mixed orthogonal-tangential and pure tangential realizations of servo-constraints may be flat or non-flat. For instance, differentially flat are servo-constraint problems for cranes executing a load prescribed motion [5,7,26,27] and for aircrafts in prescribed trajectory flight [28], both characterized by mixed orthogonal-tangential realization of servo-constraints. Differentially flat is also the trajectory tracking problem for flexible joint manipulators [16,29], with pure tangential realization of the servo-constraints. Under usual modeling assumptions, the flatness order for the mentioned flat problems is r = 4, yieldingũ(t) = u(ỹ,ẏ,ÿ) for the p controls engaged in the orthogonal realization of p servo-constraints (rank(HM −1 B) = p), and u(t) = u(ỹ,ẏ,ÿ,ỹ (3) ,ỹ (4) ) for the other f − m controls engaged in the tangential realization of the remaining f − m servo-constraints. This is why, for the flat problems and mixed orthogonal-tangential realization of servo-constraints, the feedback loop for the orthogonal-realization control can be designed according to (8), while in the feedback loop for tangential-realization control higher-order derivatives of the output errors should be involved [29,30]. These issues will not be addressed in the present study, and the flat and non-flat problems will only be illustrated with the followed case studies.
It is then evident that: q a = [θ 1 ], q u = [θ 2 ], and q = [ γ θ 2 ] T . The output is designed as the angular coordinate of some point P on link 2, y = [γ ], and the point P position is defined by s P (distance AP). As previously used in [13], we introduce a linearly (approximately) described output. First, from the sine formula applied to ABC, one receives r P sin α = s P sin β, where r P is the radial coordinate of P (distance OP), α = γ − θ 1 , and β = θ 2 − θ 1 (Fig. 4b). Then, for small values of β, and as such small α, one has r P ≈ l 1 + s P , and then α ≈ [s P /(l 1 + s P )] β = [s P /(l 1 + s P )] (θ 2 − θ 1 ). Since γ = θ 1 + α, the servo-constraint equations (2) where κ = s P /(l 1 + s P ). Finally, the matrix where, by assumption, det(M) > 0. The orthogonal realization of servo-constraint (23) 1 is then conditioned upon det(Y) = 0, here Y = 0, which is equivalent to the numerator of the above expression being different from zero. However, as seen from (24), the numerator can be either negative or positive, or may occasionally diminish to zero, depending on the inertial and geometrical properties of the manipulator links and placement of point P (distance s P ). It is also dependent on the current configuration (coordinates θ 1 and θ 2 ), but this dependence is weak for the assumed/expected small values of β = θ 2 − θ 1 . Specifically, for the links assumed to be identical and homogeneous, Let us further coincide the point P with the end point E of link 2, s P = l 2 = l and κ = 0.5. From (25), it is then evident that orthogonal realization of servo-constraint (23) 1 , Y = 0, is feasible for |β| = |θ 2 − θ 1 | being smaller then c.a. 48 deg, wherein Y < 0, and which can be assured by appropriate high stiffness of the torsional spring in the passive joint. The prerequisite condition for orthogonal realization of servo-constraints, det(Y) = 0 (here Y = 0), does not guarantee applicability of the control formula (12), however. Of crucial importance is additional stability of internal dynamics of the underactuated system enforced by the inverse dynamics control (12). If the internal dynamics is unstable, its forward time integration leads to unbounded control inputs. For the present case study, the failure situation happens because of, as detected above, Y < 0. In order to understand the reasons for this failure, let us consider that the arm is at rest in a straight (θ 2 = θ 1 ) position, and the task is to start motion of the end point E in the counterclockwise direction, so thatγ > 0. Since k = 0 and g = 0 for the steady state (and h = 0 for the case study), and are negligibly small after the motion starts, the control formula (12) simplifies to u = Y −1ÿ , which is T =γ /Y for the case at hand. Since Y < 0, a positiveγ will then results in a negative (clockwise) sense of torque τ resulted from the inverse dynamics control formula. This "reverse" control is certainly wrong (goes against intuition) and results in that the system becomes non-minimum phase [10]. In relation to servo-constraints, this has also been addressed in, e.g., [13][14][15]31,32].
The described above situation can be improved, i.e., Y > 0 can be assured (stability of internal dynamics can be guaranteed) in the whole range of possible configurations of the system, in two ways. The first option, used in, e.g., [13], is to modify the inertial and geometric properties of link 2. Specifically, as it can be concluded from (24), the effect Y > 0 can be achieved by decreasing s 2 and/or increasing J C2 . Manipulators with passive joints must therefore be properly designed. The other option is a modification of the desired task. Keeping the geometric and inertial parameters as stated above, resulted in (25), Y > 0 can be achieved by applyingγ (t) that specifies the azimuth of an inner point P instead of the end point E. For instance, by applying s P = l 2 /2 = l/2 (for P coinciding with C 2 ), which yields κ = 0.33, the relationship (25) becomes 6 det(M) Y = ml 3 (1.33 − cos(θ 2 − θ 1 )), and Y > 0 is assured.
The simulation results, obtained for s P = l 2 /2 (κ = 0.33), are reported in Fig. 5. The inertial and geometrical data of the manipulator were: l 1 = l 2 = 1 m, m 1 = m 2 = 2 kg, and then, s i = l i /2 and     = 1, 2). The spring coefficient was c = 1 Nm/rad, and the damper coefficient was either d = 0 Nms/rad (left column graphs) or d = 0.2 Nms/rad (right column graphs). With the initial (t = t 0 ) and final (t = t f ) azimuths of point P, respectively, γ P (t 0 ) = γ 0 = 0 deg and γ P (t f ) = γ f = 180 deg, the arm motion was specified as the following rest-to-rest maneuver where τ = t f − t 0 = 6 s is the duration of the maneuver. The integration time step was t = 0.001 s, irrespective of whether the ODE or DAE formulation was used (the results are the same using any of the formulations described in Sects. 3.2 and 3.3). As seen from the graphs, the internal dynamics is now bounded even though no damping in the passive joint is assumed (left column graphs), and the system position asymptotically approaches the final position for some damping added in the passive joint (right column graphs). The problem is evidently non-flat-the system motion exists after the output reaches the final position.

Mixed orthogonal-tangential realization of servo-constraints
Other typical examples of underactuated systems are cranes, whose usual performance goal is to move the load from its initial position to the desired destination along a trajectory in the working space, with relatively high speed and avoiding uncontrolled load sways. For the sake of shortness, let us consider a planar version of this servo-constraint problem (Fig. 6).
where g is the acceleration of gravity, m W = J W /r 2 W , and d s and d l are the damping coefficients related to s and l motions, respectively, (no damping related to θ motion is assumed). It is then: The realization of servo-constraints (28) 1 is mixed orthogonal-tangential and the servo-constraint problem at hand is differentially flat [5,7,[19][20][21][22]27,[34][35][36].
and for all the cases (as well as for all other combinations of l and θ values), det(Y) = 0, and as such rank(Y) = 1. Only one of the servo-constraint conditions can thus be directly actuated by the inputs. More strictly, as seen from (29), for θ = 0 deg, this is solely the winch torque M W which can influence the tension force in the cable, and, as such, directly regulate the load vertical accelerationz(t), while a direct regulation of x(t) is impossible. Then, for (usually) small values of θ , the appropriately adopted tension force in the cable regulates the load maintenance on the specified trajectory, achieved by a specific combination of M W and F (the role of M W is predominant). The load motion along the trajectory is then regulated indirectly by adopting the rope inclination angle θ , which is achieved by appropriate changes in the trolley position x T (regulated by F).
The simulated taskỹ(t), shown in Fig. 7, was designed so that to move the load from its initial position (x 0 = 0 m, z 0 = 4 m) to the final position (x f = 5 m, z f = 1.5 m) following the rest-to-rest maneuver as in (26) after applying y 0 = [x 0 y 0 ] T and y f = [x f y f ] T instead of γ 0 and γ f , respectively, and the assumed maneuver duration was τ = 3 s. The simulation results are then shown in Fig. 8, where, in addition to previously defined data, the damping coefficients were either d s = d l = 50 Nms −2 (solid lines) or d s = d l = 0 Nms −2 (dashed lines). As seen from the graphs, there is no influence of the damping on the required variations s(t), l(t) and θ(t), and the damping is compensated by appropriate changes in F(t) and M w (t). It can also be concluded that the considered servo-constraint problem is differentially flat (with no internal dynamics left), and the solutions reported in the graphs might also be denoted asq(t),ṽ(t) =q(t) andũ(t). Whereas an analytical solution in the form (21) is elaborate and will not be presented here, one can observe that the steady state (q f = [ 5 m 1.5 m 0 rad] T , v f =q f = 0, and u f = [ 0 N m L g] T ) is achieved exactly at t = τ when the pre-specified maneuver ends. This is not the case for non-flat servo-constraint problems, which will be illustrated in the next example.

Tangential realization of servo-constraints
The final illustration deals with a simple two-mass ( f = 2 and q = [x 1 x 2 ] T ) system shown in Fig. 9. The motion specification is a desired position of mass m 2 , y = [ where c and d are the spring and damper coefficients, and l 0 is the distance x 2 − x 1 for which the spring force achieves zero. The servo-constraint equations (2)-(4) are defined with:    Fig. 9 The two-mass system It is then easy to ascertain that the matrix Y = HM −1 B = [ 0 ], and as such, the realization of servo-constraint (31) 1 is tangential. Depending on d = 0 (no damping in the system) or d = 0 (damping is involved), the servo-constraint problem at hand is differentially flat or non-flat. Assumed d = 0, the inverse dynamics solution (21) of the problem can easily be represented analytically as: and, as such, there is no internal dynamics in the system. For d = 0 a solution of this type does not exists, and some internal dynamics remains in the system executing the pre-specified motion. Illustration of these observations is presented in Fig. 10, where the simulation results are reported for the system with damping (d = 10 Nsm −1 ) and without damping. The other data used in computations were: m 1 = 1 kg, m 2 = 2 kg, k = 10 Nm −1 , l 0 = 0.5 m, and the outputs(t) was the rest-to-rest maneuver as in (26) after applying s 0 =s(t 0 ) = 0.5 m and s f =s(t f ) = 3 m instead of γ 0 and γ f , respectively, and with τ = t f − t 0 = 6 s. As before, the integration time step was t = 0.001 s, and the governing equations in the form of DAEs (20) were used (the solution obtained with d = 0 was exactly the same as that obtained using the analytical flatness-based resolution (32)). As seen from the graphs, for the case of flatness (d = 0), the steady state q f = [ 2.5 m 3 m ] T , v f =q f = 0 and F f = 0 is achieved exactly at t = τ , and the non-flat case (d = 0) is featured with some internal dynamics-the solution is different from the flatness-based resolution, and some internal dynamics remains also for t > τ (the steady state is not achieved after the maneuver is over).

Summary and discussion
The inverse dynamics analysis of underactuated mechanical systems in partly specified motion, referred here to as servo-constraint problem, is specific to the way in which the servo-constraints on the system are realized. Depending on the measure of projection of actuating forces onto the directions of servo-constraint gradients, rank(Y) = rank(HM −1 B) = p, realization of servo-constraints happens to be either orthogonal ( p = m = max), mixed orthogonal-tangential (0 < p < m), or pure tangential ( p = 0). Only in the case of Table 2 Types of realization of servo-constraints and the servo-constraint problem Implications   Servo-constraint realization   Orthogonal Orthogonal-tangential Tangential orthogonal realization an explicit input-output normal form HM −1 (g − k) + HM −1 Bu + h =ÿ exists, which allows for the direct inversion-based feedforward control design according to (12). The governing equations can then be represented in the ODE form (13). A solution to these ODEs involves the explicit output-input inverse dynamics model (12) and a remaining internal (unspecified) dynamics. The orthogonal realization of servo-constraints results therefore always in differentially non-flat servo-constraint problems, and stability of the internal dynamics is of critical importance [10,[13][14][15]22,31,32]. Neither the input-output normal form, the inverse dynamics model (12), nor an ODE formulation of governing equations are attainable for the other realization types of servo-constraints, the mixed orthogonal-tangential (0 < p < m) and pure tangential ( p = 0). The governing equations must then be formulated as DAEs, such as (15) or (18), and the assisted servo-constrained problem can be differentially flat or non-flat. In case of flatness, the servo-constraint problem becomes purely algebraic and a solution (21) exists (an analytical form of this solution is usually attainable only for simple problems). The observations are summarized in Table 2. Two variants of the DAE formulations were motivated in this paper: DAEs (15) that use the system configuration coordinates q, and DAEs (18) that are based on the coordinate transformation q = [q T a q T u ] T → q = [y T q T u ] T . An advantage of using the DAE formulations is that they are applicable to all possible types of realization of servo-constraints, and the two DAE sets are equivalent and lead to same numerical solutions according to the schemes (19) and (20), respectively.
The feedforward control of underactuated systems in partly specified motion can be designed as shown in Fig. 2 (for orthogonal realization of servo-constraints) and Fig. 3 (for all types of realization of servoconstraints), where α = 0 and β = 0 are used (the outer loop is canceled). In the case of orthogonal realization of servo-constraints, provided that the assisted internal dynamics is bounded, a feedback controller can be designed by applying the stabilized output form defined in (8), which is as a direct generalization of the control laws used for fully actuated systems. The design of a feedback controller for the mixed orthogonal-tangential and pure tangential realizations of servo-constraints is in general more challenging. Higher-order controllers, discussed in, e.g., [29,36,37], might be more appropriate. For differentially flat servo-constraint problems, this order should be equal to the order r introduced in the flatness-based solution (21), and a feedback controller should be based on y (r ) stab =ỹ (r ) + α r −1 (ỹ (r −1) −ẏ (r −1) ) + α r −2 (ỹ (r −2) −ẏ (r −2) ) + · · · + α 1 (ẏ −ẏ) + α 0 (ỹ − y) (33) where α r −1 , α r −2 , . . . , α 1 , α 0 are coefficients of Hurwitz polynomials having prescribed roots in the complex right-hand plane. As mentioned in Sect. 3.4, for many technically relevant servo-constraint problems like those for cranes executing a load prescribed motion, aircrafts in prescribed trajectory flight and trajectory tracking of flexible joint manipulators, as well as for the simple case study reported in Sect. 4.3, the order is r = 4. The control singularity (order r ) may be still larger, however. A simple illustration of such a case is the problem seen in Fig. 11, where f = 3 and m = 1, and the specified motion of mass m 3 , y = [ x 3 ] and y(t) = [s(t)], is to be actuated by the force F applied to mass m 1 , u = [ F]. Provided that there is no damping between the masses, the servo-constraint problem is differentially flat with the order r = 6. Both the solution and the control design for such higher-order servo-constraint problems are much more demanding/complex as compared to the contribution of this paper.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.