Reduced-Order Observer Design for Robot Manipulators

—This paper investigates the design of reduced-order observers for robot manipulators. Observer stability conditions are obtained based on a Lyapunov analysis. The proposed observer is enhanced with a hybrid scheme that may adjust the gains to cope with possible unbounded velocities of the robot joints. Thanks to such hybrid strategy, the observer works accurately both for robots driven by open-loop controllers and by output feedback controllers. Numerical simulations illustrate the efﬁcacy of the reduced-order observer in several scenarios, including a comparison with the performance of a classical full-order observer.


I. INTRODUCTION
Robot manipulators are typically equipped with encoders mounted on the driving motors, which provide a direct measure of the joint (angular) positions. On the other hand, most control laws require also a velocity feedback in order to be executed. A rough knowledge of the joint velocity can be obtained by numerical differentiation of the position measures, but the risk of occurring in large errors due to noise is high. Implementing state observers using the available position measurements is usually a better option.
The literature on observer design for nonlinear control systems is fairly large and several approaches have been explored, see for instance [1], [2], [3], [4], [5], [6] and the references therein. A considerable number of studies are devoted to the specific problem of observer design for robot manipulators [7], [8], [9], [10], including also sliding mode observers [11], [12]. A common feature of such observers is that their design parameters depend, in one way or the other, on a bound on the maximum achievable velocity. Such a design weakness is somewhat mitigated by the fact that this bound can be enforced when the observer is used to implement feedback control laws for set-point regulation or trajectory tracking. Furthermore, most available observers for robot manipulators are full-order estimators (i.e., of dimension 2n if the robot has n joints), whereas the development of reduced-order schemes seems limited to a handful of papers, such as [13] which however still suffers from the requirement of a known velocity bound. Reduced-order observers are well recognized for having faster convergence rates and lower computational burden, as the only state variables to be estimated are the ones which are actually not measured.
In this paper, we propose the design of a reduced-order observer derived from the full-order structure of [8]. In addition, hinging on the powerful setup of hybrid systems [14], a scheduling strategy is introduced for the observer gain, which is automatically adjusted according to the actual velocity of the joints, thus removing the need for a global bound. The proposed observer works independently of any used open-or closed-loop control law, and performs efficiently even when the joint velocity possibly grows unbounded.
The paper is structured as follows. The robot dynamic model and the main assumptions are summarized in Sect. II. Section III is devoted to the observer design and to its stability analysis, whereas Section IV illustrates the enhancement of the observer with a switching scheme for the output injection gain. The efficiency of the reduced-order observer is showcased through several simulation examples in Sect. V. Concluding remarks are given in Sect. VII.

II. PRELIMINARIES ON ROBOT DYNAMICS
Consider a robotic manipulator with n rigid joints, described by the dynamic model [15] where q ∈ R n is the vector of joint positions andq ∈ R n is the vector of joint velocity. In the following, we assume that all robot joints are revolute. The symmetric inertia matrix M (q) is positive definite for any q ∈ R n and there exists positive definite constant matrices M 1 and M 2 ∈ R n×n with The term C(q,q)q encodes Coriolis and centrifugal torques, F is a viscous dissipation matrix, g(q) is the gravity torque, and τ ∈ R n is the input torque at the joints.
Assumption 1: The following conditions are fulfilled: • the angular position q is known; • the matrix C(q,q) in the factorization of the Coriolis and centrifugal terms is such thatṀ (q) − 2C(q,q) is skewsymmetric; • the matrix F is positive semi-definite, i.e., F 0. Some useful facts can be observed about the matrix C(q,q). For any y, u, w ∈ R n , the following identity holds Moreover, a bounded, nonnegative function 0 ≤ c 0 (q) ≤c 0 can be found with the property For the next developments, it is convenient to rewrite the second-order dynamics (1) as a first-order system with state x = (x 1 , x 2 ) = (q,q) ∈ R 2n and output y = x 1 : This article has been accepted for publication in IEEE Control Systems Letters. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/LCSYS.2022.3196432 III. REDUCED-ORDER OBSERVER Being x 1 available for direct measurement, the aim of this section is to design a reduced-order observer for system (5) providing an asymptotic estimate of the velocity x 2 . Consider a reduced-order observer with the following structure with the differentiable mapping k : R n → R n to be specified. Remark 1: In the case of a constant inertia matrix M , i.e., with C(q,q) ≡ 0, the observer (6) can be traced back to a classical reduced-order observer for a second-order linear system.
Adding and subtracting C(y,x 2 )x 2 , and then using the identity (3), the dynamics can be rearranged as Consider now the time-varying Lyapunov function candidate which is clearly positive definite due to the uniform bounds λ 1 ε 2 ≤ V (ε, t) ≤ λ 2 ε 2 provided by (2), where Evaluating the time derivative of (7) along the error system trajectory yieldṡ To proceed with the stability analysis, we need to select a suitable gain function k(y). The simplest yet effective strategy 1 is picking k(y) as a linear function k(y) = k 0 y with k 0 > 0. This leads to the simplification ∂k(y) ∂y = k 0 I n×n .
1 See Section VI for an overview of more advanced strategies.
Observing that C(y,x 2 ) = C(y, x 2 − ε), and that the bound C(y, r) ≤ c 0 (y) r holds true, a bound on the Lyapunov function derivative can be obtained as followṡ (10) Next assumption is made in order to eliminate the dependency on x 2 in the right-hand side.
Assumption 2: A known bound is available for the angular speed, i.e.
Thanks to such bound on the admissible angular velocity, we can infer the conditioṅ (11) that enables for the selection of the gain k 0 . Pick arbitrarily η > 0 and set Due to this choice, the right-hand side of (11) is negative as long as the error ε is such that Exploiting the bounds on the Lyapunov function, the error system turns out to be locally exponentially stable with region of attraction given by The above derivations lead to the following statement. Theorem 1: Consider the manipulator system (5). Let Assumptions 1 and 2 hold, and let η > 0 be fixed. Then the reduced-order observer (6) with linear gain function k(y) = k 0 y, where k 0 is assigned by (12), provides a locally exponentially stable estimation error ε = x 2 −x 2 with a region of attraction that contains the set E defined in (13).
Remark 2: It can be easily verified that, for any compact set K ⊂ E, the convergence rate of the estimation error is given by Remark 3: A simpler, but more conservative, selection for the output injection gain k 0 can be done by setting the latter being obtained by taking, separately, the upper and lower bounds respectively for c 0 (y) and λ min (M (y)). However, selecting a large k 0 may lead to undesired effects due to noisy measurements. Thus, in practice there is a tradeoff between stability properties and estimation performance. Remark 4: The conditions obtained for the reduced-order observer design, as well as the stability properties, are equivalent to those found for the full-order observer proposed in [8].
This article has been accepted for publication in IEEE Control Systems Letters. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/LCSYS.2022.3196432 IV. A SWITCHING LOGIC FOR GAIN SCHEDULING As shown in [8], when using the observer to implement an output feedback control with estimated velocities, the bound on the joint velocity can be automatically guaranteed. Conversely, when the observer is considered as a standalone, Assumption 2 is pivotal to guarantee negative definiteness of the Lyapunov function V (ε). In this section, a switching logic is proposed to bypass this issue and enable the observer to be locally asymptotically stable for arbitrary values of the joint velocity of the robot.
Pickingv > 0, let us consider the following decomposition of the velocity space R n : Clearly we haveD r ∩D = ∅ for any k = and The idea is to increase/decrease the observer gain when the value of velocityẋ drifts from one region to another. Increasing the gain allows to keep the negative sign in the Lyapunov conditionV (ε) < 0, while a decrease limits the use of unnecessary efforts and avoids possible side effects such as noise amplification. However, two obstacles prevent the aforementioned strategy to be implemented. The first issue is that, without any hysteresis logic, when the velocity lies too close to the boundary between two regions the gain might repeatedly switch, this providing chattering and deterioration of performances. The second and major problem is that we do not measure the velocity (the estimation of it being indeed our main goal), and thus we cannot have a direct knowledge of the index k describing the regionD r where the true velocity actually lies. Nevertheless, a modified and feasible strategy can be successfully implemented by making use of the structure of the region of attraction E in (13) for the error system and applying a bootstrap argument.
Observe that for initial conditions (x 2 (0) −x 2 (0)) ∈ E, as long as the Lyapunov function derivativeV (ε) is negative definite, the following estimate holds true We can use such lower and upper estimates to define suitable, and verifiable, switching conditions. With reference to Fig. 1, pickv > 2η and define the families of closed sets with r ∈ N. Accordingly, let us define C r as the closure of the complementary set . Based on the previous decomposition and similarly to the principles used, for example, to implement scheduled antiwindup policies [16], we can introduce a logic state variable r ∈ N, define the observer with a scheduled gain given by Following the classical notation used in the context of hybrid systems [14], the set r∈N C r × {r} is referred to as the flow set, whereas r∈N (D + r ∪ D − r ) × {r} is the jump set. Based on this construction, the following result can be established.
Theorem 2: Consider the manipulator system (5) and let Assumption 1 hold. Let the velocity x 2 (t) be such that lim sup t→∞ x 2 (t) ≤ṽ, for some constant and yet unknown valueṽ > 0. Consider the reduced-order observer (6) with gain k(y) = k r y, where k r is defined in (16) and the logic state r is governed by the hybrid dynamics (17). Then, the dynamics of the estimation error ε = x 2 −x 2 is locally asymptotically stable with a region of attraction containing the set E defined in (13). Furthermore, there exists a sufficiently large natural number Nṽ ∈ N such that the logic state is ultimately bounded with lim sup t→∞ r(t) ≤ Nṽ.
Proof: Suppose ε(0) ∈ E so that, in particular, ε(0) ≤ η and the bounds (14) hold. Without loss of generality, assume 2 that r(0) satisfies x 2 (0) ≤ r(0)v. Then, the bootstrap argument applies: the derivative of the Lyapunov functioṅ V (ε(0)) in (10) is negative definite, the estimation error ε(t) remains confined in a ball of radius η and this, in turn, implies that estimates (14) continue to hold, and that the sets (15) are well-defined for any t > 0. A correct initialization of the observer (6) with gain k(y) = k r y enhanced by the hybrid dynamics (16)(17) is then enough to guarantee that the error system is locally asymptotically stable, independently of a bound on the joint velocity. In fact, since the gain is scalar, switching does not disrupt stability conditions and, in particular, the Lyapunov function V (ε, t) defined in (11) is common for any switched mode k r . Finally, in view of the upper boundṽ on the norm of x 2 (t), there exists a maximum achievable value for the logic variable r, thus proving also ultimately boundedness.

V. SIMULATION RESULTS
To illustrate the performance of the reduced observer, we consider the model of a two-link planar robot 3 described by the physical parameters in Table I. The initial conditions x 1 (0) = (q 1 (0) q 2 (0)) and x 2 (0) = (q 1 (0),q 2 (0)) for the robot state are which includes a term compensating for gravity. Using the linear formulation (9), the observer parameters have been chosen as follows with the constant and fixed gain k 0 given by (12). This provides a stability region that contains the ball of unitary radius, subject to the initial start x 2 (0) ≤ 1.5 [rad/s].
To better highlight the performance of our reduced-order design, we report also the results obtained using the fullorder observer in [8]. For the sake of comparison, two cases have been considered: a) noisy and quantized measurements, with a quantitazion step ∆q = 7 · 10 −4 [rad]; b) model uncertainties, where the actual masses m 1 , m 2 are increased by 10% with respect to the nominal values used for the observer design. As illustrated in Figure 2, the reduced-order observer is characterized by a faster convergence than the full-order version, even though the former is slightly more sensitive to noise and quantization errors. This has to be ascribed to the presence of the direct feedthrough term in (6) and may be accommodated by preprocessing the system outputs with a filter. On the other hand, referring to Figure 3, one can appreciate the intrinstic robustness properties of the reducedorder observer, which provides a tight convergence in spite of model uncertainties.
Unlike in the previous case, under such torque input the robot velocity will grow unbounded. Therefore, we need to resort to the hybrid scheme with the scheduled gain k r proposed in (16)- (17) in order to guarantee the stability of the observer. The velocity bound has been fixed atv = 2 to be consistent with the setup of the first example and, accordingly, the initial guess r(0) = 1 has been made for the logic state r. Figure 4 shows the behaviour of the joint positions (top) and the velocity norms and their bound used to compute the scheduled observer gain (bottom). As expected, thanks to a successful initial guess, despite the presence of measurement noise, the norm of the actual velocity remains bounded by the estimated velocity norm, and this allows to correctly trigger the jumps of the logic state r and update the observer gain accordingly. A tolerance layer has been introduced in the conditions triggering the jumps to avoid chattering due to noise. Figure 5 clearly shows the efficiency of the proposed velocity estimation technique. After a very short transient the observer state perfectly match the velocity of the two joints. To better highlight the advantages of the hybrid scheme (16)- (17), the results using a reduced-order observer with a fixed high gain have been also reported. We have intentionally introduced a high level of noise to show how the use of a switching gain is beneficial for mitigating the amplification which would occur with a gain fixed selected based on a worst case scenario.
Example 3: Dynamic output feedback control. Consider now a scenario in which the robot is controlled by a full state feedback law for tracking a desired joint trajectory q d (t) that reaches a constant positionq = (π/4 − π/3) at steady state, i.e., after t = 8 s. Since the robot velocity is not directly measured, the velocity feedback has been implemented using the estimation provided by the observer, subject to quantization and measurement noise on the output quantity y = q. In particular, the following control law has been fed to the system τ (t) = M (q(t))(q d (t) + Λ(q d (t) −x 2 (t))) + C(q(t),x 2 (t)) (q d (t) + Λ(q d (t) − q(t))) + g(q(t)) with matrix Λ = 0.5 · I and PD gains K P = diag {40, 60} and K D = diag {60, 90}. Keeping the observer parameters at η = 1 [rad/s] andv = 2 [rad/s], the logic state r is again initialized at r(0) = 1, considering again a tolerance layer. The simulation results are reported in Figs. 6-7. The recovery of the position tracking error for both joints is clearly shown in Fig. 6 (top). The performance of the reduced-order observer in estimating the joint velocity is well illustrated in Fig. 7. Despite the large initial peak of both joint velocities, the observer is able to perfectly reconstruct the state of the system after a very short transient (see the zoomed box). This can be appreciated also in Fig. 6 (bottom), where the update on the velocity bound and the consistent switching of the observer gain occur as soon as needed. Once the initial transient is over, the velocityq is smoothly reduced and eventually converges This article has been accepted for publication in IEEE Control Systems Letters. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/LCSYS.2022.3196432 to zero; accordingly, the logic state r switches down to the least achievable value.

VI. POSSIBLE EXTENSIONS
Considering a nonlinear gain function k(y) in (6), rather than a scalar and constant gain as in (9), might provide additional degrees of freedom in the observer design. For instance, the bound (12) is somewhat conservative and oversized as it is based on the least achievable eigenvalue for the inertia matrix. Furthermore, the spectrum of the inertia matrix can have very large variations as the joint angles range over their admissible set. We sketch here two possible approaches that could be pursued for designing a tighter output injection gain, one devoted to limiting the deformation associated to the inertia matrix and the other to seeking for a primitive of its inverse.
Deformation reduction: The underlying idea of this strategy is to minimize the area deformation associated to the linear mapping M (y), that is making the shape of level sets of the quadratic form ε T M (y) ∂k(y) ∂y ε as close as possible to a sphere. To this goal, we can select k(y) = k 0 K 1 (y), with k 0 > 0 and K 1 (y) such that Q(y) = M (y) ∂K1(y) ∂y + M (y) ∂K1(y) ∂y T > 0, and the ratio min y∈R n λmin(Q(y)) max y∈R n λmax(Q(y)) is maximized (ideally is equal to 1).
Matrix inversion: The idea of the second strategy is based on the observation that, if ∂k(y) ∂y is chosen as the inverse of M (y) multiplied by a constant gain, the resulting quadratic form can be shaped arbitrarily. However, it is well known that a vector function corresponds to the gradient of a scalar function only under some rather conservative conditions. Nevertheless, one may attempt to approximate the inverse by selecting k(y) = k 0 K 1 (y) with k 0 > 0 and K 1 (y) such that ∂K1(y) ∂y = M −1 (y) + Q(y), where Q(y) 1/λ 2 and λ 2 is defined in (8).

VII. CONCLUSIONS
We addressed the problem of velocity observer design for robotic manipulators when only position measurements are available. Taking inspiration from the classical full-order observer in [8], a reduced-order estimator was developed with the aim of lowering the computational burden and increasing the convergence rate. Thanks to the coupling with a hybrid scheme that automatically adjusts the observer gains, it is possible also to avoid the requirement of a global bound on the robot velocity, which is a typical design restriction for this class of mechanical systems. This enables the application of the observer also in an open-loop regime, which usually is not able to guarantee bounded velocities. Numerical simulations of the observer behaviour in several scenarios support and validate the theoretical findings. In particular, the reducedorder observer is characterized by a faster convergence rate compared to a full order-observer, and by promising robustness properties, thus making it competitive also against sliding mode observers. We are currently investigating also the use of the reduced-order observer to implement robot momentum filters [17] for model-based collision detection purposes.