Keywords

Mathematics Subject Classification (2010)

1 Introduction

A popular controller design for mechanical systems is a two degree of freedom control structure. In this approach, a feedforward and a feedback controller are designed independently for tracking control and disturbance rejection [30]. The feedforward part is responsible for tracking, while the feedback part stabilizes the system around the specified output trajectory. A feedforward controller can be designed in terms of an inverse model of the system. This is straightforward in case of fully actuated systems. However, for underactuated systems, this task becomes more difficult. Underactuated systems have less control inputs than degrees of freedom. For some special cases, called differentially flat systems, an algebraic solution of the inverse model exists. However, there is no systematic approach to find such an algebraic solution. In addition, for general underactuated multibody systems, the inverse model might be a dynamical system itself. The analytical derivation of such an inverse model might be possible using the Byrnes/Isidori input-output normal form [22] for multibody systems formulated in generalized coordinates. Recently, the Byrnes/Isidori form has been generalized for multibody systems formulated in redundant coordinates in [5]. However, this is often burdensome as the equations tend to become complex even for simple systems.

The method of servo-constraints was proposed to avoid such problems and gives a straightforward numerical representation of the inverse model. It is a relatively new approach introduced in [8]. It is also called control, path or program constraints, see e.g. [13]. A general framework for the use of servo-constraints has been introduced in [9] and is extended in [11]. The equations of motion of a multibody system are extended by constraints enforcing the system output to stay on a specified output trajectory. The inverse model is then the numerical solution to the set of arising differential-algebraic equations (DAEs). As part of the numerical solution, the open-loop control input is obtained. Moreover, the desired state trajectories are part of the solution. A state feedback controller can then extend the feedforward control loop to stabilize the system around the trajectory. Thereby, the desired state trajectories are helpful in calculating the current tracking error for state feedback control.

So far, the servo-constraints approach is mainly applied to differentially flat systems. A system is differentially flat if its system input can be expressed as a function of the system output and a finite number of its derivatives [17]. Typical examples of flat systems controlled by servo-constraints are rotary cranes [6], overhead gantry cranes [9, 24] and 2-mass-spring systems or their generalization to infinitely many masses [1, 18]. In case of differentially flat systems, the inverse model is purely algebraic and can be used as a reference solution for the numerical solution obtained by servo-constraints.

In case of non-flat systems, the inverse model itself is a dynamical system. This is closely related to the internal dynamics in nonlinear control theory [22, 26]. Thus, stability of the arising internal dynamics has to be considered. Its stability can be analyzed in terms of zero dynamics [22, 26, 31]. Zero dynamics is the nonlinear extension of transmission zeros in linear systems, as for example shown in [32]. Zero dynamics allows a simplified stability analysis of the internal dynamics. Systems with asymptotically stable zero dynamics are called minimum phase systems, systems with unstable zero dynamics are non-minimum phase systems. First results of applying servo-constraints to non-flat systems are presented in [23] and [27]. In [27], results for minimum phase systems are presented, whereby the arising DAEs are solved by forward time integration. In case of unstable internal dynamics with a hyperbolic equilibrium point, stable inversion proposed in [15] can be applied [27]. This requires the solution of a boundary value problem, which is solved by a multiple shooting algorithm for a planar serial manipulator in [12]. Instead of solving for the internal dynamics and solving the boundary value problem, a reformulation to an optimization problem was proposed for a planar serial manipulator in [4]. Alternatively to solving the non-minimum phase system, the output can be redefined to obtain a minimum phase system [31].

Besides fully actuated or underactuated systems, servo-constraints have been applied to overactuated multibody systems with more independent controls than degrees of freedom. In this case, there is no unique solution to the inverse model problem and other requirements can be enforced. For example, minimizing the acceleration energy of a multibody system compared to its free motion is proposed in [3] to obtain a new set of servo-constraints.

Adding servo-constraints to the system dynamics usually results in a set of higher index DAEs [13]. Since higher index DAEs are more difficult to solve numerically, index reduction methods are used to reduce the differentiation index and therefore numerical complexity [19]. Index reduction by means of a projection onto the constrained and unconstrained directions is proposed in [9]. Index reduction by minimal extension is proposed in [2, 7].

Common DAE solving algorithms applicable for higher index DAEs are presented in [19]. Due to its simplicity, a fixed step implicit Euler scheme is proposed for servo-constraints problems in [9]. To ensure real-time applicability, a linear implicit Euler scheme is compared to an implicit Euler scheme in [24]. First experimental results and real-time capability of the servo-constraints approach are also shown in [24] for an overhead crane. In order to avoid the numerical issues arising with high-index DAEs, a reformulation of the problem as an optimization problem is proposed in [1]. The constraints are considered in the cost function. Thus, small errors in tracking are allowed in favor for smaller control inputs and relaxed smoothness conditions on the desired trajectory.

This contribution reviews the concept of servo-constraints for use in open-loop control of multibody systems. In Sect. 2, trajectory control and the modeling of mechanical systems are briefly reviewed. The servo-constraints approach, its solution approaches and index reduction methods are shown in Sect. 3. Various examples and simulation results are presented and analyzed in detail in Sect. 4. These include the mass-on-car system originally introduced in [28], an extended mass-on-car system and a mass-spring-damper chain with a finite number of masses. Moreover, the influence of different actuator models on the resulting DAE system is demonstrated. The results are summarized in Sect. 5.

2 Trajectory Control and Modeling of Multibody Systems

For trajectory tracking control of multibody systems, a two degree of freedom control structure is an efficient control method [30]. In this case, a feedforward control input u ffw and a feedback control input u fb are designed to track a desired trajectory z d, as visualized in Fig. 1. The feedforward control part is responsible for large motion tracking and is here based on an inverse model of the system. If there were no modeling errors or disturbances, the inverse model would cancel the model dynamics exactly, and there would be perfect tracking. However, there are usually some modeling errors and disturbances and a feedback control loop is necessary on top of the feedforward part. In order to reduce noise effects and to reduce corrections of the feedback path, an accurate inverse model is fundamental. For state feedback it is helpful that the inverse model not only provides the feedforward control input u ffw, but also the reference state trajectory x d. With the reference trajectory x d, the state tracking error is computed and used for state feedback control. Many different state feedback controllers are applicable. Simple feedback control strategies such as linear quadratic regulators might be sufficient due to small open-loop tracking errors with an accurate inverse model [24]. In case a prescribed tracking error performance is desired, a funnel controller might be applied, see e.g. [21].

Fig. 1
figure 1

Two degree of freedom control approach for multibody systems (MBS)

In order to design the inverse model, a model of the multibody system is introduced first. Systems with n degrees of freedom, m inputs and m outputs are considered. Underactuated systems are included for which hold n > m. Two formulations, based on minimal coordinates as well as redundant coordinates are introduced. The following presentations are restricted to holonomic multibody systems, which represent the most important ones in engineering applications.

2.1 Generalized Coordinates

For multibody systems without kinematic loops, it is possible to select a set of generalized coordinates \({\boldsymbol {y}} \in \mathbb {R}^{n}\) and generalized velocities \({\boldsymbol {v}} \in \mathbb {R}^{n}\) and to project the Newton and Euler equations of each body onto the direction of free motion. Due to Jourdain’s principle, this projection eliminates the reaction forces and yields a set of 2 n ordinary differential equations (ODEs)

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{Z}} ({\boldsymbol{y}} ) \,{\boldsymbol{v}} {} \end{aligned} $$
(2.1)
$$\displaystyle \begin{aligned} {\boldsymbol{M}} ({\boldsymbol{y}} ,t)\, {\dot{\boldsymbol{v}}} &= {\boldsymbol{q}} ({\boldsymbol{y}} ,{\boldsymbol{v}} ,t) + {\boldsymbol{B}} \boldsymbol{u} {} \, \end{aligned} $$
(2.2)

with the kinematics matrix \({\boldsymbol {Z}} : \mathbb {R}^n \rightarrow \mathbb {R}^{n\times n}\), the invertible generalized mass matrix \({\boldsymbol {M}} :\mathbb {R}^n \times \mathbb {R}\rightarrow \mathbb {R}^{n\times n}\), the vector of generalized forces \({\boldsymbol {q}} :\mathbb {R}^n \times \mathbb {R}^n\times \mathbb {R} \rightarrow \mathbb {R}^{n}\) and the input distribution matrix \({{\boldsymbol {B}} \in \mathbb {R}^{n\times m}}\). Note that the functions Z, M and q are assumed to be continuously differentiable. In most cases the generalized velocities are simply chosen as \({\boldsymbol {v}} ={\dot {\boldsymbol {y}}} \), thus Z is the identity matrix. However, the general case is used here such that generalized coordinates and redundant coordinates can be treated in a unified manner. For underactuated systems, the equations of motion are sometimes separated to

$$\displaystyle \begin{aligned} \setlength\arraycolsep{3pt} \begin{bmatrix} {{\dot{\boldsymbol{y}}} }_{\mathrm{a}} \\[0.2cm] {{\dot{\boldsymbol{y}}} }_{\mathrm{u}} \end{bmatrix} &= \begin{bmatrix} {\boldsymbol{Z}} _{\mathrm{aa}} & {\boldsymbol{Z}} _{\mathrm{au}} \\[0.2cm] {\boldsymbol{Z}} _{\mathrm{ua}} & {\boldsymbol{Z}} _{\mathrm{uu}} \end{bmatrix} \begin{bmatrix} {{\boldsymbol{v}} }_{\mathrm{a}} \\[0.2cm] {{\boldsymbol{v}} }_{\mathrm{u}} \end{bmatrix} \end{aligned} $$
(2.3)
$$\displaystyle \begin{aligned} \begin{bmatrix} {\boldsymbol{M}} _{\mathrm{aa}} & {\boldsymbol{M}} _{\mathrm{au}} \\[0.2cm] {\boldsymbol{M}} _{\mathrm{ua}} & {\boldsymbol{M}} _{\mathrm{uu}} \end{bmatrix} \begin{bmatrix} \dot{{\boldsymbol{v}} }_{\mathrm{a}} \\[0.2cm] \dot{{\boldsymbol{v}} }_{\mathrm{u}} \end{bmatrix} &= \begin{bmatrix}{\boldsymbol{q}} _{\mathrm{a}} \\[0.2cm] {\boldsymbol{q}} _{\mathrm{u}} \end{bmatrix} + \begin{bmatrix} {\boldsymbol{B}} _{\mathrm{a}} \\[0.2cm] \boldsymbol{0}\end{bmatrix} {\boldsymbol{u}} \,, {} \end{aligned} $$
(2.4)

where the indices a and u refer to actuated and unactuated parts respectively. These equations have 2 n unknowns, namely the generalized coordinates y and velocities v. Introducing the state vector

$$\displaystyle \begin{aligned} {\boldsymbol{x}} &= \begin{bmatrix}{\boldsymbol{x}} _{1} \\ {\boldsymbol{x}} _{2} \end{bmatrix}=\begin{bmatrix} {\boldsymbol{y}} \\ {\boldsymbol{v}} \end{bmatrix} ~ \in\mathbb{R}^{2n} \,, \end{aligned} $$
(2.5)

the ODE formulation in state space form is

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{x}}} &= \begin{bmatrix} {\boldsymbol{Z}} \;{\boldsymbol{x}} _{2} \\[0.2cm] {\boldsymbol{M}} ^{-1}\;{\boldsymbol{q}} \end{bmatrix} +\begin{bmatrix} \boldsymbol{0} \\[0.2cm] {\boldsymbol{M}} ^{-1}{\boldsymbol{B}} \end{bmatrix}{\boldsymbol{u}} \,. \end{aligned} $$
(2.6)

The system output \({\boldsymbol {z}} :\mathbb {R}^{n} \rightarrow \mathbb {R}^{m}\) of the multibody system is mostly chosen on position level, providing

$$\displaystyle \begin{aligned} {\boldsymbol{z}} &= {\boldsymbol{z}} ({\boldsymbol{y}} ) {} \,. \end{aligned} $$
(2.7)

In case the multibody system includes kinematic loops, it is usually not possible to select a set of minimal coordinates y. Then, the kinematic loop can be cut. It is then possible to select minimal coordinates for the resulting open chain, providing the dynamic equations (2.1)–(2.2). In order to close the loop again, loop closing constraints have to be added, yielding a DAE similar to the use of redundant coordinates.

2.2 Redundant Coordinates

Sometimes, it might be advantageous to select redundant coordinates to simplify the modeling process. For a system with n degrees of freedom and n c geometric constraints \({\boldsymbol {c}} _{\text{g}}({\boldsymbol {y}} ) : \mathbb {R}^{n+n_{\text{c}}} \rightarrow \mathbb {R}^{n_{\text{c}}}\) let now \({\boldsymbol {y}} \in \mathbb {R}^{n+n_{\text{c}}}\) be the vector of redundant coordinates and \({\boldsymbol {v}} \in \mathbb {R}^{n+n_{\text{c}}}\) the vector of redundant velocities. Then, the equations of motion in DAE form are

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{Z}} ({\boldsymbol{y}} ) \,{\boldsymbol{v}} {} \end{aligned} $$
(2.8)
$$\displaystyle \begin{aligned} \boldsymbol{M}(\boldsymbol{y},t)\, {\dot{\boldsymbol{v}}} &= {\boldsymbol{q}} (\boldsymbol{y},{\boldsymbol{v}} ,t) + \boldsymbol{C}_{\text{g}}^{\text{T}}({\boldsymbol{y}} )\,{\boldsymbol{\lambda}} + \boldsymbol{B} \boldsymbol{u} {} \end{aligned} $$
(2.9)
$$\displaystyle \begin{aligned} {\boldsymbol{c}} _{\text{g}}({\boldsymbol{y}} ) &= \boldsymbol{0} {} \,, \end{aligned} $$
(2.10)

where the geometric constraints c g(y) are enforced by the Lagrange multipliers \({{\boldsymbol {\lambda }} \in \mathbb {R}^{n_{\text{c}}}}\) which represent the generalized reaction forces of the multibody system. Equations (2.8)–(2.10) are a set of DAEs and have 2n + 3n c unknowns, namely y, v and λ and the same number of equations. Due to the invertibility of the mass matrix M, one can show that the set of DAEs (2.8)–(2.10) is of differentiation index 3 for general multibody systems. The differentiation index of a DAE system is defined as the maximum number of differentiations of the algebraic constraint necessary to transform the set of equations to a set of ordinary differential equations [14, 19]. Besides the most often used differentiation index, there are other index concepts. See [14] for a discussion and comparison of the index concepts for general nonlinear DAEs. Both the ODE formulation of Eqs. (2.1)–(2.2) and the DAE formulation of Eqs. (2.8)–(2.10) can be used in the modeling process of multibody systems. For the following model inversion using servo-constraints, the underlying modeling approach for multibody systems is secondary. For the inverse model, a DAE will always be obtained, irrespectively of the modeling approach. Therefore, for a unified treatment of servo-constraints, there is no distinction made in notation for redundant coordinates or generalized coordinates.

3 Servo-Constraints Approach

For trajectory tracking of the output z, the inverse model of the multibody system is sought. The input to the inverse model is the desired output trajectory z d(t) of the actual multibody system, while the inverse model provides the necessary input u d = u ffw for the multibody system to follow the desired trajectory, see Fig. 1.

For fully actuated systems where each degree of freedom can be controlled with an independent control input, the inverse model can be split into inverse kinematics and inverse dynamics [29]. In the inverse kinematics, the desired state trajectory x d is determined from the desired output trajectory z d, while the inverse dynamics provides the system input u d which is necessary to generate the desired state motion x d. For underactuated systems with more degrees of freedom than independent control inputs, this separation is not possible and both problems must be solved simultaneously. The servo-constraints approach is a method to solve for the inverse model numerically.

Motivated from the DAE representation of the multibody dynamics in Eqs. (2.8)–(2.10), the equations of motion are appended to include constraints which enforce the output z to be equal to the desired output trajectory z d. This extension is possible for either the ODE representation of Eqs. (2.1)–(2.2) in minimal coordinates or the DAE representation of Eqs. (2.8)–(2.10) in redundant coordinates. This yields a new set of equations

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{Z}} ({\boldsymbol{y}} ) \,{\boldsymbol{v}} {} \end{aligned} $$
(3.1)
$$\displaystyle \begin{aligned} \boldsymbol{M}(\boldsymbol{y},t)\, {\dot{\boldsymbol{v}}} &= {\boldsymbol{q}} (\boldsymbol{y},{\boldsymbol{v}} ,t) + \boldsymbol{C}_{\text{g}}^{\text{T}}({\boldsymbol{y}} )\,{\boldsymbol{\lambda}} + \boldsymbol{B} \boldsymbol{u} {} \end{aligned} $$
(3.2)
$$\displaystyle \begin{aligned} {\boldsymbol{c}} _{\text{g}}({\boldsymbol{y}} ) &= \boldsymbol{0} {} \end{aligned} $$
(3.3)
$$\displaystyle \begin{aligned} {\boldsymbol{c}} ({\boldsymbol{y}} ,t)&={\boldsymbol{z}} ({\boldsymbol{y}} )-{\boldsymbol{z}} _{\text{d}}(t) = \boldsymbol{0} {} \, \end{aligned} $$
(3.4)

with servo-constraints \({\boldsymbol {c}} ({\boldsymbol {y}} ,t): \mathbb {R}^{n}\times \mathbb {R} \rightarrow \mathbb {R}^{m}\). The set of equations has 2n + 3n c + m unknowns, namely the coordinates y and v, the Lagrange multipliers λ and the inputs u. In the following, it is assumed that the servo-constraints are compatible with the geometric constraints. Thus, motion that is already constrained by the geometric constraints cannot be forced on a desired trajectory that is not compatible with the geometric constraints. In case of minimal coordinates, the constraints c g and the Lagrange multipliers λ vanish. Thus, the servo-constraints are automatically compatible with the geometric constraints. The set of DAEs must be solved to yield the feedforward control input u d. Preferably, this should be done in real-time to allow trajectories to be altered in real-time.

The set of equations including the additional constraints c(y) remains structurally similar to the forward dynamics of Eqs. (2.8)–(2.10). While for the forward dynamics, the geometric constraints c g(y) are enforced by the Lagrange multipliers λ, in the inverse model case the servo-constraints c(y) are enforced by the system inputs u. Thus, there are some similarities between the terms Bu and \({\boldsymbol {C}} _{\text{g}}^{\text{T}}{\boldsymbol {\lambda }} \). The generalized reaction forces act orthogonal to the tangent of the constraint manifold and the system is in a so-called ideal orthogonal realization. However, in contrast to the generalized reaction forces \({\boldsymbol {C}} _{\text{g}}^{\text{T}}{\boldsymbol {\lambda }} \), the system inputs Bu are not necessarily perpendicular to the tangent space of the constraint manifold and different configurations can be distinguished [9]. An inverse model can be in ideal and non-ideal orthogonal and tangential configuration, which is visualized in Fig. 2. In case of multi-input-multi-output (MIMO) systems, there can be orthogonal as well as tangential configurations for individual inputs, yielding a mixed tangential-orthogonal configuration.

Fig. 2
figure 2

Possible realizations of the system input Bu with respect to the tangent of the constraint manifold defined by servo-constraints c(y). (a) Orthogonal configuration. (b) Non-ideal orthogonal configuration. (c) Tangential configuration

Following nonlinear control theory methods [22] and differentiating the output z from Eq. (2.7) twice, yields

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{z}}} &= {\widetilde{\boldsymbol{H}}} ({\boldsymbol{y}} ) {\dot{\boldsymbol{y}}} = \underbrace{{\widetilde{\boldsymbol{H}}} ({\boldsymbol{y}} )\,{\boldsymbol{Z}} ({\boldsymbol{y}} )}_{{{\boldsymbol{H}} }} {\boldsymbol{v}} \end{aligned} $$
(3.5)
$$\displaystyle \begin{aligned} {\ddot{\boldsymbol{z}}} &= {\boldsymbol{H}} ({\boldsymbol{y}} ) {\dot{\boldsymbol{v}}} + \bar{{\boldsymbol{z}}} ({\boldsymbol{y}} ,{\boldsymbol{v}} ) {} \,, \end{aligned} $$
(3.6)

where the matrix \({\widetilde {\boldsymbol {H}}} =\frac {\partial {\boldsymbol {z}} ({\boldsymbol {y}} )}{\partial {\boldsymbol {y}} } : \mathbb {R}^{n} \rightarrow \mathbb {R}^{m\times (n+n_{\text{c}})}\) describes the Jacobian of the output and all other derivatives are collected in \(\bar {{\boldsymbol {z}} }={\dot {\boldsymbol {H}}} {\boldsymbol {v}} \). Due to invertibility of the mass matrix M, the accelerations \({\dot {\boldsymbol {v}}} \) are substituted by the dynamic equation (2.9) yielding

$$\displaystyle \begin{aligned} {\ddot{\boldsymbol{z}}} &= {\boldsymbol{H}} {\boldsymbol{M}} ^{-1} \, \big( {\boldsymbol{q}} + {\boldsymbol{B}} \, {\boldsymbol{u}} \big) + \bar{{\boldsymbol{z}} } \,. \end{aligned} $$
(3.7)

From this follows the relation between input u and output z as

$$\displaystyle \begin{aligned} {\boldsymbol{H}} {\boldsymbol{M}} ^{-1}{\boldsymbol{B}} \, {\boldsymbol{u}} &= -{\boldsymbol{H}} {\boldsymbol{M}} ^{-1}{\boldsymbol{q}} + {\ddot{\boldsymbol{z}}} - \bar{{\boldsymbol{z}} } \,. \end{aligned} $$
(3.8)

The system input u is therefore connected to the output acceleration \({\ddot {\boldsymbol {z}}} \) through the matrix

$$\displaystyle \begin{aligned} {\boldsymbol{P}} &= {\boldsymbol{H}} {\boldsymbol{M}} ^{-1} {\boldsymbol{B}} \,. {} \end{aligned} $$
(3.9)

The rank p of the matrix \({\boldsymbol {P}} \in \mathbb {R}^{m\times m}\) is used as a measure of system configuration [9, 28]. Note that the matrix P corresponds to the matrix \({\boldsymbol {C}} _{\text{g}}{\boldsymbol {Z}} {\boldsymbol {M}} ^{-1}{\boldsymbol {C}} _{\text{g}}^{\text{T}}\) for geometric constraints which is of full rank for nonredundant geometric constraints.

In case of full rank p = m, the system input u can directly reach all components of the output and the inverse model is of ideal or non-ideal orthogonal realization. For orthogonal realizations, the arising DAEs are of index 3, similar to classical geometrically constrained systems. This can be seen by differentiating the output equation one more time and solving for \({\dot {\boldsymbol {u}}} \). In case of rank deficiency 0 < p < m, only p components of the output are directly actuated by the input and there is a mixed tangential-orthogonal realization. In case of p = 0, no system output can be directly actuated and the inverse model is in tangential realization. Note that this case is characteristic for differentially flat systems but not restricted to them [28]. For the configurations with singular matrix P, the differentiation index of the inverse model DAE is of index larger than 3.

3.1 Relationship Between Relative Degree and Differentiation Index of Inverse Model DAEs

The differentiation index as defined in Sect. 2.2 of the servo-constraints DAEs (3.1)–(3.4) is closely related to the relative degree from nonlinear control theory. For nonlinear systems, the relative degree is presented e.g. in [22, 31]. For single-input-single-output (SISO) systems, the relative degree is the number of differentiations of the output until the system input appears for the first time. For MIMO systems, this concept can be extended to a vector relative degree, see [31] for details. If the relative degree r of a system equals the number of states in state space (2n for common multibody systems), the system is input-state linearizable. This is typical for the case of fully actuated systems, e.g. industrial robots. In case that the relative degree r is smaller than the number of states, the system is input-output linearizable. Thus, a linear relationship between input and output is possible by coordinate transformation and state feedback. However, there remains dynamics which is not observable from the new input-output relationship and is therefore called internal dynamics [31].

The internal dynamics is usually nonlinear and difficult to analyze. Therefore, the concept of zero dynamics is applied, see e.g. [31]. Holding the system output identically to zero at all time, z(t) = 0t, provides the zero dynamics. Local stability of the zero dynamics can be analyzed by using for example Lyapunov’s indirect method. For tracking problems, the local exponential stability of the zero dynamics guarantees stability of the internal dynamics if the desired output trajectory and its first r − 1 derivatives are small in magnitude [31]. For stabilization problems with z d(t) = 0 ∀ t, the result can be relaxed, so that local asymptotic stability of the zero dynamics guarantees local asymptotic stability of the internal dynamics [31].

The relative degree r and zero dynamics are nonlinear extensions of the pole excess and transmission zeros of linear systems, see e.g. [32]. For linear controllable and observable SISO systems in state space form

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{x}}} &= {\boldsymbol{A}} \, {\boldsymbol{x}} + {\boldsymbol{b}} \, u {} \end{aligned} $$
(3.10)
$$\displaystyle \begin{aligned} z &= {\boldsymbol{C}} \, {\boldsymbol{x}} + d \, u {} \;, \end{aligned} $$
(3.11)

the relative degree equals the difference between the number of poles n p and number of zeros n z [32]. Thus, it holds

$$\displaystyle \begin{aligned} r &= n_{\text{p}}-n_{\text{z}} {}\,. \end{aligned} $$
(3.12)

The poles of a linear system in form of Eqs. (3.10)–(3.11) are the eigenvalues of the state space matrix A. Thus, for mechanical systems without integral type force laws the number of poles is n p = 2n. The transmission zeros are extracted from the transfer function

$$\displaystyle \begin{aligned} G(s) = {\boldsymbol{C}} \left(s {\boldsymbol{I}} - {\boldsymbol{A}} \right)^{-1} {\boldsymbol{b}} + {d} = \dfrac{p_{\text{d}}(s)}{p_{\text{n}}(s)}{} \end{aligned} $$
(3.13)

of system (3.10)–(3.11), where s is the variable in frequency domain and I is the identity matrix of respective size. The transmission zeros are the zeros of the denominator polynomial p d(s). For linear systems, the eigenvalues of the zero dynamics correspond exactly to the position of the transmission zeros. Linear analysis can be applied for linear systems to verify the zero dynamics and to determine stability of the internal dynamics. Note that the inverse model is also represented by the inverse transfer function G(s)−1. Thus, with no transmission zeros in the transfer function G(s), the inverse will not have any dynamics and is just an algebraic inverse model. If there are zeros, the inverse model features dynamics itself.

The relationship between the relative degree and the differentiation index for servo-constraints problems in form of Eqs. (3.1)–(3.4) has been analyzed in [13] for various mechanical examples. It was shown that the differentiation index is the relative degree plus one for the case that the system dynamics or at least the internal dynamics is modeled as an ODE. Otherwise, the differentiation index can be larger than r + 1, since the relative degree only concerns the input-output behavior, but the differentiation index concerns the complete DAE system (3.1)–(3.4). In the complete DAE system, it is possible for the internal dynamics to be modeled by a higher index DAE.

3.2 Index Reduction and Analysis Methods

The inverse model represented by the differential algebraic equations (3.1)–(3.4) is generally nonlinear and its differentiation index might be larger than 3. This complicates numerical treatment and analysis. Index reduction approaches have been proposed to reduce the DAE index, see e.g. [19]. Methods that are used so far in context of servo-constraints are the projection approach [9] and minimal extension [2]. Besides the index reduction methods, further analysis methods are available which are helpful for non-flat systems. In that case, the internal dynamics needs to be extracted from the DAEs and analyzed with respect to its stability. For that reason, a coordinate projection approach was proposed in [28]. Moreover, a reformulation of the model dynamics using redundant coordinates might be helpful for numerical treatment and analysis [11, 24]. In the following, the projection approach, coordinate transformation approach and a reformulation of the problem are briefly reviewed and applied to the examples in Sect. 4.

3.2.1 Projection Approach

For multibody systems in ODE form, the projection approach is presented in [9] and is expanded for systems in DAE form in [11]. Here, the projection for ODE systems given by Eqs. (2.1)–(2.2) is summarized. By defining suitable projection matrices, the equations are projected onto a constrained and an unconstrained subspace which are complementary subspaces. The constrained subspace is orthogonal to the tangent space of the constraint manifold and its projection matrix follows from the Jacobian of the servo-constraints \(\boldsymbol {H} : \mathbb {R}^{n} \rightarrow \mathbb {R}^{m\times n}\). The unconstrained subspace is tangential to the constraint manifold and spanned by the matrix \({\boldsymbol {G}} : \mathbb {R}^{n} \rightarrow \mathbb {R}^{n\times (n-m)}\) obtained from

$$\displaystyle \begin{aligned} {\boldsymbol{H}} {\boldsymbol{G}} &= \boldsymbol{0} ~,\quad {\boldsymbol{G}} ^{\text{T}}{\boldsymbol{H}} ^{\text{T}} = \boldsymbol{0} \,. \end{aligned} $$
(3.14)

Projecting the dynamic equations onto the respective subspaces yields

$$\displaystyle \begin{aligned} \begin{bmatrix} {\boldsymbol{G}} ^{\mathrm{T}} \\ {\boldsymbol{H}} {\boldsymbol{M}} ^{-1} \end{bmatrix} \big( \boldsymbol{M}(\boldsymbol{y},t)\, {\dot{\boldsymbol{v}}} = {\boldsymbol{q}} (\boldsymbol{y},{\boldsymbol{v}} ,t) + \boldsymbol{B}\, \boldsymbol{u} \big) \,. \end{aligned} $$
(3.15)

The term \({\boldsymbol {H}} {\dot {\boldsymbol {v}}} \) is replaced by the output equation (3.6), where also the servo-constraint is substituted to yield \({{\boldsymbol {H}} {\dot {\boldsymbol {v}}} ={\ddot {\boldsymbol {z}}} _{\text{d}}-\bar {{\boldsymbol {z}} }}\). By this substitution, the number of differential equations is reduced. Reordering the projected dynamic equations and adding the servo-constraint Eq. (3.4) yields a new set of DAEs

$$\displaystyle \begin{aligned} \boldsymbol{\dot{y}} &= {\boldsymbol{Z}} \boldsymbol{v} {} \end{aligned} $$
(3.16)
$$\displaystyle \begin{aligned} {\boldsymbol{G}} ^{\mathrm{T}} \boldsymbol{M} \boldsymbol{\dot{v}} &= {\boldsymbol{G}} ^{\mathrm{T}} {\boldsymbol{q}} + {\boldsymbol{G}} ^{\mathrm{T}}{\boldsymbol{B}} \,{\boldsymbol{u}} {} \end{aligned} $$
(3.17)
$$\displaystyle \begin{aligned} \mathbf{0} &= {\boldsymbol{H}} {\boldsymbol{M}} ^{-1} \,{\boldsymbol{q}} + {\boldsymbol{H}} {\boldsymbol{M}} ^{-1} {\boldsymbol{B}} {\boldsymbol{u}} - {\ddot{\boldsymbol{z}}} _{\text{d}} + {\dot{\boldsymbol{H}}} {\boldsymbol{v}} {} \end{aligned} $$
(3.18)
$$\displaystyle \begin{aligned} \mathbf{0} &= {\boldsymbol{z}} - {\boldsymbol{z}} _{\text{d}}\,. {} \end{aligned} $$
(3.19)

Note that the dimension of differential equations is reduced. The differential equations (3.16) and (3.17) are of dimension n and n − m respectively, while each of the algebraic equations (3.18) and (3.19) is of dimension m. For the overhead crane example which is often used for demonstration purposes, this projection was sufficient to reduce the DAE index from 5 to 3 and simplify the numerical solution [9, 24].

3.2.2 Coordinate Transformation

For analysis purposes of the system behavior, it might be convenient to apply a coordinate transformation to the equations of motion. With the transformation, ODEs describing the internal dynamics can be extracted and stability in terms of zero dynamics can be analyzed. While the coordinate transformation is here shown for dynamic systems in ODE form, a generalization is possible for systems in DAE form [5]. Motivated by nonlinear control theory, it is useful to rewrite the equations of motion given by Eqs. (2.1)–(2.2) in a new set of coordinates

$$\displaystyle \begin{aligned} {\boldsymbol{y}} ^{\prime} &= \begin{bmatrix} {\boldsymbol{z}} \\ {\boldsymbol{y}} _{\text{u}} \end{bmatrix} = \begin{bmatrix} {\boldsymbol{z}} ({\boldsymbol{y}} )\\ {\boldsymbol{y}} _{\text{u}} \end{bmatrix} {} \,, \end{aligned} $$
(3.20)

which include the system output z. For the new velocities, it follows

$$\displaystyle \begin{aligned} {\boldsymbol{v}} ^{\prime} &= \begin{bmatrix} {\dot{\boldsymbol{z}}} \\ {\boldsymbol{v}} _{\text{u}} \end{bmatrix} = \begin{bmatrix} {\boldsymbol{H}} _{\text{a}} & {\boldsymbol{H}} _{\text{u}}\\ \boldsymbol{0}&\boldsymbol{I} \end{bmatrix} \begin{bmatrix} {\boldsymbol{v}} _{\text{a}}\\ {\boldsymbol{v}} _{\text{u}} \end{bmatrix} \,. \end{aligned} $$
(3.21)

Note that the output Jacobian H is split into two parts such that \({\boldsymbol {H}} =\begin {bmatrix} {\boldsymbol {H}} _{\text{a}} &~ {\boldsymbol {H}} _{\text{u}}\end {bmatrix}\,,\) according to actuated and unactuated generalized coordinates. Also note that the submatrix H a must be invertible for an admissible coordinate transformation [28]. This holds if the output equation z(y) depends on all actuated coordinates y a. For the acceleration level holds accordingly

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{v}}} ^{\prime} &= \begin{bmatrix} {\ddot{\boldsymbol{z}}} \\ {\dot{\boldsymbol{v}}} _{\text{u}} \end{bmatrix} = \begin{bmatrix} {\boldsymbol{H}} _{\text{a}} & {\boldsymbol{H}} _{\text{u}}\\ \boldsymbol{0}&{\boldsymbol{I}} \end{bmatrix} \begin{bmatrix} {\dot{\boldsymbol{v}}} _{\text{a}}\\ {\dot{\boldsymbol{v}}} _{\text{u}} \end{bmatrix} + \begin{bmatrix} \bar{{\boldsymbol{z}} } \\ \boldsymbol{0} \end{bmatrix} \,, \end{aligned} $$
(3.22)

where the acceleration \({\dot {\boldsymbol {v}}} =\begin {bmatrix} {\dot {\boldsymbol {v}}} _{\text{a}}&{\dot {\boldsymbol {v}}} _{\text{u}} \end {bmatrix}^{\text{T}}\) is substituted from Eq. (2.2) to yield

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{v}}} ^{\prime} &= \begin{bmatrix} {\boldsymbol{P}} \,{\boldsymbol{u}} + {\boldsymbol{H}} {\boldsymbol{M}} ^{-1}{\boldsymbol{q}} +\bar{{\boldsymbol{z}} } \\ \big[\boldsymbol{0}\,\vdots\,{\boldsymbol{I}} \big]{\boldsymbol{M}} ^{-1}\left({\boldsymbol{B}} {\boldsymbol{u}} +{\boldsymbol{q}} \right) \end{bmatrix}\,. \end{aligned} $$
(3.23)

In these equations, the original coordinates y a, v a must be substituted by the new coordinates z, \({\dot {\boldsymbol {z}}} \). This involves solving the generally nonlinear equation (3.20) for y a. In Sect. 4.2 it will be shown how this coordinate transformation helps extracting and evaluating the internal dynamics.

3.2.3 Using Redundant Coordinates for Servo-Constraints Approach

A method slightly similar to the coordinate transformation is presented in the following. As was proposed in [11], it might be convenient to derive the system dynamics in DAE form since a DAE system has to be solved anyways for the inverse model. This simplifies the modeling process. In the special case, where the system output z is directly part of the redundant coordinate vector y, this also simplifies the solution process. Then, the redundant coordinate vector can be reordered so that the output is represented as

$$\displaystyle \begin{aligned} {\boldsymbol{z}} &= \begin{bmatrix} {\boldsymbol{I}} & \boldsymbol{0}\end{bmatrix} {\boldsymbol{y}} \,, \end{aligned} $$
(3.24)

where I is an m × m identity matrix and here \(\boldsymbol {0}\in \mathbb {R}^{m\times n-m}\). The servo-constraints c(y) then reduce to

$$\displaystyle \begin{aligned} {\boldsymbol{c}} ({\boldsymbol{y}} )=\begin{bmatrix} {\boldsymbol{I}} & \boldsymbol{0}\end{bmatrix} {\boldsymbol{y}} -{\boldsymbol{z}} _{\text{d}}(t) &= \boldsymbol{0}\,. \end{aligned} $$
(3.25)

Then, the servo-constraints and its derivatives

$$\displaystyle \begin{aligned} \boldsymbol{0} &= \begin{bmatrix} {\boldsymbol{I}} & \boldsymbol{0}\end{bmatrix} {\dot{\boldsymbol{y}}} - {\dot{\boldsymbol{z}}} _{\text{d}} \,, \qquad \boldsymbol{0} = \begin{bmatrix} {\boldsymbol{I}} & \boldsymbol{0}\end{bmatrix} ({\boldsymbol{Z}} {\dot{\boldsymbol{v}}} +{\dot{\boldsymbol{Z}}} {\boldsymbol{v}} ) -{\ddot{\boldsymbol{z}}} _{\text{d}} \,. \end{aligned} $$
(3.26)

can be substituted in the set of DAEs (3.1)–(3.4). Thus, the first m equations of the differential equation (3.2) reduce to algebraic instead of differential equations, since \({\ddot {\boldsymbol {z}}} _{\text{d}}\) is specified by the trajectory. It has been shown in [24], that this substitution reduces the DAE index from 5 to 3 for the overhead crane system.

This analysis method is related to the coordinate transformation because the output is also represented as part of the coordinate vector and is useful for analysis and index reduction purposes.

3.3 DAE Solver

The set of original differential algebraic equations (3.1)–(3.4) or projected equations (3.16)–(3.19) is solved for the desired control input u d and the desired trajectories of all coordinates. Note that the existence of a solution and especially a unique solution is not guaranteed for general nonlinear DAEs. Also, in order to calculate a solution, the set of initial conditions y 0, v 0, u 0 must be consistent with the constraints (3.3), (3.4) or (3.18), (3.19) respectively. Consistent initial conditions may be determined by solving the static multibody system in the starting equilibrium position. Note that in case the solution is not unique or not existent, the solver might not even notify the user [16]. Therefore, the calculated solution must always be carefully monitored, see e.g. the proposed method in [16]. A solution might not exist in case the desired trajectory cannot be generated by the system states because of e.g. conflicting geometric constraints and servo-constraints. Multiple solutions arise when the desired output trajectory can be reached by different state trajectories. This is for example already the case for a 2-arm manipulator. Redundant multibody systems with more system inputs than degrees of freedom also show this property. In that case, any solution is fine for open-loop control as long as the constraints on the output trajectory are fulfilled. The remaining free parameters might then be utilized to optimize the motion e.g. by constraining or optimizing the energy input to the system [3]. The calculated solution can always be verified by applying the determined control input u d in a forward-time integration. In the following, we assume the solution to be existent and unique.

Applicable DAE solvers for higher index DAEs must be chosen carefully. For detailed presentation of applicable integration schemes refer to [19]. DAE integrators either use a fixed or variable step size. The choice of a suitable method depends on the desired application.

The servo-constraints method is applicable for evaluating desired trajectories and estimating maximum control inputs. In this offline usage, a variable-step size solver with potentially high convergence order is an appropriate choice to yield accurate solutions. For this usage, a reformulation of the DAE problem into an optimization problem can be helpful as well, as proposed in [1].

For online usage as a feedforward control with possibly time-varying trajectories, a fixed-step size solver with real-time applicability is necessary. In order to ensure real-time capability, one or few iterations in an underlying nonlinear equations solver are necessary. An implicit Euler scheme has the necessary stability properties and is applied in [10, 24, 28]. In the Euler scheme, nonlinear equations have to be solved using an iterative scheme, for example Newton’s method. In order to ensure real-time capability, the scheme can be restricted to one iteration, resulting in the linear implicit Euler scheme. For the overhead crane example, it was shown in [24] that both the linear implicit Euler scheme and the implicit Euler scheme with a maximum number of 10 iterations show comparable results and are both suitable for real-time implementation. A drawback of such a simple scheme is for example its numerical damping [20]. Moreover, ill-conditioning issues might arise when applying Newton’s method. Such problems might be prevented by pre-scaling the algebraic equations [25]. Also, higher order schemes with fixed-step size such as implicit Runge-Kutta methods or backwards differencing formulas also seem applicable and yield higher convergence orders. The use of more advanced integration schemes for real-time application of servo-constraints is ongoing research. This paper concentrates on the application of the implicit Euler.

For the implicit Euler scheme, a discretization with time step size Δt is performed by finite differences

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} _k \approx \dfrac{{\boldsymbol{y}} _{k+1}-{\boldsymbol{y}} _{k}}{\varDelta t} \,, \end{aligned} $$
(3.27)

where the indices k + 1 and k describe the value of y at the time instants k + 1 and k respectively and the division is element-wise. Applying the implicit Euler approximation then results in the nonlinear set of equations

$$\displaystyle \begin{aligned} \dfrac{{\boldsymbol{y}} _{k+1}-{\boldsymbol{y}} _{k}}{\varDelta t} &= {\boldsymbol{Z}} ({\boldsymbol{y}} _{k+1}) \, {\boldsymbol{v}} _{k+1} \end{aligned} $$
(3.28)
$$\displaystyle \begin{aligned} \boldsymbol{M}\left( \boldsymbol{y}_{k+1},t_{k+1}\right) \, \dfrac{{\boldsymbol{v}} _{k+1}-{\boldsymbol{v}} _{k}}{\varDelta t} &=\boldsymbol{q}\left( \boldsymbol{y}_{k+1},{\boldsymbol{v}} _{k+1},t_{k+1}\right) + \boldsymbol{C}_{\text{g}}^{\text{T}}({\boldsymbol{y}} _{k+1})\,{\boldsymbol{\lambda}} _{k+1} + \boldsymbol{B} \,\boldsymbol{u}_{k+1} \end{aligned} $$
(3.29)
$$\displaystyle \begin{aligned} \boldsymbol{0} &= {\boldsymbol{c}} _{\text{g}}({\boldsymbol{y}} _{k+1}) \end{aligned} $$
(3.30)
$$\displaystyle \begin{aligned} \boldsymbol{0} &= {\boldsymbol{c}} ({\boldsymbol{y}} _{k+1}) \end{aligned} $$
(3.31)

which is collected in a single vector F for readability

$$\displaystyle \begin{aligned} \boldsymbol{0} &= {\boldsymbol{F}} ({\boldsymbol{y}} _{k+1},{\boldsymbol{v}} _{k+1},{\boldsymbol{u}} _{k+1},{\boldsymbol{\lambda}} _{k+1}) {} \,. \end{aligned} $$
(3.32)

The set of nonlinear equations F is solved for the coordinates y and v, generalized forces λ and inputs u at time instant t k+1 using Newton’s method. Note that the implicit Euler scheme is also applicable to the projected DAE system of Eqs. (3.16)–(3.19) and results in an analogous nonlinear set of equations.

4 Illustrative Examples

Examples of some multibody systems are presented in the following. They include a mass-on-car system derived in minimal and redundant coordinates. With this system it is shown how small changes in the model properties can change the inverse model configuration from orthogonal to tangential realization. Also, the substitution from Sect. 3.2.3 is applied to enhance the DAE solution. Then, an extended mass-on-car system demonstrates the existence of first order as well as second order internal dynamics. The internal dynamics is extracted in ODE form based on the coordinate transformation from Sect. 3.2.2. Moreover, a mass-spring-damper chain is presented to show the influence of an increasing DAE index and how the projection method from Sect. 3.2.1 improves the DAE solution. Finally, it is illustrated how the choice of actuator models influences the resulting differentiation index.

4.1 Mass-on-Car System

The mass-on-car system is analyzed in detail in [28] to illustrate the different phenomena arising in inverse model problems. The results using minimal coordinates from [28] are briefly reviewed and compared to the use of redundant coordinates. The SISO system consists of two masses connected by a linear spring-damper combination. The first mass moves horizontally and is driven by the force F. The second mass is inclined by an angle α and is connected by a spring-damper combination. The two degree of freedom system is underactuated and shown in Fig. 3.

Fig. 3
figure 3

SISO mass-on-car system

The minimal coordinates are chosen as

(4.1)

where x 1 describes the position of mass 1 and s 1 denotes the relative motion of mass 2 with respect to mass 1. For equilibrium holds s 1 = 0. The system input is the force F applied to mass 1 in horizontal direction. The equations of motion in ODE form arise as

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{v}} {} \end{aligned} $$
(4.2)
$$\displaystyle \begin{aligned} \renewcommand*{\arraystretch}{1.3} \setlength\arraycolsep{5pt} \begin{bmatrix} m_1+m_2 & m_2\cos{{\alpha}} \\ m_2\cos{{\alpha}} & m_2 \end{bmatrix} {\dot{\boldsymbol{v}}} &= \renewcommand*{\arraystretch}{1.3} -\begin{bmatrix} 0\\ k\,s_1 + d\,\dot{s}_1 \end{bmatrix} + \begin{bmatrix} 1 \\0 \end{bmatrix}F \,, {} \end{aligned} $$
(4.3)

where the masses of bodies 1 and 2 are m 1 and m 2 and the spring and damper coefficients are k and d respectively. The system output is the horizontal position of mass 2 such that

$$\displaystyle \begin{aligned} z = x_1 + s_1\cos{{\alpha}} \,. \end{aligned} $$
(4.4)

Accordingly, the servo-constraint is

$$\displaystyle \begin{aligned} c({\boldsymbol{y}},t) = x_1 + s_1\cos{{\alpha}} - z_{\text{d}}(t) =0 \,. {} \end{aligned} $$
(4.5)

Thus, Eqs. (4.2), (4.3) and (4.5) form the inverse model. The various configurations of the inverse model are derived in [28] for different angles α. For analysis, the matrix P from Eq. (3.9) is evaluated as

$$\displaystyle \begin{aligned} P &= \dfrac{\sin^2{{\alpha}} }{m_1+m_2\sin^2{{\alpha}} } \,. \end{aligned} $$
(4.6)

A configuration with angle α = 90 decouples the motion between mass 1 and mass 2. It can be shown that the relative degree is r = 2 and the inverse model has an ideal orthogonal realization, due to regularity of P. The motion of mass 2 remains as internal dynamics of second order and does not contribute to the output z. In case the angle is 0 < α < 90, the motion between mass 1 and 2 is coupled. However, the system has still a relative degree r = 2 and is in non-ideal orthogonal realization. For an angle α = 0, the system has relative degree r = 3 and represents tangential realization due to P = 0. The internal dynamics is first order dynamics in this case. In case of α = 0 and no damping d = 0 Nsm−1, the system becomes differentially flat and has a relative degree r = 4. There is no internal dynamics and the analytical solution is derived in [28] as

$$\displaystyle \begin{aligned} F_{\text{exact}} &= \left(m_1+m_2 \right) \ddot{z}_{\text{d}} + \dfrac{m_1\,m_2}{k} \, z_{\text{d}}^{(4)}\,. {} \end{aligned} $$
(4.7)
Table 1 Overview of different mass-on-car cases depending on angle α

These various cases are summarized in Table 1. So far, the system was analyzed using the minimal coordinates of Eq. (4.21). As described in Sect. 3.2.3, it might be advantageous to rewrite the system dynamics using redundant coordinates. Here, the redundant coordinates are chosen as

$$\displaystyle \begin{aligned} {\boldsymbol{y}} = \begin{bmatrix} x_1 \\ x_2 \\ y_2 \end{bmatrix} {} \,, \end{aligned} $$
(4.8)

where x i and y i denote the horizontal and vertical position of mass 1 and 2 respectively. Then, the model dynamics arises in DAE form as

$$\displaystyle \begin{aligned} \renewcommand*{\arraystretch}{1.3} {\dot{\boldsymbol{y}}} &= {\boldsymbol{v}} {} \end{aligned} $$
(4.9)
$$\displaystyle \begin{aligned} \begin{bmatrix} m_1 & 0& 0\\ 0& m_2 & 0\\ 0 & 0 & m_2 \end{bmatrix} {\dot{\boldsymbol{v}}} &=\renewcommand*{\arraystretch}{1.3} \begin{bmatrix} F_{\text{SD}}\cos{{\alpha}} \\ -F_{\text{SD}}\cos{{\alpha}} \\-F_{\text{SD}}\sin{{\alpha}} - m_2\,g \end{bmatrix} + {\boldsymbol{C}} _{\text{g}}^{\text{T}} \lambda + \begin{bmatrix} 1\\0\\0 \end{bmatrix} F {} \end{aligned} $$
(4.10)
$$\displaystyle \begin{aligned} c_{\text{g}}({\boldsymbol{y}} ) &= (x_2-x_1)\,\tan{{\alpha}} -(y_2-h) =0 {} \,. \end{aligned} $$
(4.11)

Here, the generalized reaction force between the inclined plane and mass 2 is denoted by λ, the vertical position of mass 2 in equilibrium is h and the applied force F SD from the spring-damper combination is

$$\displaystyle \begin{aligned} F_{\text{SD}} = k\,s_1+d\,\dot{s}_1 -m_2\,g\sin{{\alpha}} \,. \end{aligned} $$
(4.12)

Using redundant coordinates, the relative position s 1 is

$$\displaystyle \begin{aligned} s_1 &= \begin{cases} \sqrt{\left( x_2-x_1\right)^2+\left( y_2-h\right) ^2 } & x_2>x_1 \\[0.3cm] 0 & x_1=x_2 \\[0.2cm] -\sqrt{\left( x_2-x_1\right)^2+\left( y_2-h\right) ^2 } & x_2<x_1 \end{cases} {} \end{aligned} $$
(4.13)

where the constraint c g(y) from Eq. (4.11) is substituted in Eq. (4.13) yielding

$$\displaystyle \begin{aligned} s_1 &= \left( x_2-x_1\right) \,\sqrt{1+\tan^2{{\alpha}} }\,. \end{aligned} $$
(4.14)

Thus, singularities in \(\dot {s}\) are avoided. Note that the geometric constraint c g(y) of Eq. (4.11) forces mass 2 to stay on the inclined plane and its Jacobian is

$$\displaystyle \begin{aligned} {\boldsymbol{C}} _{\text{g}} &= \begin{bmatrix} - \tan{{\alpha}} ~&~ \tan{{\alpha}} ~&~ -1 \end{bmatrix} \,. \end{aligned} $$
(4.15)

The system output is still the horizontal position of mass 2, z = x 2. The servo-constraint is then given by

$$\displaystyle \begin{aligned} c({\boldsymbol{y}},t)&=x_2-z_{\text{d}}(t)=0 \,. {} \end{aligned} $$
(4.16)

Together with Eqs. (4.9)–(4.11), this forms the inverse model DAE. Note that with the redundant coordinates of Eq. (4.8), the system output is part of the coordinate vector with

$$\displaystyle \begin{aligned} z = \begin{bmatrix} 0 \,&\, 1 \,&\, 0 \end{bmatrix} {\boldsymbol{y}} = x_2 \,. \end{aligned} $$
(4.17)

As proposed in Sect. 3.2.3, the servo-constraint Eq. (4.16) is directly substituted into the model dynamics in order to reduce numeric complexity. This yields the inverse model

$$\displaystyle \begin{aligned} \renewcommand*{\arraystretch}{1.3} \begin{bmatrix} m_1 & 0& 0\\ 0& m_2 & 0\\ 0 & 0 & m_2 \end{bmatrix} \begin{bmatrix} \ddot{x}_1 \\ \ddot{z}_{\text{d}} \\ \ddot{y}_2 \end{bmatrix} &=\renewcommand*{\arraystretch}{1.3} \begin{bmatrix} F_{\text{SD}}\cos{{\alpha}} \\ -F_{\text{SD}}\cos{{\alpha}} \\-F_{\text{SD}}\sin{{\alpha}} -m_2\,g \end{bmatrix} + {\boldsymbol{C}} _{\text{g}}^{\text{T}} \lambda + \begin{bmatrix} 1\\0\\0 \end{bmatrix} F {} \end{aligned} $$
(4.18)
$$\displaystyle \begin{aligned} c_{\text{g}}({\boldsymbol{y}} ) &= (z_{\text{d}}-x_1)\,\tan{{\alpha}} -(y_2-h) =0 \,, {} \end{aligned} $$
(4.19)

where the explicit servo-constraint c(y, t) is dropped due to its substitution into Eqs. (4.18)–(4.19).

For comparison, the inverse model is solved by an implicit Euler scheme in form of minimal coordinates given by Eqs. (4.2), (4.3) and (4.5), redundant coordinates given by Eqs. (4.9)–(4.11) and (4.16) and the substituted redundant coordinates given by Eqs. (4.18) and (4.19). Moreover, index reduction by projection as described in Sect. 3.2.1 is applied to the minimal coordinates formulation of Eqs. (4.2)–(4.3) and the solution is compared to the other formulations. The model parameters are summarized in Table 2 and the differentially flat case with α = 0 and d = 0 Nsm−1 is chosen. The desired trajectory z d(t) from z d(0) = 0.5 m to z d(t f) = 2.5 m as well as the computed minimal coordinates x 1 and s 1 and input F are shown in Fig. 4 for step size Δt = 0.01 s and transition time t f = 10 s. Irrespectively of the formulation, no obvious difference is seen from these plots. Therefore, only one representative solution is shown here.

Fig. 4
figure 4

Desired trajectory z d and numerical results for the mass-on-car system with time step size Δt = 0.01 s

Table 2 Overview of parameters for mass-on-car system

Convergence of the implicit Euler scheme is shown in Fig. 5, where the maximum error of the computed system input is plotted over different time steps Δt. The maximum error e max between the analytic system input F exact given by Eq. (4.7) and the computed input F is

$$\displaystyle \begin{aligned} e_{\text{max}} &= \max_{t} \; \left\lbrace \lvert F_{\text{exact}}(t) - F(t) \rvert\right\rbrace \,. {} \end{aligned} $$
(4.20)

All results show first order convergence behavior. Both the formulation in redundant coordinates given by Eqs. (4.9)–(4.11) and (4.16) and the minimal coordinates formulation of Eqs. (4.2)–(4.3) and (4.5), referenced by DAE and ODE respectively, run into numerical rounding errors for step sizes smaller than Δt = 0.01 s. In contrast, the substituted Eqs. (4.18)–(4.19) and the projected equations, referenced by DAE subs and ODE proj respectively, show stable numerical results up to a step size Δt = 0.001 s due to index reduction. Thus, a substitution or projection should be favored over the other two formulations for solving the inverse model problem. Plotting the computed system input F over time also shows the numerical instability for small step sizes. In Fig. 6, the computed system input is shown for a step size Δt = 0.005 s for the redundant coordinate formulation as well as the substituted formulation. Numerical rounding errors result in numerical noise that amplifies over time for the DAE, while the substituted formulation is smooth.

Fig. 5
figure 5

Maximum error e max between numerical and analytical solution of the mass-on-car system for different time step sizes Δt and various inverse model formulations

Fig. 6
figure 6

Computed system input F for the mass-on-car system for time step size Δt = 0.005 s

4.2 Extension of Mass-on-Car System

The previously described mass-on-car system is extended by an additional mass and is visualized in Fig. 7. The additional body 1 with mass m 1 is driven by the force F and is connected to body 2 by a linear spring-damper combination with coefficients k 1 and d 1 respectively. Body 3 moves on a plane inclined by an angle α and is connected to body 2 by a linear spring-damper combination with coefficients k 2 and d 2. The SISO system has n = 3 of freedom and is underactuated.

Fig. 7
figure 7

Extended mass-on-car system

The dynamics of the extended mass-on-car system is described by minimal coordinates

(4.21)

where the position of body 1 is described by x 1 and the relative positions of bodies 2 and 3 are described by s 1 and s 2 respectively. Applying the Newton-Euler formalism, the equations of motion in ODE form arise as

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{v}} {} \end{aligned} $$
(4.22)
$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} \begin{bmatrix} m_1+m_2+m_3 & m_2+m_3 & m_3\cos{{\alpha}} \\[0.2cm] m_2+m_3 & m_2+m_3 & m_3\cos\alpha\\[0.2cm] m_3\cos\alpha & m_3\cos\alpha & m_3 \end{bmatrix} {\dot{\boldsymbol{v}}} &= - \begin{bmatrix} 0\\[0.2cm]d_1\dot{s}_1+k_1s_1\\[0.2cm]d_2\dot{s}_2+k_2s_2 \end{bmatrix} + \begin{bmatrix} 1\\[0.2cm]0\\[0.2cm]0 \end{bmatrix}F {} \;. \end{aligned} $$
(4.23)

The system output is defined as the horizontal position of mass 3, such that

$$\displaystyle \begin{aligned} z &= x_1 + s_1 + s_2 \cos {{\alpha}} \,. {} \end{aligned} $$
(4.24)

Thus, the servo-constraints follow as

$$\displaystyle \begin{aligned} {c}({\boldsymbol{y}},t) = x_1 + s_1 + s_2 \cos {{\alpha}} - z_{\text{d}}=0 \,.{} \end{aligned} $$
(4.25)

In order to determine the constraint realization, the matrix P from Eq. (3.9) is evaluated for this SISO system as P = 0 for all configuration angles α. This is because the system input F never directly influences the output z. There is always a coupling between the two masses by the spring k 1. Thus, the inverse model is in tangential realization for all angles α. Further analysis is performed using the coordinate transformation described in Sect. 3.2.2. Accordingly, the actuated coordinate x 1 is replaced by the output z, such that the new set of coordinates is

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\boldsymbol{y}} ^\prime &= \left[ \begin{array}{c} z \\ s_1\\ s_2 \end{array} \right] = \left[ \begin{array}{c} x_1 + s_1 + s_2 \cos {{\alpha}} \\ s_1\\ s_2 \end{array} \right] = \begin{bmatrix} 1&1&\cos\alpha\\0&1&0\\ 0&0&1 \end{bmatrix} {\boldsymbol{y}} = \begin{bmatrix}{\boldsymbol{H}} _{\text{a}} & {\boldsymbol{H}} _{\text{u}}\\[0.2cm]\boldsymbol{0} & {\boldsymbol{I}} \end{bmatrix} {\boldsymbol{y}} \;. \end{aligned} $$
(4.26)

The transformation matrix is invertible for all angles α, since H a is invertible for all angles α. Following the procedure described in Sect. 3.2.2, the dynamics of the new set of generalized coordinates y arises as

$$\displaystyle \begin{aligned} \renewcommand*{\arraystretch}{1.5} {\dot{\boldsymbol{y}}} ^\prime &= \begin{bmatrix} \dot{z}\\[0.2cm]\dot{s}_1 \\[0.2cm]\dot{s}_2 \end{bmatrix} = {\boldsymbol{v}} ^\prime \end{aligned} $$
(4.27)
$$\displaystyle \begin{aligned} {\dot{\boldsymbol{v}}} ^\prime&= \begin{bmatrix} 0\\[0.3cm]-\dfrac{1}{m_1}\\[0.3cm]0 \end{bmatrix} F + \begin{bmatrix} -\dfrac{m_3\,F_{\text{SD,1}}\,\sin^2{{\alpha}} + m_2\,F_{\text{SD,2}}\,\cos{{\alpha}} }{m_3 \big(m_2 + m_3\, \sin^2{{\alpha}} \big)} \\[0.5cm] \dfrac{F_{\text{SD,2}}\,\cos{{\alpha}} }{m_2 + m_3 \sin^2{{\alpha}} } - \dfrac{\,F_{\text{SD,1}}\,(m_1 + m_2 + m_3 \sin^2{{\alpha}} )}{m_1\,\big(m_2 + m_3 \sin^2{{\alpha}} \big)} \\[0.5cm] \dfrac{F_{\text{SD,1}}\,\cos{{\alpha}} }{m_2 + m_3 \sin^2{{\alpha}} } - \dfrac{(m_2 + m_3)\,F_{\text{SD,2}}}{m_3 \big(m_2 + m_3\sin^2{{\alpha}} \big)} \end{bmatrix} {}\,, \end{aligned} $$
(4.28)

with the abbreviations

$$\displaystyle \begin{aligned} F_{\text{SD,1}} &= d_1 \, \dot{s}_1 + k_1\, s_1 \end{aligned} $$
(4.29)
$$\displaystyle \begin{aligned} F_{\text{SD,2}} &= d_2 \,\dot{s}_2 + k_2 \,s_2 \,.\end{aligned} $$
(4.30)

From these equations, the system properties such as internal dynamics and the relative degree are analyzed in the following for three cases of angles α. Case 1 describes the configuration in which α = 90, while case 2 covers 0 < α < 90 and case 3 stands for α = 0.

Case 1

The angle of the inclined plane is set to α = 90. In this case, the dynamics of body 3 is entirely decoupled from the motion of bodies 1 and 2 and the output reduces to z = x 1 + s 1. The dynamics of body 3 cannot be seen from the output and is thus internal dynamics. The motion of bodies 1 and 2 is equivalent to the motion of a 2-mass-spring-damper chain. From analysis of Eq. (4.28), a relationship between input F and output z is sought. Analyzing the second part of Eq. (4.28) shows that the input F is a function of \(\ddot {s}_1\)

$$\displaystyle \begin{aligned} F &= -m_1 \ddot{s}_1 - \dfrac{m_1+m_2+m_3}{m_2+m_3}\,F_{\text{SD,1}}\,, {} \end{aligned} $$
(4.31)

where α = 90 is substituted. From the first part of Eq. (4.28) follows that \(\dot {s}_1\) is a function of \(\ddot {z}\), which can be differentiated once. Thus, the third derivative of the output z... influences the input F and the system is of relative degree r = 3.

According to Eq. (3.12), the dimension of the internal dynamics is therefore 3. The states of the internal dynamics are the state s 1 of the first order dynamics of body 2 and the states \(\left [ s_2 ~~ \dot {s}_2\right ]^{\text{T}} \) of the second order dynamics for body 3, collected in \({{{\boldsymbol {\eta }} }=\left [ s_1 ~~ s_2 ~~ \dot {s}_2\right ]^{\text{T}}}\). Reordering the first and third equation of Eq. (4.28), yields the internal dynamics

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\dot{\boldsymbol{\eta}}} &= \begin{bmatrix} -\dfrac{k_1}{d_1}s_1 -\dfrac{m_2 + m_3}{d_1}\ddot{z} \\[0.2cm] \dot{s}_2 \\[0.2cm] -\dfrac{d_2 \dot{s}_2 + k_2 s_2}{m_3} \end{bmatrix} = \underbrace{ \begin{bmatrix} -\dfrac{k_1}{d_1}& 0& 0\\[0.15cm] 0&0&1\\[0.15cm] 0&-\dfrac{k_2}{m_3}&-\dfrac{d_2}{m_3} \end{bmatrix}} _{{{\boldsymbol{A}} _{\text{1}}}} {\boldsymbol{\eta}} + {\boldsymbol{f}} ({\ddot{z}}) \;. \end{aligned} $$
(4.32)

Note that the dependence on the second derivative of the output z is collected in the function \({\boldsymbol {f}} (\ddot {z})\). Stability of the free internal dynamics is analyzed as zero dynamics with \(\ddot {z}=\dot {z}=z=0~\forall ~ t\), such that \({\boldsymbol {f}} (\ddot {z})=\boldsymbol {0}\). Thus, the zero dynamics is linear and stability is read off the eigenvalues \({\boldsymbol {\lambda }} _{\text{A}_1}\) of the matrix A 1. The eigenvalues

$$\displaystyle \begin{aligned} {\boldsymbol{\lambda}} _{\text{A}_1} &= \begin{bmatrix} -\dfrac{k_1}{d_1} \\[0.5cm] -\dfrac{d_2 + \sqrt{d_2^2-4k_2m_3 }}{2 \, m_3 } \\[0.5cm] -\dfrac{d_2 - \sqrt{d_2^2-4k_2m_3 }}{2 \, m_3 } \\[0.5cm] \end{bmatrix} \; {} \end{aligned} $$
(4.33)

have negative real parts for all d i > 0 Nsm−1 and thus the zero dynamics is asymptotically stable. The first eigenvalue is also reflected in the transfer function of the model dynamics

$$\displaystyle \begin{aligned} G(s) = \dfrac{k_1 + d_1 s}{a_4\,s^4 + a_3\,s^3 + a_2\,s^2 } \,, \end{aligned} $$
(4.34)

with the polynomial coefficients

$$\displaystyle \begin{aligned} a_4 &= m_1 m_2 + m_1 m_3 \\ a_3 &= d_1 m_1 + d_1 m_2 + d_1 m_3 \\ a_2 &= k_1 m_1+ k_1 m_2 + k_1 m_3 \,. \end{aligned} $$

Note that due to complete decoupling the dynamics of mass 3 cannot be seen from the transfer function G(s). The relative degree r = 3 is represented as the pole excess of 4 poles versus 1 transmission zero of the transfer function.

For neglectable damping, d i = 0 Nsm−1, the undamped dynamics of body 3 is still decoupled and of second order. However, the first part of Eq. (4.28) reduces to the algebraic relationship

$$\displaystyle \begin{aligned} s_1 &= -\dfrac{m_2+m_3}{k_1} \, \ddot{z} \end{aligned} $$
(4.35)

between the variable s 1 and the second derivative of the output \(\ddot {z}\), while Eq. (4.31) still holds. Therefore, the dynamics of bodies 1 and 2 have now relative degree r = 4. The internal dynamics is only the second order dynamics of body 3.

Case 2

For the general case of 0 < α < 90, the motion of body 3 and bodies 1 and 2 is coupled. Again, the relationship between input and output is analyzed with Eq. (4.28). The second part shows again the relationship \(F=F(\ddot {s}_1)\) and from the first part follows that the coordinate \(\dot {s}_1\) is a function of the second derivative \(\ddot {z}\). However, this time the dynamics of s 1 and s 2 are coupled, so that \(\dot {s}_1=\dot {s}_1(\ddot {z},\dot {s}_2,s_2)\). Once more, the input F is a function of z... and the relative degree is r = 3. The internal dynamics must therefore have 3 states. Similar to case 1, the states of the internal dynamics are \({{\boldsymbol {\eta }} =\left [ s_1 ~~ s_2 ~~ \dot {s}_2\right ]^{\text{T}}}\). Once more reordering the first and third part of Eq. (4.28) highlights the internal dynamics

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\dot{\boldsymbol{\eta}}} &= \begin{bmatrix} -\dfrac{m_2F_{\text{SD,2}}\cos\alpha }{d_1 \, m_3 \sin^2{{\alpha}} }-\dfrac{k_1 }{d_1}s_1 + \left( -\dfrac{m_3}{d_1}-\dfrac{m_2 }{d_1 \sin^2{{\alpha}} } \right)\ddot{z} \\[0.2cm] \dot{s}_2 \\[0.2cm] -\dfrac{F_{\text{SD,2}}}{m_3 \sin^2{{\alpha}} }-\dfrac{\cos\alpha}{ \sin^2{{\alpha}} }\,\ddot{z} \end{bmatrix} {} \end{aligned} $$
(4.36)
$$\displaystyle \begin{aligned} &= \underbrace{\setlength\arraycolsep{8pt} \begin{bmatrix} -\dfrac{k_1}{d_1}& -\dfrac{k_2\, m_2 \cos\alpha}{d_1\, m_3 \sin^2\alpha}& -\dfrac{d_2\, m_2 \cos{{\alpha}} }{d_1\, m_3 \sin^2\alpha}\\[0.5cm] 0&0&1\\[0.2cm] 0&-\dfrac{k_2}{m_3 \sin^2\alpha}&-\dfrac{d_2}{m_3 \sin^2\alpha} \end{bmatrix}}_ { {{\boldsymbol{A}} _2} } {\boldsymbol{\eta}} + {\boldsymbol{f}} ({\ddot{z}}) \;, {} \end{aligned} $$
(4.37)

which are again driven by the second order derivative \(\ddot {z}\). For the zero dynamics, it is \({\ddot {z}=\dot {z}=z=0}\) and thus \({{\boldsymbol {f}} ({\ddot {z}})=\boldsymbol {0}}\). The eigenvalues \({\boldsymbol {\lambda }} _{\text{A}_2}\) of the state space matrix A 2 are again analyzed for stability and arise as

$$\displaystyle \begin{aligned} \renewcommand*{\arraystretch}{1.5} {\boldsymbol{\lambda}} _{\text{A}_2} &= \begin{bmatrix} -\dfrac{k_1}{d_1} \\[0.5cm] -\dfrac{d_2 + \sqrt{d_2^2-4k_2m_3 \sin^2\alpha}}{2 \, m_3 \sin^2\alpha} \\[0.5cm] -\dfrac{d_2 - \sqrt{d_2^2-4k_2m_3 \sin^2\alpha}}{2 \, m_3 \sin^2\alpha} \\[0.5cm] \end{bmatrix} \;. {} \end{aligned} $$
(4.38)
Table 3 Overview of parameters for extended mass-on-car system

They have negative real parts for all d i > 0 Nsm−1 and all angles α > 0 and are visualized in the root locus plot in Fig. 8. The system is analyzed with the parameters shown in Table 3. While the first eigenvalue is constant at \({\lambda _{\text{A}_2,1}=-\frac {k_1}{d_1}}\), the other two eigenvalues \(\lambda _{\text{A}_2,2}\) and \(\lambda _{\text{A}_2,3}\) can be interpreted of describing the dynamics of a 2-mass oscillator. Its dynamics changes depending on the damping parameter d 2. The system is lightly damped for \(d_2<2\sqrt {k_2\,m_3}\sin \alpha =\hat {d}_2\) and the eigenvalues are complex conjugates. The value \(d_2=\hat {d}_2\) describes the limit case for light damping and for larger damping parameters d 2, the 2-mass oscillator is strongly damped as the eigenvalues \(\lambda _{\text{A}_2,2}\) and \(\lambda _{\text{A}_2,3}\) become real. This change of behavior is reflected in Fig. 8 at the value \(\hat {\alpha } = \arcsin \left (\frac {d_2}{2\sqrt {k_2\,m_3}}\right )\). For the limits α → 0 and α → 90, the eigenvalues tend to

$$\displaystyle \begin{aligned} \lim\limits_{\alpha \rightarrow 0}{\lambda_{\text{A}_2,2}} &= -\infty \end{aligned} $$
(4.39)
$$\displaystyle \begin{aligned} \lim\limits_{\alpha \rightarrow 0}{\lambda_{\text{A}_2,3}} &= -\dfrac{k_2}{d_2} \end{aligned} $$
(4.40)
$$\displaystyle \begin{aligned} \lim\limits_{\alpha \rightarrow 90^\circ}{\lambda_{\text{A}_2,2}} &= -\dfrac{d_2+\sqrt{d_2^2-4k_2m_3}}{2m_3} \end{aligned} $$
(4.41)
$$\displaystyle \begin{aligned} \lim\limits_{\alpha \rightarrow 90^\circ}{\lambda_{\text{A}_2,3}} &=-\dfrac{d_2-\sqrt{d_2^2-4k_2m_3}}{2m_3} \end{aligned} $$
(4.42)

respectively. Note that the limit \(\lim \limits _{\alpha \rightarrow 0}{\lambda _{\text{A}_2,3}}\) is obtained from Eq. (4.38) and applying the rule of L’Hospital twice. Case 1 is obtained in the limit α → 90. This shows that, depending on the angle α, the characteristic behavior of the internal dynamics might be fundamentally different.

Fig. 8
figure 8

Eigenvalues \({ \boldsymbol {\lambda }} _{\text{A}_2}\) of the extended mass-on-car system in configuration case 2 where 0 < α < 90

For the system in the same configuration without damping, d i = 0 Nsm−1, the differential equation for \(\dot {s}_1\) from the first part of Eq. (4.28) reduces to the algebraic relation

$$\displaystyle \begin{aligned} s_1 &= -\dfrac{m_2+m_3\,\sin^2{{\alpha}} }{k_1 \sin^2 {{\alpha}} } \,\ddot{z} - \dfrac{k_2 m_2 \cos{{\alpha}} }{k_1 m_3 \sin^2{{\alpha}} } \, s_2 \,. \end{aligned} $$
(4.43)

Thus, s 1 is a function of \(\ddot {z}\) and the system input then depends on z (4). Therefore, the system with 0 < α < 90 and no damping d i = 0 Nsm−1 has relative degree r = 4. This is also reflected in the eigenvalues. Due to the algebraic relation for s 1, the dimension of the internal dynamics is only 2 and thus the eigenvalues associated with the coordinate s 1 vanish. The two remaining eigenvalues stay on the imaginary axis, see Fig. 8.

The numerical solution of the extended mass-on-car system for case 2 with damping d i > 0 Nsm−1 and an angle α = 45 is presented in the following. The desired output trajectory z d(t) is shown in Fig. 9 from z d(0) = 1 m to z d(t f) = 4 m with t f = 15 s. Solving the servo-constraints problem given by Eqs. (4.22), (4.23) and (4.25) yields the desired control inputs u d(t) which are shown in Fig. 9. The solution was calculated using an implicit Euler scheme with time step size Δt = 0.01 s and a maximum number of 10 iterations in the Newton scheme to ensure real-time capability. Note that during the calculations, the convergence criterion was fulfilled before the maximum amount of iterations was reached.

Fig. 9
figure 9

Numerical results for the extended mass-on-car system in case 2 with angle α = 45 and time step size Δt = 0.01 s

In order to verify the accuracy of the solution, the system is afterwards simulated with the desired control inputs u d and the simulated system output is also shown in Fig. 9. As there are no disturbances and no initial errors in the simulation, the simulated system output is identical to the desired one. The system features internal dynamics, which are integrated over time by the DAE solver. Due to the coordinate transformation, it was possible to obtain an ODE formulation of the internal dynamics, given by Eq. (4.37). In order to evaluate the solution, the internal dynamics computed by the inverse model given by Eqs. (4.22), (4.23) and (4.25) is compared to the respective ODE solution which is integrated with a Runge-Kutta 45 scheme in Matlab as a reference. Both lead to similar results as shown in Fig. 10 for a step size of Δt = 0.01 s. In order to demonstrate significant integration errors of the simple Euler scheme with a larger step size, Fig. 11 shows the same comparison of the internal dynamics. In this case the inverse model solution was obtained with a step size Δt = 0.1 s. This leads to notable integration errors.

Fig. 10
figure 10

Internal states s 1 and s 2 for case 2 with angle α = 45 and step size Δt = 0.01 s for the inverse model solution as well as reference ODE solution

Fig. 11
figure 11

Internal states s 1 and s 2 for case 2 with angle α = 45 and step size Δt = 0.1 s for the inverse model solution as well as reference ODE solution

Case 3

For angle α = 0, the system reduces to a free 3-mass-spring-damper chain. In this case, Eq. (4.28) reduces to

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{v}}} ^{\prime} &= \begin{bmatrix}0\\[0.7cm] -\dfrac{1}{m_1}\\[0.7cm] 0 \end{bmatrix} F + \begin{bmatrix} -\dfrac{ F_{\text{SD,2}}}{m_3}\\[0.4cm] \dfrac{ F_{\text{SD,2}}}{m_2} - \dfrac{m_1 + m_2}{m_1 \,m_2}\, F_{\text{SD,1}} \\[0.4cm] \dfrac{ F_{\text{SD,1}}}{m_2} - \dfrac{m_2 + m_3}{m_2\,m_3}\,F_{\text{SD,2}} \end{bmatrix} \,. {} \end{aligned} $$
(4.44)

These equations are again analyzed to find the relation between input F and output z. From the second part follows that input F depends on \(\ddot {s}_1\) with

$$\displaystyle \begin{aligned} F &= -m_1\,\ddot{s}_1 + \dfrac{m_1}{m_2}\,F_{\text{SD,2}} - \dfrac{m_1+m_2}{m_2}\, F_{\text{SD,1}}\,. \end{aligned} $$
(4.45)

From the third part follows the coordinate \(\dot {s}_1\) as a function of \(\ddot {s}_2\). With the relationship \(\dot {s}_2=\dot {s}_2(\ddot {z})\) from the first equation follows that the input F is a function of the fourth derivative of the output and hence the system has relative degree r = 4. Thus, there remain two internal dynamics states. Reordering and transforming the first and third part of Eq. (4.44) yields

$$\displaystyle \begin{aligned} \dot{s}_2 &= -\dfrac{1}{d_2} \, \left( m_3\,\ddot{z} + k_2\,s_2 \right) {} \end{aligned} $$
(4.46)
$$\displaystyle \begin{aligned} \ddot{s}_2 &=- F_{\text{SD,2}}\,\left(\dfrac{1}{m_2}+\dfrac{1}{m_3}\right) +\dfrac{1}{m_2} F_{\text{SD,1}} {} \,. \end{aligned} $$
(4.47)

From Eq. (4.47) follows a differential equation for \(\dot {s}_1\), where \(\ddot {s}_2\) and \(\dot {s}_2\) are substituted from Eq. (4.46) and its derivative. Then, the internal dynamics in the states \({\boldsymbol {\eta }} {=}\left [ s_1 ~~ {s_2}\right ]^{\text{T}} \) is

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\dot{\boldsymbol{\eta}}} = \underbrace{ \begin{bmatrix} -\dfrac{k_1}{d_1} & \dfrac{k_2^2\,m_2}{d_1\,d_2^2} \\[0.45cm] 0 & -\dfrac{k_2}{d_2} \end{bmatrix}}_{ {{\boldsymbol{A}} _3} } {\boldsymbol{\eta}} + {\boldsymbol{f}} (\dddot{z}) \,, \end{aligned} $$
(4.48)

which is driven by the third derivative z.... The zero dynamics is obtained by setting \({\dddot {z}=\ddot {z}=\dot {z}=z=0}\) and therefore f(z...) = 0. The eigenvalues \({\boldsymbol {\lambda }} _{\text{A}_3}\) of the zero dynamics are read off the main diagonal to have negative real parts for all d i > 0 Nsm−1. The equivalent transfer function of the system dynamics reads

$$\displaystyle \begin{aligned} G(s) &= \dfrac{(k_1 + d_1\,s)\,(k_2 + d_2\,s)}{a_6\,s^6+a_5\,s^5+a_4\,s^4+a_3\,s^3+a_2\,s^2} \end{aligned} $$
(4.49)

with the coefficients

$$\displaystyle \begin{aligned} a_6 &= m_1\,m_2\,m_3 \\ a_5 &= d_1\,m_1\,m_3 + d_2\,m_1\,m_2 + d_1\,m_2\,m_3 + d_2\,m_1\,m_3 \\ a_4 &= d_1\,d_2\,m_1 + d_1\,d_2\,m_2 + d_1\,d_2\,m_3 + k_1\,m_1\,m_3 + k_2\,m_1\,m_2\\ &~~~+ k_1\,m_2\,m_3 + k_2\,m_1\,m_3 \\ a_3 &= d_1\,k_2\,m_1 + d_2\,k_1\,m_1 + d_1\,k_2\,m_2 + d_2\,k_1\,m_2 + d_1\,k_2\,m_3 + d_2\,k_1\,m_3 \\ a_2 &= k_1\,k_2\,m_1 + k_1\,k_2\,m_2 + k_1\,k_2\,m_3 \,. \end{aligned} $$

Stability of the zero dynamics is reflected by the transmission zeros of the transfer function G(s) which are in the left half plane. Moreover, the transfer function has a pole excess of 4, which corresponds to relative degree r = 4.

Without damping, the internal dynamics vanishes completely and thus the relative degree is r = 6. The system is then differentially flat and the system input depends on z (6). The analytic inverse model can be extracted by reordering Eq. (4.44). The system coordinates y are functions of the output z and a finite number of derivatives, such that

$$\displaystyle \begin{aligned} x_1 &= z-s_1-s_2 \end{aligned} $$
(4.50)
$$\displaystyle \begin{aligned} s_1 &= \dfrac{m_2}{k_1}\left( -\dfrac{m_3}{k_2}\,z^{(4)} + \dfrac{m_2+m_3}{m_2\,m_3}\,k_2\,s_2 \right) \end{aligned} $$
(4.51)
$$\displaystyle \begin{aligned} s_2 &= -\dfrac{m_3}{k_2}\,\ddot{z} \end{aligned} $$
(4.52)

and the input F is a function of the coordinates and the inputs

$$\displaystyle \begin{aligned} F &= \dfrac{m_1\,k_2}{m_2}s_2 - \dfrac{m_1+m_2}{m_2}\,k_1\,s_1 - m_1\,\ddot{s}_1 \,. {} \end{aligned} $$
(4.53)

Substituting all information in Eq. (4.53) shows the relation \(F=F\left (z^{(6)}\right )\).

The different phenomena of the extended mass-on-car system are summarized in Table 4. It is again noted that the differentiation index of the corresponding servo-constraint problem is larger by one than the relative degree of the system.

Table 4 Overview of different extended mass-on-car configurations

4.3 Mass-Spring-Damper Chain

A mass-spring-damper chain is a generalization of the mass-on-car system with α = 0 and an additional spring-damper pair that connects the first body to a wall. It is a popular example and also analyzed in the context of servo-constraints in e.g. [1, 18] and [28]. The mass-spring-damper chain has several properties, which turn it into a suitable example to analyze the servo-constraints approach. First of all, the system is linear in case of linear spring-damper combinations so that a linear reference analysis is possible. For the case of neglectable damping, the model is differentially flat. Thus, there is an analytic reference solution suitable for comparison and convergence studies. Moreover, its relative degree changes with the number of masses.

Let the chain have f masses and the position coordinates x 1, …x f, as shown in Fig. 12. The masses are connected by linear spring-damper combinations with coefficients k i and d i respectively. It is a SISO system, where the output is the position x 1 of the first mass and the input is the force F applied on the last mass. It has f degrees of freedom and is underactuated for f > 1. The chain with translational degrees of freedom is equivalent to systems with torsional degrees of freedom such as a drive train.

Fig. 12
figure 12

Mass-spring-damper chain with f masses

The dynamics of a general damped system with f masses and linear spring-damper combinations is of the linear ODE form

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{y}}} &= {\boldsymbol{v}} {} \end{aligned} $$
(4.54)
$$\displaystyle \begin{aligned} {\boldsymbol{M}} {\dot{\boldsymbol{v}}} + {\boldsymbol{D}} {\boldsymbol{v}} + {\boldsymbol{K}} {\boldsymbol{y}} &= {\boldsymbol{B}} F \,, {} \end{aligned} $$
(4.55)

with the mass matrix M, the damping matrix D, the stiffness matrix K, the input distribution matrix B and the generalized coordinate vector

(4.56)

The dynamics matrices arise as

$$\displaystyle \begin{aligned} {\boldsymbol{M}} &= \begin{bmatrix} m_1&0&&&\\ 0&m_2&0&& \\ &\ddots&\ddots&\ddots&\\ & & & m_{f-1}& 0\\ & && 0&m_f \end{bmatrix} \end{aligned} $$
(4.57)
$$\displaystyle \begin{aligned} {\boldsymbol{D}} &= \begin{bmatrix} d_1+d_2&-d_2&0&&\\ -d_2&d_2+d_3&-d_3&&\\ & \ddots & \ddots & \ddots&\\ & & -d_{f-1}&d_{f-1}+d_f &-d_f\\ && & -d_f&d_f \end{bmatrix} \end{aligned} $$
(4.58)
$$\displaystyle \begin{aligned} {\boldsymbol{K}} &= \begin{bmatrix} k_1+k_2&-k_2&0&&\\ -k_2&k_2+k_3&-k_3&&\\ & \ddots & \ddots & \ddots&\\ & & -k_{f-1}&k_{f-1}+k_f &-k_f\\ && & -k_f&k_f \end{bmatrix} \end{aligned} $$
(4.59)
$$\displaystyle \begin{aligned} {\boldsymbol{B}} &= \begin{bmatrix} 0\\0\\ \vdots\\ 0\\1 \end{bmatrix} \,, \end{aligned} $$
(4.60)

with the respective linear spring and damper coefficients k i and d i and masses m i. The scalar system output z is the position of mass 1, such that

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} z &= \begin{bmatrix} 1&0&\dots&0&0 \end{bmatrix} {\boldsymbol{y}} = x_1 \,. \end{aligned} $$
(4.61)

Together with the servo-constraint

$$\displaystyle \begin{aligned} c({\boldsymbol{y}},t) = x_1 - z_{\text{d}}=0 \,, {} \end{aligned} $$
(4.62)

Eqs. (4.54) and (4.55) form the inverse model. Note that in contrast to the formulation of the mass-on-car system, the positions of all masses are here defined by absolute coordinates. Thus, the system output z does not depend on the actuated coordinate x f and the coordinate transformation as proposed in Sect. 3.2.2 is not applicable directly. Beforehand, a coordinate transformation to the relative coordinates s i used in the previous example would be necessary. Then, the internal dynamics can again be derived in ODE form. On the other hand, absolute positions are useful in deriving the analytical solution to the inverse model and are hence pursued here. Defining the state vector

$$\displaystyle \begin{aligned} {\boldsymbol{x}} = \begin{bmatrix} {\boldsymbol{y}} \\ {\boldsymbol{v}} \end{bmatrix} \,, \end{aligned} $$
(4.63)

the linear state space equations are

$$\displaystyle \begin{aligned} {\dot{\boldsymbol{x}}} &= \underbrace{\begin{bmatrix} \boldsymbol{0} & {\boldsymbol{I}} \\[0.2cm] -{\boldsymbol{M}} ^{-1}{\boldsymbol{K}} & -{\boldsymbol{M}} ^{-1}{\boldsymbol{D}} \end{bmatrix}}_{ { {\boldsymbol{A}} } } {\boldsymbol{x}} + \underbrace{ \begin{bmatrix} \boldsymbol{0}\\[0.2cm] {\boldsymbol{M}} ^{-1}{\boldsymbol{B}} \end{bmatrix}}_{ {{\boldsymbol{b}} } } u \end{aligned} $$
(4.64)
$$\displaystyle \begin{aligned} z &= \underbrace{\begin{bmatrix} 1&0&\dots&0&0 \end{bmatrix}}_{ {{\boldsymbol{C}} } } {\boldsymbol{x}} + \underbrace{0}_{ {d} } u \,. \end{aligned} $$
(4.65)

The linear state space equations are transformed to a transfer function G(s) by Eq. (3.13) and linear analysis is performed as a reference. In general, from the transfer function analysis is inferred that for an undamped chain with f masses, the relative degree is r = 2f and there is no internal dynamics. Thus, the differentiation index of the undamped inverse model DAE also changes with the number of masses and is 2f + 1. For every additional damper with d i ≠ 0 for i = 2, …f, the numerator polynomial includes the multiplier term (k i + d i s). Therefore, for a system with a number of n d dampers d i ≠ 0 for i = 2, …f, the relative degree is r = 2f − n d. The existence of the damper d 1 does not influence the relative degree of the system, because this damper is not located between input F and output z = x 1. Accordingly, a fully damped system features internal dynamics and its relative degree is r = 2f − (f − 1) = f + 1. The internal dynamics is of first order and the total number of internal dynamics states is f − 1.

This is demonstrated for the case of f = 2 masses with the dynamic equations

$$\displaystyle \begin{aligned} \begin{bmatrix} m_1&0\\0&m_2\end{bmatrix} \begin{bmatrix} \ddot{x}_1\\ \ddot{x}_2 \end{bmatrix}+ \begin{bmatrix} d_1+d_2&-d_2\\ -d_2&d_2\\ \end{bmatrix} \begin{bmatrix} \dot{x}_1\\ \dot{x}_2\end{bmatrix} + \begin{bmatrix} k_1+k_2&-k_2\\ -k_2&k_2\\ \end{bmatrix} \begin{bmatrix} {x}_1\\{x}_2\end{bmatrix} &= \begin{bmatrix} 0\\1 \end{bmatrix}F \end{aligned} $$
(4.66)
$$\displaystyle \begin{aligned} z &= \begin{bmatrix} 1&0 \end{bmatrix} \begin{bmatrix} {x}_1\\{x}_2 \end{bmatrix} {} \,. \end{aligned} $$
(4.67)

Applying Eq. (3.13), the transfer function reads for f = 2

$$\displaystyle \begin{aligned} G(s) &= \dfrac{k_2+d_2s}{a_4\, s^4 +a_2\,s^3+ a_2\,s^2 + a_1\,s+a_0}\,, \end{aligned} $$
(4.68)

with

$$\displaystyle \begin{aligned} a_4 &= m_1\,m_2 \\ a_3 &= m_1\,d_2 + m_2\,d_1 + m_2\,d_2 \\ a_2 &= m_1\,k_2 + m_2\,k_1 + m_2\,k_2 + d_1\,d_2\\ a_1 &= d_1\,k_2 + d_2\,k_1 \\ a_0 &= k_1\,k_2 \,. \end{aligned} $$

The transfer function G(s) has one transmission zero and 4 poles, which is a pole excess of 3. This corresponds to a relative degree r = 3. For neglectable damping d i = 0 Nsm−1, the transfer function reduces to

$$\displaystyle \begin{aligned} G(s) &= \dfrac{k_2}{ m_1\,m_2\,s^4 + \left(m_1\,k_2 + m_2\,k_1 + m_2\,k_2 \right)s^2 +k_1\,k_2}\,, \end{aligned} $$
(4.69)

which shows a pole excess of 4, corresponding to a relative degree r = 4. There remains no internal dynamics. In fact, an analytical solution for the inverse model is derived in the following. This is shown for f = 2 masses and can be automated for any f masses. Differentiating the output equation (4.67) twice yields

$$\displaystyle \begin{aligned} \ddot{z} = \ddot{x}_1 = \dfrac{1}{m_1} \Big( -(k_1+k_2)\;x_1 + k_2\;x_2\Big)\,, {} \end{aligned} $$
(4.70)

which is reordered for an expression for the position of the last mass

$$\displaystyle \begin{aligned} x_2({x}_1,\ddot{z}) = \dfrac{1}{k_2}\Big( m_1\ddot{z}+(k_1+k_2)\,x_1\Big) \;.{} \end{aligned} $$
(4.71)

Differentiating equation (4.70) two more times shows the relation between input F and the fourth derivative of the output z

$$\displaystyle \begin{aligned} z^{(4)} = {x}_1^{(4)} &= \dfrac{1}{m_1} \Big( -(k_1+k_2)\;\ddot{x}_1 + k_2\;\ddot{x}_2\Big) \end{aligned} $$
(4.72)
$$\displaystyle \begin{aligned} &= \dfrac{1}{m_1} \left( -(k_1+k_2)\;\ddot{x}_1 + \dfrac{k_2}{m_2}\;\left(F+ k_2\;x_1-k_2\;x_2 \right) \right) \,,\end{aligned} $$
(4.73)

where x 2 can be substituted by Eq. (4.71). Solving for F gives the analytic solution

$$\displaystyle \begin{aligned} F_{\text{exact}} = \dfrac{m_1\,m_2}{k_2}\,z^{(4)} + \dfrac{\left( k_1+k_2\right)\, m_2}{k_2} \,\ddot{x}_1 - k_2\left(x_1-x_2\right) {}\end{aligned} $$
(4.74)

for the inverse model and shows that the input F is a function of the output z = x 1 and four derivatives of z. Thus, the system is differentially flat and has relative degree r = 4. This procedure of differentiating the output z can be repeated for f masses until the input F appears.

The analytical solution for the inverse model, given by Eq. (4.74) for 2 masses and respective equations for additional masses, is used for convergence studies of the undamped servo-constraints inverse model. The simulation parameters are shown in Table 5. It is assumed that all masses, spring and damper coefficients are equal, m i = m, k i = k, d i = d.

Table 5 Overview of parameters of mass-spring-damper chain

The desired path z d from z d(0) = 0 m to z d(t f) = 2 m is shown in Fig. 13, where the transition time is t f = 15 s. The inverse model DAE is solved by the implicit Euler method with Δt = 0.01 s. The computed coordinates and input are shown in Fig. 13. Due to equal masses and springs, the mass m 2 travels twice the distance of mass m 1.

Fig. 13
figure 13

Numerical results for a 2-mass-spring-damper combination without damping with Δt = 0.01 s

The first order convergence of the implicit Euler scheme is verified by the analytical solution of Eq. (4.74) and solving the inverse model with different times steps Δt. The maximum error is calculated according to Eq. (4.20). The inverse model is solved in the original formulation given by Eqs. (4.54), (4.55) and (4.62) and the projected formulation obtained by applying Eqs. (3.16)–(3.19). The original and projected formulations are referenced by indices orig and proj respectively. Note that similar to the substitution process presented in Sect. 3.2.3, the system output z is simply one of the coordinates y. Thus, the servo-constraint Eq. (4.62) and its derivatives are substituted in the dynamic equations (4.54) and (4.55) as proposed in Sect. 3.2.3 for redundant coordinates. This reduces the differentiation index by 2. The substituted and reduced equations for f = 2 read

$$\displaystyle \begin{aligned} \begin{bmatrix} m_1&0\\0&m_2\end{bmatrix} \begin{bmatrix} \ddot{z}_{\text{d}}\\ \ddot{x}_2 \end{bmatrix}{+} \begin{bmatrix} d_1+d_2&-d_2\\ -d_2&d_2\\ \end{bmatrix} \begin{bmatrix} \dot{z}_{\text{d}}\\ \dot{x}_2\end{bmatrix} + \begin{bmatrix} k_1+k_2&-k_2\\ -k_2&k_2\\ \end{bmatrix} \begin{bmatrix} {z}_{\text{d}}\\{x}_2\end{bmatrix} &{=} \begin{bmatrix} 0\\1 \end{bmatrix}F , \end{aligned} $$
(4.75)

and respectively for more than 2 masses. Note that the servo-constraint Eq. (4.62) is dropped due to substitution. This approach is referenced by the index subs and compared to the projected and original solutions. The model is solved for a number of f = 2, 3 and 4 masses. Therefore, the original inverse model DAE has a differentiation index of 5, 7 and 9 respectively.

The convergence diagram in Fig. 14 shows the first order convergence behavior. Note that the substitution and projection approach yield similar results for f = 2, 3 and 4 masses. Both the projection and substitution approach yield numerically more stable results than the original models, respectively for each tested number of masses. This is due to index reduction. Considering more masses makes the numerical solution less stable, respectively for each inverse model formulation. This is due to a higher differentiation index of a mass-spring chain with more masses. The presented implementation with an implicit Euler scheme is able to solve a model with f = 4 masses with a step size of Δt = 0.1 s resulting in a maximum error of e max ≈ 0.06 N. Better results with smaller step sizes are obtained by the projected and substituted versions respectively, when the original formulation is already unstable. For more than f = 4 masses, the numerical solution becomes unstable too quickly using the implicit Euler scheme.

Fig. 14
figure 14

Maximum error e max between numerical and analytical solution for an f-mass-spring-damper chain for different time step sizes Δt and various inverse model formulations

The numerical stability is also evaluated in terms of the resulting Jacobian matrix of the set of equations F from Eq. (3.32) that is solved with Newton’s method in each time step. The Jacobian matrix is derived symbolically offline and then evaluated in each time step to improve calculation speed. The Jacobian matrix for the f = 2 undamped system is for the original unprojected equations

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\boldsymbol{J}} _{\text{orig}} = \begin{bmatrix} \dfrac{1}{\varDelta t} & 0 & -1 & 0 & 0 \\[0.2cm] 0& \dfrac{1}{\varDelta t} & 0 & -1 & 0 \\[0.2cm] \dfrac{2k}{m} & -\dfrac{k}{m} & \dfrac{1}{\varDelta t} & 0& 0\\[0.2cm] -\dfrac{k}{m} & \dfrac{k}{m} & 0 & \dfrac{1}{\varDelta t} & -\dfrac{1}{m} \\[0.2cm] -1 & 0 & 0 & 0 & 0 \end{bmatrix} \,, \end{aligned} $$
(4.76)

for the projected equations

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\boldsymbol{J}} _{\text{proj}} = \begin{bmatrix} -\dfrac{1}{\varDelta t} & 0 & 1 & 0 & 0 \\[0.2cm] 0& -\dfrac{1}{\varDelta t} & 0 & 1 & 0 \\[0.2cm] k & -{k} & 0 & -\dfrac{m}{\varDelta t}& 1\\[0.2cm] -\dfrac{2k}{m} & \dfrac{k}{m} & 0 & 0 & 0 \\[0.2cm] -1 & 0 & 0 & 0 & 0 \end{bmatrix} \end{aligned} $$
(4.77)

and for the substituted equations

$$\displaystyle \begin{aligned} \setlength\arraycolsep{5pt} {\boldsymbol{J}} _{\text{subs}} = \begin{bmatrix} -\dfrac{1}{\varDelta t} & 1 & 0 \\[0.2cm] -k & 0 &0\\[0.2cm] k & \dfrac{m}{\varDelta t} &-1 \\[0.2cm] \end{bmatrix} \,. \end{aligned} $$
(4.78)

Note that due to substitution, the size of equations and unknowns reduces to 3. The condition number κ, defined as the ratio between largest and smallest singular value of the Jacobian J is evaluated for each solution and shown in Fig. 15. Large condition numbers indicate bad conditioning for solving the set of equations by Newton’s method. It can be read of Fig. 15 that the condition number increases for more masses and higher differentiation index and thus also supports the numerical instability due to rounding errors presented in Fig. 14. For a given step size, the condition numbers of the projected and substituted equations are smaller than the respective condition number of the original equations. Figure 15 also emphasizes that the condition number of the substituted system of equations behaves similar to the one of the projected equations with a small constant difference. The condition number can be used as an indicator for numerical solvability of the inverse model by means of servo-constraints.

Fig. 15
figure 15

Condition number κ of the respective Jacobians of f-mass-spring-damper chains for different time step sizes Δt and various inverse model formulations

4.4 Influence of Actuator Model on the DAE Index

Standard industrial actuators are usually velocity-controlled and not force-controlled as assumed in the previous examples. In a practical implementation, the system input is therefore usually a certain setpoint velocity instead of a force. This setpoint velocity is enforced by internal control loops of the actuators. The actuator dynamics is assumed to be much faster than the system dynamics. Thus, they are approximated by low order linear system dynamics, e.g. zero order, first order or second order system dynamics and the coefficients are fitted in system identification tests. Depending on what type of system order is assumed, the differentiation index of the arising inverse model DAE changes. This is demonstrated with a simple single mass system shown in Fig. 16. The scalar system input F is applied to a single mass m and the system output is its position x 1.

Fig. 16
figure 16

Single mass with either force input F or setpoint velocity input u s

For this system, the dynamic equations with a force-controlled actuator are

$$\displaystyle \begin{aligned} m\,\ddot{x}_1 &= F \end{aligned} $$
(4.79)
$$\displaystyle \begin{aligned} z &= x_1 \,, \end{aligned} $$
(4.80)

where the system input is modeled as the force F. In this case, the relative degree of the system is r = 2 and there are no internal dynamics. The differentiation index of the servo-constraints DAE system is 3 respectively.

Assuming a velocity-controlled actuator, let the setpoint input velocity u s be the system input instead of the input F. The velocity \(\dot {x}_1\) is then a rheonomic constraint on the model. Modeling the actuator dynamics as zero order, which is direct feedthrough, yields

$$\displaystyle \begin{aligned} \dot{x}_1 &= u_{\text{s}} \, \end{aligned} $$
(4.81)
$$\displaystyle \begin{aligned} z &= x_1 \,. \end{aligned} $$
(4.82)

In this system, the first derivative of the output z is necessary for calculating the input velocity u s. Therefore, the system has relative degree r = 1. For first order actuator dynamics holds

$$\displaystyle \begin{aligned} \tau \ddot{x}_1 &=-\dot{x}_1+ u_{\text{s}} \end{aligned} $$
(4.83)
$$\displaystyle \begin{aligned} z &= x_1 \,, \end{aligned} $$
(4.84)

with the time constant τ of the first order actuator model. Solving for the input yields

$$\displaystyle \begin{aligned} u_{\text{s}} &= \tau \ddot{x}_1 + \dot{x}_1 \, \end{aligned} $$
(4.85)
$$\displaystyle \begin{aligned} &= \tau \ddot{z} + \dot{z} \,, \end{aligned} $$
(4.86)

where the second derivative of the output z is necessary to calculate the control input. Therefore, the system has relative degree r = 2. The second order actuator dynamic equations are

$$\displaystyle \begin{aligned} K \omega_n^2 \,u_{\text{s}} &= \dddot{x}_1 + 2\zeta\omega_n\,\ddot{x}_1 + \omega_n^2\, \dot{x}_1 \,, \end{aligned} $$
(4.87)

with the static gain K, the natural frequency ω n and the damping ratio ζ. Again substituting the system output shows that the system in this configuration has relative degree r = 3. This example shows how modeling actuator dynamics influences the relative degree of a multibody system.

5 Conclusion

Servo-constraints are an efficient method in the context of open-loop control of underactuated multibody systems. They append the system dynamics and form a set of higher index DAEs, which can be solved numerically. The solution poses an inverse model for the underactuated multibody system, which is applicable for trajectory tracking controllers. A state feedback controller can be added for disturbance rejection which makes use of the desired state trajectory that is part of the inverse model solution.

Servo-constraints are closely related to classical geometric constraints. However, since the system input is not necessarily orthogonal to the tangent of the constraint manifold and might influence the output only indirectly, the differentiation index of the inverse model can be higher than three. The configuration is classified into orthogonal, mixed tangential-orthogonal and tangential realization, depending on how the input influences the system output.

In case the underactuated system is not differentially flat, there remains internal dynamics, which have to be accounted for. In that case, stability of the internal dynamics has to be investigated in terms of the stability of the zero dynamics.

The differentiation index of the arising set of DAEs can be reduced by index reduction methods such as the projection method. Moreover, a coordinate transformation and a reformulation of the original dynamics using redundant coordinates is useful for analysis of the servo-constraints problem. The inverse model DAEs are here solved using an implicit Euler scheme to ensure real-time capability.

Servo-constraints are applied on several examples. The example of a mass-on-car system is used to demonstrate the solution convergence of the inverse model solution, when using either minimal or redundant coordinates for modeling the system. Moreover, better convergence is possible when index reduction by projection is applied or the servo-constraints are directly substituted into the equations. This is possible when part of the coordinates directly forms the output. An extended version of the mass-on-car system illustrates how the coordinate transformation helps in extracting the internal dynamics in ODE form. Stability of the internal dynamics is analyzed based on the ODE formulation and the transfer function of the system. An f-mass-spring-damper chain shows that high index DAE problems arise even for simple multibody systems. Convergence of the original inverse model solution and index reduced formulations are compared. Finally, it is demonstrated how the choice of the actuator model can influence the differentiation index and relative degree of the inverse model.