1 Introduction

With the development of technology, robot has been widely used in industrial fields, and is gradually entering people’s daily life. However, due to external disturbance, friction, external environment and nonlinear coupling, there are still many problems to be solved. For example, when the joint velocities of the manipulator are unknown, it is difficult to find an excellent state feedback control scheme to achieve the desired tracking goal. In many industrial applications, due to the requirements of the task, the robot needs to contact with the environment, and the position and contact force must be accurately controlled. Therefore, how to design an ideal and effective control scheme is complex and difficult.

In recent years, many researchers have investigated various control methods to make the robot motion more compliant. There are two main ways to achieve the compliant motion: the hybrid position/force control and the impedance control. Raibert and Craig [1] proposed a hybrid position/force control, which assigned the force and position in any direction of the workspace to each joint controller by Jacobian matrix. Lozano and Brogliato [2] proposed an adaptive force/position control scheme for robot manipulators based on a particular decomposition of the robot Jacobian and environment stiffness matrices. The schemes did not require measurement of the joint acceleration or the first derivative of force. In order to improve the force tracking control performance, many advanced methods have been further integrated into the hybrid position/force control scheme, such as sliding mode control [3,4,5,6], robust control [7,8,9,10], fuzzy control [11,12,13,14], adaptive neural network [15,16,17,18,19] and so on. Karayiannidis [15] proposed a neuro-adaptive controller for the force and position trajectory tracking of a robot in compliant contact with a flat surface under non-parametric uncertainties existing in the dynamic and contact model. Peng et al. [16] proposed an adaptive Jacobian and radial basis function (RBF) neural network-based position/force tracking impedance control scheme to control robotic system with uncertainties and external disturbances. The schemes mainly realized force feedback control of the manipulator through the impedance relationship. Kumar [17] proposed an adaptive control method based on neural network for the hybrid control of force and position of the rigid-link manipulator. However, the convergence speed of the system was relatively slow since the feedforward neural network (FFNN) was used to approximate the nonlinear model of the manipulator. Ghajar [18] designed an intelligent position/force hybrid controller to solve the contact friction between the end-effector and the environment in the present of the system uncertainties, then the experimental tests of constant force were also conducted. Rani [19] proposed a hybrid intelligent force/position control scheme in the presence of external disturbances and model uncertainties. However, the joint velocities of the robot were assumed to be measured directly and accurately.

To solve the trajectory control and the environmental contact constraints, Mills and Goldenberg [20] proposed a method to simultaneously control the contact force exerted by the manipulator and the position of the end-effector on the contact surface. Yoshikawa and Sudou [21] proposed a dynamic hybrid control method, and developed an on-line estimation algorithm to estimate the local shape constrained surface measurement data, so that the dynamic hybrid control method was more practical and effective. However, the above control methods were designed under the known environment. For the uncertain environment, Ravandi et al. [22] combined fuzzy logic with traditional sliding mode control, a full approximation force/position hybrid control was then designed, and the adaptive PI controller was used to estimate the robust part.

In the above investigations, the joint position and velocity of the robot were usually assumed to be measured directly and accurately. However, in practical, due to the cost and noise disturbances, the effective observers were usually designed to replace the actual joint velocities measurement to reduce the cost and noise disturbances [23,24,25,26,27,28,29,30]. By employing neural network to compensate gravity and friction terms, Yu et al. [23] proposed a high-gain observer and presented the direct relationship between observer gain and observer error. Su et al. [24] proposed a simple nonlinear observer for a class of uncertain nonlinear multiple input multiple output (MIMO) mechanical systems with first order differentiable dynamics. Golea [25] proposed a fuzzy adaptive control method for multi-link robots with structural uncertainties and unstructured uncertainties. The scheme did not need to derive the linear equations of the robot dynamics. Chaudhary [27] proposed a hybrid fuzzy PD+I force-plus-position controller based on velocity observer. In the above observers, neural network control techniques were also widely used to approximate unknown nonlinear dynamics and compensate for uncertainties in dynamic models. Yang et al. [29] proposed an adaptive neural network force tracking impedance control scheme based on a nonlinear observer, the accuracy of joint position and force tracking were then improved by using adaptive RBF neural network to compensate the uncertainty of the system. Sun [31] proposed an observer-based adaptive controller based on neural network for trajectory tracking of robot with unknown dynamic nonlinearity. The scheme could guarantee the final values of tracking error and observer error as well as the bound of neural network weights. Abdollahi [32] proposed an observer based on nonlinear parameter neural network for general multi-variable nonlinear systems. The observer could be applied to systems with higher nonlinearity without any prior knowledge of system dynamics.

In this paper, assume that only the positions and force of robotic manipulator can be measured, while the velocities are assumed to be unknown, a neural network-based hybrid position/force tracking control scheme is proposed to control the robotic system based on a neural network-based velocity observer. The contributions of this manuscript can be stated as follows,

  1. (1)

    A neural network-based velocity observer is combined into position/force tracking control framework.

  2. (2)

    A state observer based on RBF neural network is proposed to estimate the velocities of the robotic system.

  3. (3)

    Based on the observed joint velocities, a hybrid position/force control scheme based on RBF neural network is proposed for controlling robotic system without velocity measurement.

  4. (4)

    By using the strict positive real method and Lyapunov stability theory, it is proved that all signals of the closed-loop system composed of robotic system, velocity observer and hybrid position/force controller are eventually uniformly bounded.

Finally, the simulation tests on the two-link manipulator are conducted, which show the feasibility and effectiveness of the design scheme.

The rest of this paper is organized as follows. In Sect. 2, some necessary mathematical knowledge is given, and the robot dynamic model and the RBF neural network are also presented. In Sect. 3, the RBF neural network-based adaptive observer is designed and the stability of the observer is also analyzed. In Sect. 4, based on the estimated joint velocities, a neural network adaptive hybrid position/force control scheme is designed. Contrastive simulation tests on a two-link manipulator are conducted in Sect. 5. Finally, the conclusion is drawn in Sect. 6.

2 Preliminaries

In this paper, standard notations are used. Let \(\mathfrak {R}\) be the real number set, \(\mathfrak {R}^n\) be the n-dimensional vector space, \(\mathfrak {R}^{n\times n}\) be the \(n\times n\) real matrix space. The norm of vector \(x\in \mathfrak {R}^n\) and that of matrix \(A\in \mathfrak {R}^{n\times n}\) are defined as \(\parallel x\parallel = \sqrt{x^{{\mathrm {T}}}x}\) and \(\parallel A\parallel = tr(A^{{\mathrm {T}}}A)\), respectively. If y is a scalar, then \(\parallel y\parallel \) denotes the absolute value. \(\lambda _{{\mathrm {min}}}(A)\) and \(\lambda _{{\mathrm {max}}}(A)\) are the minimum and the maximum eigenvalue of matrix A, respectively. \(I_{n\times n}\) is an \(n\times n\) identity matrix. \({\mathrm {sgn}}(\cdot )\) is a standard sign function. Denote \(\parallel x\parallel ^2_A = x^{{\mathrm {T}}}Ax \ge \lambda _{{\mathrm {min}}}(A)\parallel x\parallel ^2\), A is a positive symmetry matrix. From [33], we can obtain the definitions of strictly positive real (SPR) and Kalman–Yakubovich–Popov (KYP) Lemma as follows.

Definition 1

A real rational transfer function matrix G(s) is SPR if: for some \(\varepsilon >0\), (i) no element of \(G(s-\varepsilon )\) has a pole in \(Re[s-\varepsilon ]>0\); (ii) \(G(s-\varepsilon )+G^{{\mathrm {T}}}(-(s-\varepsilon ))\ge 0\) in \(Re[s-\varepsilon ]>0\).

Lemma 1

Suppose that the matrix \(G(s)+G^{{\mathrm {T}}}(-s)\) has full rank in the complex plane,where \(G(s)=C(sI-A)^{-1}B\) is the real rational transfer function; A satisfies that \(det(sI-A)\) has only zeros in the open left-half plane; (AB) is completely controllable. Then the positive definite symmetric matrices Q and P satisfying,

$$\begin{aligned} \left\{ \begin{aligned}&A^{{\mathrm {T}}}P+PA=-Q\\&PB=C^{{\mathrm {T}}}\\ \end{aligned} \right. \end{aligned}$$

exist if and only if G(s) is SPR.

2.1 Dynamical Model and Properties for Robot Manipulators

The general dynamic model of a rigid-link robot with n joints can be represented as follows,

$$\begin{aligned} M(q)\ddot{q}+C(q,{\dot{q}}){\dot{q}}+G(q)+F_n({\dot{q}})+\tau _d=\tau -\tau _e \end{aligned}$$
(1)

where \(q,{\dot{q}},\ddot{q}\in \mathfrak {R}^n\) are the position, velocity and acceleration vectors, respectively. \(M(q) \in \mathfrak {R}^{n \times n}\) is the inertia matrix. \(C(q,{\dot{q}}) \in \mathfrak {R}^{n \times n}\) is the vector of centripetal and Coriolis forces term. \(G(q) \in \mathfrak {R}^{n}\) is the gravity effects. \(F_n({\dot{q}}) \in \mathfrak {R}^{n}\) denotes the friction effects. \(\tau _d \in \mathfrak {R}^n\) is the vector of unknown bounded external disturbances. \(\tau \in \mathfrak {R}^n\) is the torque of robot input vector. \(\tau _e \in \mathfrak {R}^n\) is the interaction torque between robot and environment.

The dynamic model of Eq. (1) has the following properties which are useful for subsequent work.

Property 1

The inertia matrix M(q) is symmetric, positive definite and satisfies,

$$\begin{aligned} M_m\Vert \zeta \Vert ^2 \le \zeta ^{{\mathrm {T}}}M(q)\zeta \le M_M\Vert \zeta \Vert ^2~~~\forall \zeta \in \mathfrak {R}^n \end{aligned}$$

where \(M_m\) and \(M_M\) are positive constants.

Property 2

The matrix \({\dot{M}}(q)-2C(q,{\dot{q}})\) is skew-symmetric, i.e.,

$$\begin{aligned} \zeta ^{{\mathrm {T}}}({\dot{M}}(q)-2C(q,{\dot{q}}))\zeta =0~~~\forall \zeta \in \mathfrak {R}^n \end{aligned}$$

Assumption 1

The friction effects and external disturbances are bounded, i.e.,

$$\begin{aligned} \Vert F_n({\dot{q}}) \Vert \le \alpha +\beta \Vert {\dot{q}} \Vert ,\ \Vert \tau _d \Vert \le d \end{aligned}$$

where \(\alpha ,\beta \) and d are positive constants.

Considering the measurement error and environmental factors, it is difficult to obtain the actual values of the physical parameters such as the length of the link and the mass of the link. Therefore, in this paper, the matrices M(q), \(C(q,{\dot{q}})\), G(q) are represented by the nominal parts \(M_0(q)\), \(C_0(q,{\dot{q}})\), \(G_0(q)\) and the uncertain parts \({\varDelta }M(q)\), \({\varDelta }C(q,{\dot{q}})\), \({\varDelta }G(q)\) respectively, that is,

$$\begin{aligned} M(q)= & {} M_0(q)+{\varDelta }M(q) \\ C(q,{\dot{q}})= & {} C_0(q,{\dot{q}})+{\varDelta }C(q,{\dot{q}}) \\ G(q)= & {} G_0(q)+{\varDelta }G(q) \end{aligned}$$

Assumption 2

The uncertain parts of the robot parameters are bounded, that is

$$\begin{aligned} \Vert {\varDelta }M(q)\Vert \le \psi _M,\Vert {\varDelta }C(q,{\dot{q}})\Vert \le \psi _C,\Vert {\varDelta }G(q)\Vert \le \psi _G \end{aligned}$$

where \(\psi _M,\psi _C\) and \(\psi _G\) are positive constants, and \(\psi _M \le \lambda _{{\mathrm {min}}} (M_0(q))\).

The relationship between the contact force \(F_e \in \mathfrak {R}^m\) at the end-effector and the contact torque \(\tau _e \in \mathfrak {R}^n\) in the joint space can be expressed as,

$$\begin{aligned} \tau _e=J^{{\mathrm {T}}}(q)F_e \end{aligned}$$
(2)

where J(q) is the \(m\times n~(m\le n)\) dimensional Jacobian matrix.

In the Cartesian space, the position of the end-effector associated with the joint angle of the robot joint can be obtained by the following kinematic equation,

$$\begin{aligned} X=L(q) \end{aligned}$$
(3)

where \(X \in \mathfrak {R}^m\) is the position of the end-effector, L(q) is the kinematic function of robot. Then,

$$\begin{aligned} {\dot{X}}=J(q){\dot{q}} \end{aligned}$$
(4)

Taking the first derivative of Eq. (4), we can obtain,

$$\begin{aligned} {\ddot{X}}=J(q)\ddot{q}+{\dot{J}}(q){\dot{q}} \end{aligned}$$
(5)

In the task space, when the robot is in contact with the environment, the contact force \(F_e\) of the robot can be obtained from the deformation of the environment, that is,

$$\begin{aligned} F_e = K_e(X-X_e) \end{aligned}$$
(6)

where \(K_e\) is the environmental stiffness matrix, \(X_e\) is the coordinate of the contact point of the end-effector when the contact force \(F_e\) is zero. In general, the stiffness matrix \(K_e\) may be singular. Therefore, \(F_e\) can be decomposed as,

$$\begin{aligned} \begin{array}{*{2}c} F_e \end{array}= \left[ \begin{array}{*{2}c} F \\ F^\prime \\ \end{array}\right] = \left[ \begin{array}{*{2}c} K \\ K^\prime \\ \end{array}\right] \begin{array}{*{2}c} (X-X_e) \end{array} \end{aligned}$$
(7)

where \(F \in \mathfrak {R}^s\), \(K \in \mathfrak {R}^{s\times m}\) (\(s \le m\)) is a full-rank matrix, and the rows of \(K^\prime \in \mathfrak {R}^{(m-s)\times m}\) depend linearly on the rows of K. Therefore, only F can be controlled, and the element of \(F^\prime \) is a linear combination of F.

2.2 Radial Basis Function Neural Network

As a typical neural network, it has been proved that the radial basis function neural network (RBFNN) can approximate any nonlinear function. The RBFNN with multiple input and single output can be described as,

$$\begin{aligned} y(x)=\displaystyle {\sum _{j=1}^{m}}w_j\xi _j(x)=W^{{\mathrm {T}}}\xi (x) \end{aligned}$$
(8)

where \(W=[w_1,...,w_m]^{{\mathrm {T}}}\) is the network weight vector and x is the network input vector. \(\xi (x)=[\xi _1(x),...,\xi _m(x)]^{{\mathrm {T}}}\) is the basis function of the hidden layer that is usually defined as follows,

$$\begin{aligned} \xi _j(x)=e^{-\frac{\parallel x-c_j\parallel }{\delta ^{2}_j}} \quad&j=1,2,...,m \end{aligned}$$
(9)

where \(c_j\) and \(\delta _j\) represent the center of hidden layer neuron and the width of the Gauss basis function, respectively.

3 Neural Network-Based Velocity Observer Design and Stability Analysis

Let \(x_1=q\) and \(x_2={\dot{q}}\), the robotic dynamic Eq. (1) can be rewritten as,

$$\begin{aligned} \left\{ \begin{aligned}&{\dot{x}}_1=x_2\\&{\dot{x}}_2=M^{-1}(x_1)(\tau -\tau _e-\tau _d)-M^{-1}(x_1)[C(x_1,x_2)x_2+F_n(x_2)+G(x_1)] \end{aligned} \right. \end{aligned}$$
(10)

Defining

$$\begin{aligned} D_o(x_1,x_2)=K_1x_2-M^{-1}(x_1)[C(x_1,x_2)x_2+F_n(x_2)+G(x_1)] \end{aligned}$$
(11)

where \(K_1 \in \mathfrak {R}^{n \times n}\) is a diagonal constant positive definite matrix.

Considering Eqs. (10) and (11), the robotic dynamic Eq. (1) can be further written as,

$$\begin{aligned} \left\{ \begin{aligned}&{\dot{x}}_1=x_2\\&{\dot{x}}_2=-K_1x_2+M^{-1}(x_1)(\tau -\tau _e-\tau _d)+D_o(x_1,x_2)\\ \end{aligned} \right. \end{aligned}$$
(12)

Using the RBFNN for approximation of unknown function \(D_o(x_1,x_2)\), which can be written as,

$$\begin{aligned} D_o(x_1,x_2)=W^{{\mathrm {T}}}_o\xi _o(x_1,x_2)+\varepsilon _o(x_1,x_2) \end{aligned}$$
(13)

where \(W_o\) represents the ideal weight matrix of the RBFNN, \(\xi _o(x_1,x_2)\) is the basis functions of the hidden layer, \(\varepsilon _o(x_1,x_2)\) denotes reconstruction error of RBFNN.

3.1 Neural Network-Based Velocity Observer

First, the nonlinear velocity observer based on neural network is designed as follows,

$$\begin{aligned} \left\{ \begin{aligned}&\dot{{\hat{x}}}_1={\hat{x}}_2\\&\dot{{\hat{x}}}_2=-K_1{\hat{x}}_2+K_2{\tilde{x}}_1+M^{-1}_0(x_1)(\tau -\tau _e)+{\hat{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)+v_o\\ \end{aligned} \right. \end{aligned}$$
(14)

where \({\hat{x}}_1\) and \({\hat{x}}_2\) are the estimated values of \(x_1\) and \(x_2\), respectively, \(K_2 \in \mathfrak {R}^{n \times n}\) is a diagonal constant positive definite matrix, and satisfies \(K_2 > K_1\), \({{\hat{W}}}_o\) represents the estimation of \(W_o\), \(v_o\) is a robust compensator.

Let us define the observation error as follows,

$$\begin{aligned} {\tilde{x}}_1=x_1-{\hat{x}}_1\ \&{\tilde{x}}_2=x_2-{\hat{x}}_2 \end{aligned}$$
(15)

Then, according to Eqs. (14) and (15), the observation error of observer can be obtained as,

$$\begin{aligned} \left\{ \begin{aligned}&\dot{{\tilde{x}}}_1={\tilde{x}}_2\\&\dot{{\tilde{x}}}_2={\dot{x}}_2+K_1{\hat{x}}_2-K_2{\tilde{x}}_1-M^{-1}_0(x_1)(\tau -\tau _e)-{\hat{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)-v_o\\ \end{aligned} \right. \end{aligned}$$
(16)

Furthermore, the observation error can be written as,

$$\begin{aligned} \left\{ \begin{aligned} \dot{{\tilde{x}}}_1&={\tilde{x}}_2\\ \dot{{\tilde{x}}}_2&=-K_1{\tilde{x}}_2-K_2{\tilde{x}}_1+D_o(x_1,x_2)-{\hat{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)\\&\quad -M^{-1}(x_1)\tau _d-M^{-1}(x_1){\varDelta }M(x_1) M^{-1}_0(x_1)(\tau -\tau _e)-v_o \end{aligned} \right. \end{aligned}$$
(17)

Since \(x_2\) can not be obtained directly from the measurement, according to Eq. (13), we have,

$$\begin{aligned}&D_o(x_1,x_2)-{\hat{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)\nonumber \\&\quad =W_o^{{\mathrm {T}}}\xi _o(x_1,x_2)+\varepsilon _o(x_1,x_2)-{\hat{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)\nonumber \\&\quad ={\tilde{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)-W^{{\mathrm {T}}}_o[\xi _o(x_1,x_2)-\xi _o(x_1,{\hat{x}}_2)]+\varepsilon _o(x_1,x_2)\nonumber \\&\quad ={\tilde{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)-W^{{\mathrm {T}}}_o{\tilde{\xi }}_o(x_1,x_2,{\hat{x}}_2)+\varepsilon _o(x_1,x_2) \end{aligned}$$
(18)

where \({\tilde{W}}_o=W_o-{\hat{W}}_o\) is the weight estimation error and \({\tilde{\xi }}_o(x_1,x_2,{\hat{x}}_2)=\xi _o(x_1,x_2)-\xi _o(x_1,{\hat{x}}_2)\) is the estimated error of the hidden layer.

Assumption 3

The estimation errors of weight and the basis functions are bounded and satisfied,

$$\begin{aligned} \Vert W^{{\mathrm {T}}}_o {\tilde{\xi }}_o(x_1,x_2,{\hat{x}}_2)\Vert \le \psi _{W_o} \psi _{\xi _o},\ \ \Vert \varepsilon _o(x_1,x_2)\Vert \le \psi _{\varepsilon _o} \end{aligned}$$

where \(\psi _{W_o}\), \(\psi _{\xi _o}\) and \(\psi _{\varepsilon _o}\) are positive constants.

According to Eqs. (17) and (18), the observer estimation errors Eq. (16) can be written as

$$\begin{aligned} \left\{ \begin{aligned}&\dot{{\tilde{x}}}_1={\tilde{x}}_2\\&\dot{{\tilde{x}}}_2=-K_1{\tilde{x}}_2-K_2{\tilde{x}}_1+U_o\\ \end{aligned} \right. \end{aligned}$$
(19)

where

$$\begin{aligned} U_o&={\tilde{W}}^{{\mathrm {T}}}_o\xi _o(x_1,{\hat{x}}_2)-M^{-1}(x_1)\tau _d-M^{-1}(x_1){\varDelta }M(x_1) M^{-1}_0(x_1)(\tau -\tau _e)\nonumber \\&\quad -W^{{\mathrm {T}}}_o\tilde{\xi _o}(x_1,x_2,{\hat{x}}_2)+\varepsilon _o(x_1,x_2)-v_o \end{aligned}$$
(20)

Therefore, Eq. (19) can be further written as,

$$\begin{aligned} \left\{ \begin{aligned}&\dot{{\tilde{x}}}=A_o{\tilde{x}}-B_oU_o\\&{\tilde{x}}_1=C_o{\tilde{x}}\\ \end{aligned} \right. \end{aligned}$$
(21)

where

$$\begin{aligned} {\tilde{x}}=\left[ \begin{array}{*{2}c} {\tilde{x}}_1 \\ {\tilde{x}}_2 \\ \end{array}\right] , \quad A_o=\left[ \begin{array}{*{2}c} 0_{n \times n} &{} I_{n \times n} \\ -K_2 &{} -K_1 \\ \end{array}\right] , \quad B_o&=\left[ \begin{array}{*{2}c} 0_{n \times n}\\ I_{n \times n} \\ \end{array}\right] , \quad C_o=\left[ \begin{array}{*{2}c} I_{n \times n}&{}0_{n \times n}\\ \end{array}\right] \end{aligned}$$

According to Definition 1, defining the output of observer estimation errors Eq. (21) as

$$\begin{aligned} {\tilde{x}}_1=G_o(s)U_o \end{aligned}$$
(22)

where \(G_o(s)=C_o(sI-A_o)^{-1}B_o\) is stable. The matrices \(K_1\) and \(K_2\) can be selected to satisfy that \(det(sI-A_o)\) has zeros only in the open left-half plane and \(G_o(s)\) is SPR.

For the subsequent development, considering the following inequations as,

$$\begin{aligned}&\Vert M^{-1}(x_1)\Vert \le \frac{1}{\lambda _{{\mathrm {min}}} (M_0^{-1}(x_1))-\psi _M} \end{aligned}$$
(23)
$$\begin{aligned}&\Vert M^{-1}(x_1){\varDelta }M(x_1)\Vert \le \frac{\psi _M}{\lambda _{{\mathrm {min}}}(M_0^{-1}(x_1))-\psi _M} \end{aligned}$$
(24)
$$\begin{aligned}&\Vert -M^{-1}(x_1)\tau _d-W^{{\mathrm {T}}}_o\tilde{\xi _o}(x_1,x_2, {\hat{x}}_2)+\varepsilon _o(x_1,x_2)\Vert \nonumber \\&\quad \le \frac{d}{\lambda _{{\mathrm {min}}}(M_0^{-1}(x_1))-\psi _M}+\psi _{W_o} \psi _{\xi _o}+\psi _{\varepsilon _o}\nonumber \\&\quad \triangleq \rho _o \end{aligned}$$
(25)

where \(\rho _o\) is a positive constant.

3.2 Stability Analysis

Theorem 1

Assume that the robotic dynamic is given as Eq. (1), Assumptions 13 are satisfied, and the transfer function \(G_o(s)\) is SPR. According to Lemma 1, there exists a matrix \(P=P^{{\mathrm {T}}}>0\) such that the following matrix equality holds,

$$\begin{aligned} \left\{ \begin{aligned}&A_o^{{\mathrm {T}}}P+PA_o=-Q\\&PB_o=C_o^{{\mathrm {T}}}\\ \end{aligned} \right. \end{aligned}$$
(26)

Then, the nonlinear velocity observer based on RBFNN designed as Eq. (14) is asymptotically stable, provided that the updating laws for the weights of the RBFNN and the robust compensator term are given as,

$$\begin{aligned} \dot{{\hat{W}}}_o&=-{\varGamma }^{-1}_{W_o}\xi _o(x_1,{\hat{x}}_2) {\tilde{x}}^{{\mathrm {T}}}_1 \end{aligned}$$
(27)
$$\begin{aligned} v_o&=-\left[ \frac{\psi _M\Vert M^{-1}_0(x_1)(\tau -\tau _e)\Vert }{\lambda _{{\mathrm {min}}}(M_0^{-1}(x_1))-\psi _M}+\rho _o \right] {{\mathrm {sgn}}}({\tilde{x}}_1) \end{aligned}$$
(28)

where \({\varGamma }_{W_o}\) is a positive definite matrix.

Proof

Please refer to “Appendix A”. \(\square \)

4 Neural Network-Based Hybrid Position/Force Tracking Controller Based on Velocity Observer and Stability Analysis

In this section, a hybrid position/force controller based on RBFNN is designed by using the measured joint positions and the observed joint velocities designed in the previous Sect. 3. The following identities are used for subsequent work,

$$\begin{aligned} I= & {} J^+J+J^- \end{aligned}$$
(29)
$$\begin{aligned} I= & {} K^+K+K^- \end{aligned}$$
(30)

where \(J^+\) and \(K^+\) are the pseudo inverse of J and K, respectively. \(J^-\) and \(K^-\) are projections of J and K, respectively.

Using Eqs. (6) and (30), \({\dot{X}}\) can be written as,

$$\begin{aligned} {\dot{X}}=K^+K{\dot{X}}+K^-{\dot{X}}=K^+{\dot{F}}+K^-{\dot{X}} \end{aligned}$$
(31)

Then, the differentiation of Eq. (31) can be obtained as,

$$\begin{aligned} {\ddot{X}}=K^+{\ddot{F}}+K^-{\ddot{X}} \end{aligned}$$
(32)

Using Eqs. (4), (29) and (31), one can obtain,

$$\begin{aligned} {\dot{q}}=J^+J{\dot{q}}+J^-{\dot{q}}=J^+(K^+{\dot{F}}+K^-{\dot{X}})+J^-{\dot{q}} \end{aligned}$$
(33)

Using Eqs. (5), (29) and (32), we have,

$$\begin{aligned} \ddot{q}=J^+J\ddot{q}+J^-\ddot{q}=J^+(K^+{\ddot{F}}+K^-{\ddot{X}}- {\dot{J}}{\dot{q}})+J^-\ddot{q} \end{aligned}$$
(34)

Let \(F_1=F\), \(F_2={\dot{F}}\), \(X_1=X\), \(X_2={\dot{X}}\), \(x_1=q\) and \(x_2={\dot{q}}\), and substituting Eqs. (33) and (34) into Eq. (1), we can obtain,

$$\begin{aligned}&M_0(x_1)[J^+(K^+{\dot{F}}_2+K^-{\dot{X}}_2-{\dot{J}}x_2)+J^-{\dot{x}}_2] +C_0(x_1,x_2)[J^+(K^+F_2+K^-X_2)\nonumber \\&\quad +J^-x_2]+G_0(x_1)+\tau _d=\tau -\tau _e-D_{c0}(x_1,x_2,{\dot{x}}_2) \end{aligned}$$
(35)

where \(D_{c0}(x_1,x_2,{\dot{x}}_2)={\varDelta }M(x_1){\dot{x}}_2+{\varDelta }C(x_1,x_2)x_2+{\varDelta }G(x_1)+F_n(x_2)\).

4.1 Neural Network-Based Hybrid Position/Force Tracking Controller Based on Velocity Observer

Since \(X_2\) can not be measured directly, the observed velocities obtained by the observer in Sect. 3 are used to the controller. Defining the tracking error, estimation of velocities error and observation of velocity error as follows,

$$\begin{aligned} e_{F_1}= & {} F_1-F_d, e_{X_1}=X_1-X_d, e_{x_1}=x_1-x_d \end{aligned}$$
(36)
$$\begin{aligned} {\hat{e}}_{F_2}= & {} {\hat{F}}_2-{\dot{F}}_d, {\hat{e}}_{X_2}={\hat{X}}_2-{\dot{X}}_d, {\hat{e}}_{x_2}={\hat{x}}_2-{\dot{x}}_d \end{aligned}$$
(37)
$$\begin{aligned} {\tilde{e}}_{F_2}= & {} F_2-{\hat{F}}_2, {\tilde{e}}_{X_2}=X_2-{\hat{X}}_2, {\tilde{x}}_2=x_2-{\hat{x}}_2 \end{aligned}$$
(38)

where \(F_d\), \(X_d\), \(x_d\) are the desired values of \(F_1\), \(X_1\), \(x_1\), respectively. \({\hat{F}}_2\), \({\hat{X}}_2\), \({\hat{x}}_2\) are the estimated values of \(F_2\), \(X_2\), \(x_2\), respectively.

Defining the following filtered errors,

$$\begin{aligned} s= & {} J^+(K^+E_F+K^-E_X)+J^-e_{x_2} \end{aligned}$$
(39)
$$\begin{aligned} {\hat{s}}= & {} J^+(K^+{\hat{E}}_F+K^-{\hat{E}}_X)+J^-{\hat{e}}_{x_2} \end{aligned}$$
(40)
$$\begin{aligned} {\tilde{s}}= & {} J^+(K^+{\tilde{e}}_{F_2}+K^-{\tilde{e}}_{X_2})+J^-{\tilde{x}}_2 \end{aligned}$$
(41)

where s, \({\hat{s}}\) and \({\tilde{s}}\) are the filtered tracking error, filtered estimation error and filtered observation error, respectively.

$$\begin{aligned} E_F= & {} {\dot{e}}_{F_1}+K_{fp}e_{F_1},E_X={\dot{e}}_{X_1}+K_{pp}e_{X_1} \end{aligned}$$
(42)
$$\begin{aligned} {\hat{E}}_F= & {} {\hat{e}}_{F_2}+K_{fp}e_{F_1},{\hat{E}}_X={\hat{e}}_{X_2}+K_{pp}e_{X_1} \end{aligned}$$
(43)

where \(K_{fp}\) and \(K_{pp}\) are diagonal constant positive definite matrices.

Taking the first derivative of Eq. (40) and multiplying \(M_0(x_1)\) on both sides, we can obtain,

$$\begin{aligned} M_0(x_1)\dot{{\hat{s}}}&=M_0(x_1)[J^+(K^+\dot{{\hat{E}}}_F+K^- \dot{{\hat{E}}}_X)+J^-\dot{{\hat{e}}}_{x_2}+Z_{{\hat{s}}}]\nonumber \\&=M_0(x_1)\{J^+[K^+(\dot{{\hat{E}}}_F-{\dot{F}}_2)+^-(\dot{{\hat{E}}}_X- {\dot{X}}_2)+{\dot{J}}x_2]+J^-(\dot{{\hat{e}}}_{x_2}-{\dot{x}}_2)\nonumber \\&\quad +Z_{{\hat{s}}}\}+M_0(x_1)[J^+(K^+{\dot{F}}_2+K^-{\dot{X}}_2- {\dot{J}}x_2)+J^-{\dot{x}}_2] \end{aligned}$$
(44)

where \(Z_{{\hat{s}}}={\dot{J}}^+(K^+{\hat{E}}_F+K^-{\hat{E}}_X)+{\dot{J}}^-{\hat{e}}_{x_2}\).

Substituting Eq. (35) into Eq. (44), we can obtain,

$$\begin{aligned} M_0(x_1)\dot{{\hat{s}}}&=M_0(x_1)\{J^+[K^+(\dot{{\hat{E}}}_F-{\dot{F}}_2) +K^-(\dot{{\hat{E}}}_X-{\dot{X}}_2)+{\dot{J}}x_2]+J^-(\dot{{\hat{e}}}_{x_2}- {\dot{x}}_2)\nonumber \\&\quad +Z_{{\hat{s}}}\}+C_0(x_1,x_2)\{J^+[K^+({\hat{E}}_F-F_2)+K^-({\hat{E}}_X- X_2)]+J^-({\hat{e}}_{x_2}\nonumber \\&\quad -x_2)\}-G_0(x_1)-C_0(x_1,x_2){\hat{s}}+\tau -\tau _e-\tau _d-D_{c0}(x_1, x_2,{\dot{x}}_2)\nonumber \\&=M_0(x_1)\{J^+[K^+(K_{fp}{\hat{e}}_{F_2}-{\ddot{F}}_d)+K^-(K_{pp}{\hat{e}}_{X_2} -{\ddot{X}}_d)]-J^-\ddot{x}_d\}\nonumber \\&\quad +C_0(x_1,{\hat{x}}_2)\{J^+[K^+(K_{fp}e_{F_1}-{\dot{F}}_d)+K^-(K_{pp}e_{X_1} -{\dot{X}}_d)]-J^-{\dot{x}}_d\}\nonumber \\&\quad -G_0(x_1)+M_0(x_1)\{J^+[K^+(\dot{{\tilde{e}}}_{F_2}-K_{fp}{\tilde{e}}_{F_2}) +K^-(\dot{{\tilde{e}}}_{X_2}-K_{pp}{\tilde{e}}_{X_2})\nonumber \\&\quad +{\dot{J}}x_2]+J^-\dot{{\tilde{x}}}_2+Z_{{\hat{s}}}\}-{\tilde{C}}_0(x_1,x_2, {\hat{x}}_2)\{J^+[K^+(K_{fp}e_{F_1}-{\dot{F}}_d)\nonumber \\&\quad +K^-(K_{pp}e_{X_1}-{\dot{X}}_d)]-J^-{\dot{x}}_d\}+C_0(x_1,x_2)\{J^+[K^+ {\tilde{e}}_{F_2}+K^-{\tilde{e}}_{X_2}]\nonumber \\&\quad +J^-{\tilde{x}}_2\}+D_{c0}(x_1,x_2,{\dot{x}}_2)-C_0(x_1,x_2){\hat{s}} +\tau -\tau _e-\tau _d \end{aligned}$$
(45)

where \({\tilde{C}}_0(x_1,x_2,{\hat{x}}_2)=C_0(x_1,x_2)-C_0(x_1,{\hat{x}}_2)\).

Combining Eqs. (3), (4), (5) with (6), one can conclude that the force and position of the end-effector can be obtained from the joint position information. Since \({\hat{s}}\) is the function of [\(x_1, {\hat{x}}_2\)], defining

$$\begin{aligned} D_{c1}(x_1,{\hat{x}}_2)&=M_0(x_1)\{J^+[K^+(K_{fp} {\hat{e}}_{F_2}-{\ddot{F}}_d)+K^-(K_{pp}{\hat{e}}_{X_2}- {\ddot{X}}_d)]-J^-\ddot{x}_d\}\nonumber \\&\quad +C_0(x_1,{\hat{x}}_2)\{J^+[K^+(K_{fp}e_{F_1}- {\dot{F}}_d)+K^-(K_{pp}e_{X_1}-{\dot{X}}_d)]\nonumber \\&\quad -J^-{\dot{x}}_d\}-G_0(x_1) \end{aligned}$$
(46)
$$\begin{aligned} D_{c2}(x_1,x_2)&= M_0(x_1)\{J^+[K^+(\dot{{\tilde{e}}}_{F_2}- K_{fp}{\tilde{e}}_{F_2})+K^-(\dot{{\tilde{e}}}_{X_2}-K_{pp} {\tilde{e}}_{X_2})+{\dot{J}}x_2]~~~\nonumber \\&\quad +J^-\dot{{\tilde{x}}}_2+Z_{{\hat{s}}}\}- {\tilde{C}}_0(x_1,x_2,{\hat{x}}_2)\{J^+[K^+(K_{fp}e_{F_1}-{\dot{F}}_d)\nonumber \\&\quad +K^-(K_{pp}e_{X_1}-{\dot{X}}_d)]-J^- {\dot{x}}_d\}+C_0(x_1,x_2) \{J^+[K^+{\tilde{e}}_{F_2}\nonumber \\&\quad +K^-{\tilde{e}}_{X_2}]+J^-{\tilde{x}}_2\} +D_{c0}(x_1,x_2,{\dot{x}}_2) \end{aligned}$$
(47)

Therefore, the closed-loop error dynamics Eq. (45) can be rewritten as,

$$\begin{aligned} M_0(x_1)\dot{{\hat{s}}}=D_{c1}(x_1,{\hat{x}}_2)-D_{c2}(x_1,x_2)- C_0(x_1,x_2){\hat{s}}+\tau -\tau _e-\tau _d \end{aligned}$$
(48)

Using the RBFNN for approximation of unknown function \(D_{c_2}(x_1,x_2)\), which can be written as,

$$\begin{aligned} D_{c2}(x_1,x_2) = W^{{\mathrm {T}}}_c\xi _c(x_1,x_2)+\varepsilon _c(x_1,x_2) \end{aligned}$$
(49)

where \(W_c\) represents the ideal weight matrix of the RBFNN, \(\xi _c(x_1,x_2)\) is the basis functions of the hidden layer, \(\varepsilon _c(x_1,x_2)\) is the approximation error.

Furthermore,

$$\begin{aligned} M_0(x_1){\dot{s}} = D_{c1}(x_1,{\hat{x}}_2)- W^{{\mathrm {T}}}_c\xi _c(x_1,x_2)- C_0(x_1,x_2){\hat{s}}+\tau -\tau _e-\varepsilon _c(x_1,x_2)-\tau _d \end{aligned}$$
(50)

Then, the control law based on neural network observer can be designed as follows,

$$\begin{aligned} \tau = -K_d{\hat{s}}+\tau _e-D_{c1}(x_1,{\hat{x}}_2)+ {\hat{W}}^{{\mathrm {T}}}_c\xi _c(x_1,{\hat{x}}_2)+v_c \end{aligned}$$
(51)

where \(K_d\) is a diagonal constant positive definite matrix, \(v_c\) is the robust compensator term.

Substituting Eq. (51) into Eq. (50) yields,

$$\begin{aligned} M_0(x_1)\dot{{\hat{s}}}&=-[K_d+C_0(x_1,x_2)]{\hat{s}}-[W^{{\mathrm {T}}}_c \xi _c(x_1,x_2)-{\hat{W}}^{{\mathrm {T}}}_c\xi _c(x_1,{\hat{x}}_2)]\nonumber \\&\quad -\varepsilon _c(x_1,x_2)+v_c-\tau _d \end{aligned}$$
(52)

Since

$$\begin{aligned}&W^{{\mathrm {T}}}_c\xi _c(x_1,x_2)-{\hat{W}}^{{\mathrm {T}}}_c\xi _c (x_1,{\hat{x}}_2)\nonumber \\&\quad ={\tilde{W}}^{{\mathrm {T}}}_c\xi _c(x_1,{\hat{x}}_2)+W^{{\mathrm {T}}}_c [\xi _c(x_1,x_2)-\xi _c(x_1,{\hat{x}}_2)]\nonumber \\&\quad ={\tilde{W}}^{{\mathrm {T}}}_c\xi _c(x_1,{\hat{x}}_2)+W^{{\mathrm {T}}}_c {\tilde{\xi }}_c(x_1,x_2,{\hat{x}}_2) \end{aligned}$$
(53)

where \({\tilde{W}}_c=W_c-\hat{W_c}\) is the weight estimation error and \({\tilde{\xi }}_c(x_1,x_2,{\hat{x}}_2)=\xi _c(x_1,x_2)-\xi _c(x_1,{\hat{x}}_2)\) is the estimated error of the basis function.

Assumption 4

The estimation errors of weight and the basis functions are bounded and satisfied,

$$\begin{aligned} \Vert W^{{\mathrm {T}}}_c {\tilde{\xi }}_c(x_1,x_2,{\hat{x}}_2)\Vert \le \psi _{W_c} \psi _{\xi _c},\ \ \Vert \varepsilon _c(x_1,x_2)\Vert \le \psi _{\varepsilon _c} \end{aligned}$$

where \(\psi _{W_c}\), \(\psi _{\xi _c}\) and \(\psi _{\varepsilon _c}\) are positive constants.

Then, substituting Eq. (53) into Eq. (52), we can obtain,

$$\begin{aligned} M_0(x_1)\dot{{\hat{s}}}&=-[K_d+C_0(x_1,x_2)]{\hat{s}}-{\tilde{W}}^{{\mathrm {T}}}_c \xi _c(x_1,{\hat{x}}_2)+v_c-\varepsilon _c(x_1,x_2)\nonumber \\&\quad -W^{{\mathrm {T}}}_c{\tilde{\xi }}_c(x_1,x_2,{\hat{x}}_2)-\tau _d \end{aligned}$$
(54)

Considering Assumptions 1 and 4, we have,

$$\begin{aligned} \Vert W^{{\mathrm {T}}}_c{\tilde{\xi }}_c(x_1,x_2,{\hat{x}}_2)+\varepsilon _c(x_1,x_2)+\tau _d\Vert \le \psi _{W_c} \psi _{\xi _c}+\psi _{\varepsilon _c}+d \triangleq \rho _c \end{aligned}$$
(55)

where \(\rho _c\) is a positive constant.

4.2 Stability Analysis

Theorem 2

Considering the robotic dynamic Eq. (1), suppose that Assumptions 14 are satisfied, the control input torque \(\tau \) is designed as Eq. (51), the adaptation laws for the weights of RBFNN and the robust compensator term are given as,

$$\begin{aligned} \dot{{\hat{W}}}_c= & {} -{\varGamma }^{-1}_{W_c}\xi _c(x_1,{\hat{x}}_2) {\hat{s}}^{{\mathrm {T}}} \end{aligned}$$
(56)
$$\begin{aligned} v_c= & {} \rho _c {{\mathrm {sgn}}}({\hat{s}}) \end{aligned}$$
(57)

where \({\varGamma }_{W_c}\) is positive definite matrices.

Then, the RBFNN-based hybrid position/force controller designed as Eq. (51) is asymptotically stable, and the filtered estimation error \({\hat{s}}\) and the weight estimation error \({\tilde{W}}_c\) are bounded.

Proof

Please refer to “Appendix B”. \(\square \)

Using Eqs. (39), (40) and (41), we can obtain

$$\begin{aligned} s={\hat{s}}+{\tilde{s}} \end{aligned}$$
(58)

Due to physical constraints, X, F, \(J^+\), \(J^-\), \(K^+\), \(K^-\) are all bounded. According to the bounded J and K and Eqs. (4) and (6), one can conclude that \({\tilde{s}}\) defined by Eq. (38) is bounded since the observer error \({\tilde{x}}_2\) is bounded, which has been proven in Sect. 3. Therefore, s is also bounded since \({\hat{s}}\) is bounded that has been proved in “Appendix B”.

Remark 1

In this paper, only the revolute joints of the robotic system are considered, where the joint positions and the lengths of the link are all bounded in the actual scene. Therefore, from Eqs. (3), (6) and \(J(q)=\partial (X)/\partial (q)\), one can obtain that X, F, \(J^+\), \(J^-\) are all bounded. Moreover, \(K^+\) and \(K^-\) are both bounded since the environmental stiffness matrix K is also generally bounded.

Since KJ are full rank matrices, multiplying Eq. (39) by KJ, we can obtain,

$$\begin{aligned} KJs=E_F \end{aligned}$$
(59)

Multiplying Eq. (39) by J, we can obtain,

$$\begin{aligned} Js=K^-E_X \end{aligned}$$
(60)

Since s and \(K^-\) are bounded, one can obtain that \(E_F\) and \(E_X\) are bounded. It means that the tracking error \(e_{F_1}\) and \(e_{X_1}\), velocities error \({\dot{e}}_{F_1}\) and \({\dot{e}}_{X_1}\) are all bounded. Using Eqs. (39), (59) and (60), since \(J^-\) is bounded, the joint velocity \(e_{x_2}\) is also bounded.

5 Simulation Examples

To verify the theoretical results, simulations are conducted on a two-link manipulator, and its dynamic model is given as follows,

$$\begin{aligned}&\left[ \begin{array}{*{2}c} M_{11} &{} M_{12} \\ M_{21} &{} M_{22} \\ \end{array}\right] \left[ \begin{array}{*{2}c} \ddot{q}_1 \\ \ddot{q}_2 \\ \end{array}\right] + \left[ \begin{array}{*{2}c} C_{11} &{} C_{12} \\ C_{21} &{} C_{22} \\ \end{array}\right] \left[ \begin{array}{*{2}c} {\dot{q}}_1 \\ {\dot{q}}_2 \\ \end{array}\right] + \left[ \begin{array}{*{2}c} G_1 \\ G_2 \\ \end{array}\right] +\left[ \begin{array}{*{2}c} F_{n1} \\ F_{n2} \\ \end{array}\right] + \left[ \begin{array}{*{2}c} \tau _{d1} \\ \tau _{d2} \\ \end{array}\right] \nonumber \\&\quad = \left[ \begin{array}{*{2}c} \tau _1 \\ \tau _2 \\ \end{array}\right] - \begin{array}{*{2}c} J^{{\mathrm {T}}}F \end{array} \end{aligned}$$
(61)

where the inertia matrix,the vector of centripetal and coriolis forces term,the gravity effects and friction effects are given as follows,

$$\begin{aligned}&M_{11} = (m_1 + m_2)l^2_1 + m_2 l^2_2 + 2 m_2 l_1 l_2 c_2; \, M_{12} = m_2 l^2_2 + m_2 l_1 l_2 c_2; \\&M_{21} = m_2 l^2_2 + m_2 l_1 l_2 c_2; \, M_{22} = m_2 l^2_2; \\&C_{11} = -2 m_2 l_1 l_2 {\dot{q}}_2 s_2; \, C_{12} = m_2 l_1 l_2 {\dot{q}}_2 s_2; \, C_{21} = m_2 l_1 l_2 {\dot{q}}_2 s_2; \, C_{22} = 0; \\&G_1 = (m_1 + m_2)l_1 g c_1 + m_2 l_2 g c_{12}; \, G_2 = m_2 l_2 g c_{12}; \end{aligned}$$

where \(m_1\) and \(m_2\) are the masses of link 1 and link 2,respectively; \(l_1\) and \(l_2\) are the lengths of link 1 and link 2, respectively; \(s_i\) denotes \(\sin (q_i)\), \(c_i\) denotes \(\cos (q_i)\), and \(c_{ij}\) denotes \(\cos (q_i+q_j)\), for \(i=1,2\) and \(j=1,2\). g is the acceleration of gravity.

5.1 Design Process

To summarize the analysis in Sects. 3 and 4, the step-by-step procedures of the neural network-based hybrid position/force control for robotic systems based on neural network-based observer are outlined as follows,

Step 1

Select the observer gains as,

$$\begin{aligned} K_1= \left[ \begin{array}{*{2}c} 10 &{}\quad 0 \\ 0 &{}\quad 10 \\ \end{array}\right] , K_2= \left[ \begin{array}{*{2}c} 400 &{}\quad 0 \\ 0 &{}\quad 400 \\ \end{array}\right] \end{aligned}$$

Step 2

The number of hidden-layer nodes of the RBFNN is chosen to be 20. The center \(c_j\) of the Gaussian function are 20 points in \([-\,5, 5]\) and width \(\delta _j\) are set to be 0.5. The learning rate of weight is selected as \({\varGamma }_{W_o}=0.2I_{20}\), set \(\psi _M=10^{-8}\) and \(\rho _o=50\), then the RBFNN-based observer can be obtained from Theorem 1.

Step 3

Choosing the controller gains \(K_{pp}=25I_{2 \times 2}, K_{fp}=100I_{2 \times 2}, K_d=200I_{2 \times 2}\) in Eqs. (43) and (51), respectively, the structure of RBFNN is chosen as Step 3. The learning rate of weight is selected as \({\varGamma }_{W_c}=0.2I_{20}\), and set \(\rho _c=50\), then the RBFNN-based hybrid position/force control for robotic systems based on neural network-based observer can be obtained from Theorem 2.

Remark 2

To ensure that the errors of observer and controller are converged to zero quickly, the observer gains and controller gains would be usually selected to be large enough. However, it is not recommended to use very large gains, because this may lead to a stronger noise effect and may decrease the service life of the robotic system. Moreover, too large or too small value of the gains will lead to the overshoot. Therefore, the gains should be adjusted carefully for achieving suitable performances of the observer and controller.

5.2 Simulation Results

In this section, the proposed intelligent hybrid position/force control scheme based on observer is applied to control a two-link robotic manipulator. The nominal parameters of the robot used for simulation are \(m_1 = 8\,{\mathrm {kg}},m_2 = 4\,{\mathrm {kg}}\) and \(l_1 = 1.1\,{\mathrm {m}}, l_2 = 0.9\,{\mathrm {m}}, g = 9.8\,{\mathrm {m/s^2}}, F_n = [5\dot{q_1}, 3\dot{q_2}]^{{\mathrm {T}}}\), while actual parameters of robot are chosen as \(m_1 =10\,{{\mathrm {kg}}}, m_2 = 8\,{{\mathrm {kg}}}\) and \(l_1 = l_2 = 1\,{{\mathrm {m}}}\) to introduce the parameters uncertainties. Choosing the contact force \(F=k(X-X_{xe})\) in the \(X_x\) direction where \(k=2000\,{\mathrm {N/m}}\) and \(X_{xe}=1\,{{\mathrm {m}}}\), the desired trajectories \(X_{yd}=1.5(1-e^{-t}){{\mathrm {m}}}\) in \(X_y\) direction. For testing the robustness of the proposed method, choosing external disturbances \(\tau _d =[-3 {{\mathrm {cos}}}(5t), 3 {{\mathrm {sin}}}(5t)]^{{\mathrm {T}}}\). The desired time-varying force \(F_d\) is chosen as a non-smooth function, which is described as,

$$\begin{aligned} F_d= \left\{ \begin{aligned}&~~~~4t+20-8\mu ,~2\mu \le t<2\mu +1\\&-4t+28+8\mu ,~2\mu +1 \le t <2\mu +2\\ \end{aligned} \right. \end{aligned}$$
(62)

where \(\mu = 0,1,2,\cdots \).

The initial conditions are \(q(0)=[\pi /3, -2\pi /3]^{{\mathrm {T}}}{\mathrm {rad}}, {\dot{q}}(0)=[0, 0]^{{\mathrm {T}}}{\mathrm {rad/s}}\), and \(K^+=1/k, K^-=[0~0;0~1], J^+=J^{-1}, J^-=0\). The initial conditions are \({\hat{q}}(0)=[\pi /3, -2\pi /3]^{{\mathrm {T}}}{\mathrm {rad}}, \dot{{\hat{q}}}(0)=[0, 0]^{{\mathrm {T}}}{\mathrm {rad/s}}\). The total simulation time is 10s and the sampling time is 0.001s.

In order to facilitate the comparison and analysis, we conduct two cases to verify the performances of the proposed method, where Case 1 is used to test the performance of the designed observer and Case 2 is used to test the performance of the proposed observer-based controller.

Case 1 Under the condition of friction and external disturbance, based on high-gain observer [24],the intelligent hybrid position/force controller (IHPFC) [19] and the neural-network-based robust hybrid force/position controller (NNBRHFPC) [18] are used to compare with the proposed hybrid position/force tracking controller (HPFTC) based on neural network observer in this paper. Figure 1 shows the simulation results, where Fig. 1a is the position tracking the end-effector of the robot manipulator in y-direction. Figure 1b is the force tracking in x-direction. Fig. 1c is the position tracking error the end-effector in y-direction. Figure 1d is the force tracking error in x-direction. Figure 1e, f are the position estimation errors of joint 1 and joint 2, respectively. Figure 1g, h are the velocity estimation errors of joint 1 and joint 2, respectively.

Fig. 1
figure 1

Simulation results using NNO-based HPFTC, HGO-based IHPFC and HGO-based NNBRHFPC

Fig. 2
figure 2

Simulation results using NNO-based HPFTC, NNO-based NNAHPFC and NNO-based NNBRHFPC

From the simulation results of Fig. 1 the stability of the robot system can be achieved under the control of the above three observer-based hybrid position/force controllers. From Fig. 1c, d, it is obvious that the steady-state error of HPFTC tracking in force and position subspace is smaller than that of IHPFC and NNBRHFPC. At \(t = 1\)s, the tracking of NNBRHFPC presents severe chattering phenomenon in force and position subspace, which is caused by singularity. While there are no singularity in HPFTC and IHPFC, the system response of HPFTC is significantly better than that of IHPFC. Moreover, due to the large gain of the high-gain observer, the observed state has a certain range of chattering, which would affect the performance of the controller. From Fig. 1g, h, it can be seen that the designed observer based on neural network can achieve smaller steady-state error in comparison to the high-gain observer (HGO).

Case 2 Under the same conditions as Case 1, the neural network adaptive hybrid position/force controller(NNAHPFC) [17] and the neural-network-based robust hybrid force/position controller (NNBRHFPC) [18] are used to control the robotic system, but the joint velocity of the manipulator is obtained by the observer designed in this paper. Figure 2 show the simulation results, where Fig. 2a is the position tracking the end-effector of the robot manipulator in y-direction. Figure 2b is the force tracking in x-direction. Figure 2c is the position tracking error the end-effector in y-direction. Figure 2d is the force tracking error in x-direction. Figure 2e, f are the position estimation errors of joint 1 and joint 2, respectively. Figure 2g, h are the velocity estimation errors of joint 1 and joint 2, respectively.

According to the simulation results of Fig. 2, we can conclude that the proposed HPFTC, NNAHPFC and NNBRHFPC can achieve the stability of the system. From Fig. 2e–h, it can be seen that the observer designed in this paper demonstrates excellent performance. And the system regulation time of NNAHPFC is longer than that of the proposed HPFTC. This is because the convergence speed of FFNN used in NNAHPFC was relatively slow, which would affect the convergence rate and steady-state error of the system. The convergence speed of RBFNN used in the proposed HPFTC is better than that of FFNN. Moreover, from Fig. 2c,d, there is severe chattering of the force tracking and position tracking by using NNAHPFC in the initial stage, which may degrade the tracking performances and even cause the systems instability. Furthermore, the tracking control using NNBRHFPC also presents severe chattering phenomenon at \(t = 1\)s because of the existence of singularity, which reduces the control accuracy of the system. Instead, the response and steady state performances of the proposed HPFTC are better than those of NNAHPFC and NNBRHFPC. These results indicate that the proposed HPFTC can achieve the good convergence speed and small steady-state error.

6 Conclusions

This paper proposed a hybrid position/force tracking control scheme based on neural network observer for robotic systems in the presence of system uncertainties and external disturbances. For the unmeasurable joint velocities, a neural network-based observer was designed, and the observation errors are proved to be ultimately uniformly bounded by using strict positive real method and Lyapunov stability theory. An adaptive neural network-based hybrid position/force controller was then proposed based on the observed velocities to guarantee stability of closed-loop system and achieve a certain tracking performance. By using Lyapunov stability theory, it was proved that all the signals of the closed-loop system were ultimately uniformly bounded. Finally, the feasibility and effectiveness of the proposed neural network observer-based position/force control scheme were demonstrated by the simulation on a two-link manipulator.