Research on Real-Time Joint Stiffness Conﬁguration of a Series Parallel Hybrid 7-DOF Humanoid Manipulator in Continuous Motion

: In this paper, the real-time joint stiffness conﬁguration strategy of a series parallel hybrid 7-DOF (degree of freedom) humanoid manipulator with ﬂexible joints in continuous motion is studied. Firstly, considering the potential human robot accidental collision, combined with the manipulator safety index (MSI) and human body injury thresholds, the motion speed and joint stiffness of the robot are optimized in advance. Secondly, using hyperbolic tangent function for reference, the relationship between joint torques and passive joint deﬂection angles of the robot is given, which is beneﬁcial for the real-time calculation of joint stiffness and obtain reasonable joint stiffness. Then, the structural model of the selected humanoid manipulator is described, on this basis, the relationship between the joint space stiffness and the Cartesian space stiffness of the humanoid manipulator is analyzed through Jacobian matrix, and the results show that the posture and joint space stiffness of the humanoid manipulator directly affect the Cartesian space stiffness of the humanoid manipulator. Finally, according to whether the humanoid manipulator works in the human-robot interaction environment, the real-time joint stiffness conﬁguration of the humanoid manipulator in continuous motion is simulated and analyzed. The research shows that the humanoid manipulator with ﬂexible joints can adjust the joint stiffness in real-time during continuous motion, and the joint stiffness conﬁguration strategy can effectively improve the safety of human body in human-robot collision. In addition, in application, when the joint space stiffness of the robot is lower, the position accuracy can be improved by trajectory compensation.


Introduction
The research of humanoid manipulators is important in the field of robotics. Compared with general humanoid manipulators, the humanoid manipulator with flexible joints is more anthropomorphic and has important research value [1][2][3]. A key problem within the research of the humanoid manipulator with flexible joints concerns the configuration of the stiffness of each joint in real-time during the continuous motion of the humanoid manipulator.
At present, the main research object within humanoid manipulators is mostly the serial redundant manipulator [4][5][6][7]. Although the serial redundant manipulator can accomplish many complex tasks flexibly, its mechanism is still very different from that of the human arm. Research of human arm movements has confirmed that the mechanism of the human arm is a series parallel hybrid mechanisms. The series of parallel hybrid mechanisms combines the advantages of the series mechanism and the parallel mechanism, and has large workspace and high dynamic performance [8][9][10]. The SEA (Series Elastic Actuators) was proposed by Pratt et al. in 1995 [11]. Since then, many researchers have begun to study variable stiffness actuators with a view to apply this to the joints of robots. Nowadays, the typical variable stiffness actuators are VSA (variable stiffness joint actuator) [12], AMASC (actuator with mechanically adjustable series compliance) [13], pVSJ (passive variable stiffness joint) [14], etc. [15][16][17][18]. Although research of variable stiffness joint actuators is increasing, research on robots with flexible joints is not yet at a mature stage.
Many researchers have laid the foundation for the research of humanoid manipulator based on flexible joints. It is known that the human arm has good joint flexibility, redundant mechanism, and surface contact flexibility, so that it can flexibly and safely complete many complex tasks. Assuming that the humanoid manipulator is a serial parallel hybrid 7-DOF manipulator, and the stiffness of each joint can be changed continuously, compared with the serial redundant manipulator and the manipulator of the rigid joint, the humanoid manipulator and the human arm have more in common. The joint flexibility of the human arm is adjusted passively according to its' needs, while the joint flexibility of the humanoid manipulator in continuous motion can be configured actively according to the working environment.
The working environment of a robot can be roughly divided into the environment of no interference and the environment of human robot interaction. In the environment of no interference, there is no need to worry about the harm of robot movement to human bodies; in the environment of human robot interaction, it is very important to ensure the safety of the human body. In 2016, the international organization for standardization (ISO) issued the ISO/TS 15,066 technical standard, which provides technical guidance for operators to ensure their safety when working with robots [19,20]. In the human-robot interaction environment, it is very likely that there will be accidental collisions between robots and humans. Many researchers have studied how to avoid these human-robot collisions [21,22], which is important, but it is equally important to reduce injuries sustained to the human body in the event of accidental collision. The flexible joint manipulator can adjust the stiffness of each joint in real-time to meet environmental requirements. Therefore, it is necessary to study how we might reduce the collision force by adjusting the joint stiffness of the humanoid manipulator.
Michael Melia et al. conducted special research on collisions between cooperative robots and human bodies, and obtained the threshold of pain in various parts of the human body when subjected to force and pressure [23,24]. According to this research, when the human and robot collide accidentally, the force on the human body should be lower than the pain threshold to ensure that the human body is safe. In addition, Antonio Bicchi et al. studied the collision problem between a single joint flexible robot and human head, and adopted HIC (Head Injury Criterion) as the injury index of human-robot collision [25][26][27]. The smaller the HIC is, the safer the human body is. On this basis, Ki Hong Kim and others proposed MSI to predict the injury of human-robot collision [28]. The above research can provide theoretical support for the evaluation of human-robot collision injury. It was found that the velocity of the robot and the stiffness of the human robot contact surface both play an important role in the safety of human-robot collisions. Therefore, in the humanrobot interaction environment, we can use the above research for reference to predict and evaluate the safety of human-robot collisions, and establish the joint stiffness configuration strategy to obtain the real-time joint stiffness of the humanoid manipulator in continuous motion, so as to ensure the safety of the human body.
In this paper, the real-time joint stiffness configuration strategy of a serial parallel hybrid 7-DOF humanoid manipulator is studied. In Section 2, the real-time joint stiffness configuration strategy of the humanoid manipulator is established and the structural model of the selected humanoid manipulator is described. In Section 3, the relationship between the joint space stiffness and the Cartesian space stiffness of the humanoid manipulator is analyzed. In Section 4, the joint stiffness real-time configuration of the humanoid manipulator in the environment of robot working alone and human robot interaction is simulated and analyzed, and the feasibility of the proposed method is verified. Finally, the summary of the research work and the prospect of the future work are given.

Real-Time Joint Stiffness Configuration Strategy
The working environment of the robot can be divided into two kinds: working alone away from human bodies and working in the human-robot interaction environment. When the robot works far away from the human body, its movement will not cause subsequent harm, so the accuracy of the robot should be guaranteed when the robot performs tasks such as grasping or placing. When the robot works in the human-robot interaction environment, there is a risk of accidental collision with the human body, so it is necessary to take prevention and protection strategies to prevent the human body from being injured.
According to the research of Michael Melia et al. [23,24] on the collision data between cooperative robot and human bodies, the pain threshold of each part of the human body is about 150 N. When the human body feels pain, the energy transfer during human-robot collision [19,20] is as follows: where, F c is the force on the human body in human-robot collision; K is the stiffness of the human robot contact surface; m T is the converted mass of the whole system in human-robot collision; v R is the relative motion speed of the human and the robot, and the unit is m/s.
where, m H is the effective mass of human body, m R is the effective mass of the humanoid manipulator.
Ki Hong Kim et al. [28] and others put forward the manipulator safety index (MSI), which is used to predict the injury of human-robot collision. The Equation is as follows: In addition, ∆T is the time interval, and ∆T is fixed as either 15 or 36 ms, and T c is the duration of the collision, T c = 2π/w n ; A and w n are constants, and w n = m R +m H m R m H K; K is the same as in Equation (1).
It can be seen that in human-robot collision, whether considering the pain threshold of the human body or the manipulator safety index, the safety of human body is related to the comprehensive surface contact stiffness K and the relative velocity v R of human and robot. The larger the comprehensive surface contact stiffness K and the relative velocity v R , the greater the force of human-robot collision, and vice versa. Similarly, we know that the larger the comprehensive surface contact stiffness K and the relative velocity v R in human-robot collision, the shorter the collision time. In order to reduce human injury in human-robot collision, it is necessary to increase the buffer time in collision. Therefore, the smaller the comprehensive surface contact stiffness K and the relative velocity v R are, the safer the human body is.
Thus, in the continuous motion of the robot, we can protect the human body from being injured in the human-robot collision by optimizing the comprehensive surface contact stiffness K and the relative velocity v R . In this case, both conditions are satisfied at the same time, that is, the force of the human-robot collision is not higher than the human body Appl. Sci. 2021, 11, 2433 4 of 21 injury thresholds, and the safety index MSI is less than MSI max . The conditional equation is as follows: (5) where F cmax is the maximum force that human can bear when human body is not injured in human-robot collision, F cmax = 150N; MSI max is the maximum of the safety index, and MSI max = 10. For the robot with flexible joints, the joint space stiffness of the robot will affect the comprehensive surface contact stiffness in human-robot collision. Therefore, by adjusting the joint space stiffness of the robot in real-time, the safety of human-robot collision can be improved in the human-robot interaction environment. The joint space stiffness of the robot is related to the joint torque and the passive joint deflection angle. In order to maintain the motion stability of the robot, the closer the joints are to the base coordinate system, a greater the stiffness of joints is required. And when the joint torque is too large, the passive joint deflection angle should be controllable.
According to the above requirements, referring to the hyperbolic tangent function, the relation equation between the joint torque τ and the passive joint deflection angle ∆θ of the robot is proposed as follows: where, for 7-DOF humanoid manipulator with flexible joints, a and b are 7 × 1 parameter matrices respectively, which can be determined according to the working environment of the humanoid manipulator; the joint torque τ and the passive joint deflection angle ∆θ are 7 × 1 matrices respectively. The relationship curves between the joint torque and the passive joint deflection angle of the humanoid manipulator are S-shaped curve. For example, we assign values to a and b, if    a = 50 π , 45 π , 40 π , 35 π , 55 π , 60 π , 65 π T b = 5 × 10 −4 , 4.5 × 10 −4 , 4 × 10 −4 , 3.5 × 10 −4 , 5.5 × 10 −4 , 6 × 10 −4 , 6.5 × 10 −4 T , then the relationship curve between the joint torque and the passive joint deflection angle of the humanoid manipulator is shown in Figure 1. It can be seen from Figure 1 that according to the given parameter matrices a and b , no matter what the joint torque of the humanoid manipulator is, the passive joint deflection angle will always be limited in a certain range. When the joint torque is small, the relationship between the joint torque and the passive joint deflection angle is approximately linear, in this case, the joint space stiffness is basically constant. When the joint torque is large, the passive deflection angle of the joint has little change with the increase deflection angle will always be limited in a certain range. When the joint torque is small, the relationship between the joint torque and the passive joint deflection angle is approximately linear, in this case, the joint space stiffness is basically constant. When the joint torque is large, the passive deflection angle of the joint has little change with the increase of the joint torque, and the joint space stiffness gradually increases. The relationship curve meets the motion stability requirements of the humanoid manipulator.
In addition, the joint torque τ is calculated as follows: where J T is the force Jacobian matrix and F is the force/torque on the end effector of the robot. According to Equations (6) and (7), the calculation equation of the joint space stiffness of the humanoid manipulator can be obtained.
Then the joint stiffness matrix of the humanoid manipulator is as follows: Based on the above method, if the humanoid manipulator works close to a human, considering the safety of human-robot collision, the flow chart of joint stiffness configuration strategy is shown in Figure 2.
As shown in Figure 2, in the joint stiffness configuration strategy, we optimize the motion planning time T m of the humanoid manipulator through the estimated collision force F c , so as to obtain the reasonable motion speed v R of the humanoid manipulator. The comprehensive surface contact stiffness K between the humanoid manipulator and human body is optimized by the safety index MSI. The motion planning time T m and constant A in the motion of the humanoid manipulator are given on the condition that the estimated collision force F c and the safety index MSI are met at the same time. Then the real-time joint stiffness in the motion of the humanoid manipulator is obtained according to Equations (6)-(8).

Structural Model of the Humanoid Manipulator
In order to study the real-time joint stiffness configuration strategy of flexible joint robots in continuous motion, a series parallel hybrid 7-DOF humanoid manipulator model with variable stiffness joints is proposed to verify the feasibility of the proposed method through simulation analysis. Compared with the general series of commercially available humanoid robots, the humanoid manipulator model has better anthropomorphic characteristics in configuration.
The humanoid manipulator consists of a 3-DOF shoulder joint, 2-DOF elbow joint, and 2-DOF wrist joint. The shoulder joint is composed of a 1-DOF revolute joint and an orthogonal 2-DOF parallel mechanism; elbow joint and wrist joint are respectively composed of an orthogonal 2-DOF parallel mechanism. The three joints are connected in series. The joints of the humanoid manipulator are flexible, and the joint stiffness can be changed continuously. The range of joint stiffness is [1000, ∞], and the unit is Nm/rad. The structural model and the mechanism diagram of the humanoid manipulator are shown in

Structural Model of the Humanoid Manipulator
In order to study the real-time joint stiffness configuration strategy of flexible joint robots in continuous motion, a series parallel hybrid 7-DOF humanoid manipulator model with variable stiffness joints is proposed to verify the feasibility of the proposed method through simulation analysis. Compared with the general series of commercially available humanoid robots, the humanoid manipulator model has better anthropomorphic characteristics in configuration. orthogonal 2-DOF parallel mechanism; elbow joint and wrist joint are respectively composed of an orthogonal 2-DOF parallel mechanism. The three joints are connected in series. The joints of the humanoid manipulator are flexible, and the joint stiffness can be changed continuously. The range of joint stiffness is   1000, , and the unit is Nm/ rad . The structural model and the mechanism diagram of the humanoid manipulator are shown in Figure 3. The relevant structure parameters and workspace of the humanoid manipulator are shown in Appendix A.

The Joint Space Stiffness and the Cartesian Stiffness
The relationship between the joint space stiffness and the Cartesian stiffness [29,30] of the humanoid manipulator is as follows: where p K is the Cartesian stiffness matrix of 6 × 6; θ K is the joint space stiffness diagonal matrix of 7 × 7, and each diagonal term represents the stiffness of the corresponding joint; J is the Jacobian matrix of 6 × 7, which is derived from the forward kinematics of the humanoid manipulator.
Because the Cartesian stiffness matrix is not a diagonal matrix, it is difficult to directly estimate the Cartesian space stiffness of the humanoid manipulator through this matrix. Therefore, the generalized displacement of the end effector of the humanoid manipulator is used to evaluate the Cartesian space stiffness. The relevant structure parameters and workspace of the humanoid manipulator are shown in Appendix A.

The Joint Space Stiffness and the Cartesian Stiffness
The relationship between the joint space stiffness and the Cartesian stiffness [29,30] of the humanoid manipulator is as follows: where K p is the Cartesian stiffness matrix of 6 × 6; K θ is the joint space stiffness diagonal matrix of 7 × 7, and each diagonal term represents the stiffness of the corresponding joint; J is the Jacobian matrix of 6 × 7, which is derived from the forward kinematics of the humanoid manipulator. Because the Cartesian stiffness matrix is not a diagonal matrix, it is difficult to directly estimate the Cartesian space stiffness of the humanoid manipulator through this matrix. Therefore, the generalized displacement of the end effector of the humanoid manipulator is used to evaluate the Cartesian space stiffness.
where ∆p is the generalized displacement of the end effector of the humanoid manipulator, ∆p = ∆x, ∆y, ∆z, ∆θ x , ∆θ y , ∆θ z T ; F is the force/torque on the end effector of the humanoid Assuming that the gravitational load is 1 kg, and the coordinate of the center of gravity of the load relative to the coordinate system of the end effector is (30, 50, −40), the unit is millimeter. The relevant calculation equations of the force/torque of gravitational load acting on the end effector are given in Appendix B. The joint angle of the series parallel hybrid 7-DOF humanoid manipulator is q = − π 3 , − π 6 , π 18 , − 7π 18 , π 36 , − π 36 , − π 9 T . Three kinds of joint space stiffness of the humanoid manipulator are given as follows:    K θl = diag 10 4 , 10 4 , 10 4 , 10 4 , 10 4 , 10 4 , 10 4 K θm = diag 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 K θh = diag 10 5 , 10 5 , 10 5 , 10 5 , 10 5 , 10 5 , 10 5 , the unit is Nm/rad. Then the Cartesian space stiffness of the humanoid manipulator with different joint space stiffness is compared by comparing the generalized displacement of the end effector of the humanoid manipulator, as shown in Assuming that the gravitational load is 1 kg, and the coordinate of the center of gravity of the load relative to the coordinate system of the end effector is   10 ,10 ,10 ,10 ,10 ,10 ,10 5 10 ,5 10 ,5 10 ,5 10 ,5 10 ,5 10 ,5 10 10 ,10 ,10 ,10 ,10 ,10 ,10 Then the Cartesian space stiffness of the humanoid manipulator with different joint space stiffness is compared by comparing the generalized displacement of the end effector of the humanoid manipulator, as shown in Figure 4.  It can be seen from Figure 4 that when the humanoid manipulator has the same posture and load, the change of the joint space stiffness will affect the generalized displacement of the end effector, that is, the Cartesian space stiffness of the humanoid manipulator is directly related to the joint space stiffness of the humanoid manipulator. The smaller the joint space stiffness is, the better the overall flexibility of the humanoid manipulator. In this case, the generalized displacement of the end effector is larger when the same force/torque is applied to the end effector, and vice versa. Therefore, in the human robot It can be seen from Figure 4 that when the humanoid manipulator has the same posture and load, the change of the joint space stiffness will affect the generalized displacement of the end effector, that is, the Cartesian space stiffness of the humanoid manipulator is directly related to the joint space stiffness of the humanoid manipulator. The smaller the joint space stiffness is, the better the overall flexibility of the humanoid manipulator. In this case, the generalized displacement of the end effector is larger when the same force/torque is applied to the end effector, and vice versa. Therefore, in the human robot interaction, the safety of human robot interaction may be improved by adjusting the joint space stiffness of the humanoid manipulator in real-time.
Assuming that the gravitational load on the end effector of the humanoid manipulator is the same as above, the joint space stiffness of the series parallel hybrid 7-DOF humanoid manipulator is K θ = diag 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , 5 × 10 4 , the unit is Nm/rad. Because the humanoid manipulator is redundant, there will be multiple inverse kinematics solutions for the same position and pose of the end effector. We select three groups of different joint output angles, as shown below. Based on the above, the generalized displacements of the end effector of the humanoid manipulators with different joint output angles are compared, as shown in Figure 5. oid manipulators with different joint output angles are compared, as shown in Figure 5.
It can be seen from Figure 5 that when the humanoid manipulator has the same joint space stiffness and the same force/torque is applied to the end effector, if the joint output angles of the humanoid manipulator are different, the Cartesian space stiffness of the humanoid manipulator is also different. Perhaps the desired Cartesian space stiffness can be obtained by selecting the appropriate inverse kinematics solution of the humanoid manipulator.

Simulation Analysis
Since the joint space stiffness of the humanoid manipulator can be adjusted in real-time, the joint space stiffness will directly affect the Cartesian space stiffness of the humanoid manipulator. Therefore, according to the above proposed real-time joint stiffness configuration strategy, we can adjust the joint space stiffness of the humanoid manipulator in real-time according to the working environment, so as to ensure that the humanoid manipulator can work normally and will not cause harm to the human body in the event of accidental collision.

In the Environment where the Robot Works Alone
When the humanoid manipulator works alone, in order to ensure the operation accuracy, we hope that the generalized displacements of the end effector of the humanoid It can be seen from Figure 5 that when the humanoid manipulator has the same joint space stiffness and the same force/torque is applied to the end effector, if the joint output angles of the humanoid manipulator are different, the Cartesian space stiffness of the humanoid manipulator is also different. Perhaps the desired Cartesian space stiffness can be obtained by selecting the appropriate inverse kinematics solution of the humanoid manipulator.

Simulation Analysis
Since the joint space stiffness of the humanoid manipulator can be adjusted in real-time, the joint space stiffness will directly affect the Cartesian space stiffness of the humanoid manipulator. Therefore, according to the above proposed real-time joint stiffness configuration strategy, we can adjust the joint space stiffness of the humanoid manipulator in real-time according to the working environment, so as to ensure that the humanoid manipulator can work normally and will not cause harm to the human body in the event of accidental collision.

In the Environment where the Robot Works Alone
When the humanoid manipulator works alone, in order to ensure the operation accuracy, we hope that the generalized displacements of the end effector of the humanoid manipulator are within a certain range, and when the end effector is suddenly subjected to a large force/torque, the generalized displacements of the end effector will not be so large that it will cause the humanoid manipulator to vibrate. Therefore, it is necessary to adjust joint space stiffness according to the real-time joint torque of the humanoid manipulator, to control the Cartesian space stiffness in real-time.
Assuming that the gravitational load is 3 kg, and the coordinate of the center of gravity of the load relative to the coordinate system of the end effector is (30, 50, −40), the unit is millimeter. The starting point and end point of the end effector of the humanoid manipulator are P A = (300, −500, 700, 30, −100, 160) and P B = (900, 100, 300, 40, −80, 120), and the units of position and Euler angle are millimeter and degree, respectively. The path planning is based on quintic polynomial, and the running time is set to 5 s. The joint torque τ and the passive joint deflection angle ∆θ of each joint conforms to the hyperbolic tangent relation equation, and a i = 50 π , b i = 5 × 10 −5 , i = 1 · · · 7. The real-time situation of force/torque on the end effector, the joint space stiffness, etc., of the humanoid manipulator are shown in Figures 6-8    From the above simulation, it can be seen that under the action of gravitational load, due to the position and posture of the humanoid manipulator change in real-time in the process of motion, the force/torque on the end effector of the humanoid manipulator changes in real-time. The real-time variation trend of each joint stiffness is consistent with that of each joint torque during the movement of the humanoid manipulator. However, as the joint torque increases, the real-time variation curve of each joint stiffness becomes steeper, which is beneficial to maintaining the stability of the movement of the humanoid manipulator. By controlling the real-time stiffness of each joint, the generalized displacements of the end effector of the humanoid manipulator can be very small, which does not affect the repeated positioning accuracy of the humanoid manipulator when it works alone. From the above simulation, it can be seen that under the action of gravitational load, due to the position and posture of the humanoid manipulator change in real-time in the process of motion, the force/torque on the end effector of the humanoid manipulator changes in real-time. The real-time variation trend of each joint stiffness is consistent with that of each joint torque during the movement of the humanoid manipulator. However, as the joint torque increases, the real-time variation curve of each joint stiffness becomes steeper, which is beneficial to maintaining the stability of the movement of the humanoid manipulator. By controlling the real-time stiffness of each joint, the generalized displacements of the end effector of the humanoid manipulator can be very small, which does not affect the repeated positioning accuracy of the humanoid manipulator when it works alone.

In the Environment of Human-Robot Interaction
When the humanoid manipulator moves in the environment of human-robot interaction, it may have an accidental collision with the human. In order to reduce injuries caused by accidental collision, it is necessary to adopt the real-time joint stiffness configuration strategy to reduce the injury to human body in collision.
Assuming that the humanoid manipulator is in human-robot interaction environment, human-robot accidental collision may occur at any time, and the collision direction is opposite to the motion direction of the humanoid manipulator. The effective mass of the humanoid manipulator is 20 , and considering the weight of the head of the adult human body, the effective mass of the human body is 10 . The setting of gravitational load and motion path of the humanoid manipulator are the same as that of the humanoid manipulator working alone. The joint torque τ and the passive deflection angle Δθ of each joint conform to the hyperbolic tangent relation equation.
According to the above motion planning, the motion speed of the end effector of the humanoid manipulator in the base coordinate system is known in real-time. Since the opposite direction of this velocity is the human-robot collision direction, the collision direction vector in the base coordinate system is calculated as follows: ,, The direction vectors of each axis of the end effector coordinate system of the humanoid manipulator in the base coordinate system are calculated as follows:

In the Environment of Human-Robot Interaction
When the humanoid manipulator moves in the environment of human-robot interaction, it may have an accidental collision with the human. In order to reduce injuries caused by accidental collision, it is necessary to adopt the real-time joint stiffness configuration strategy to reduce the injury to human body in collision.
Assuming that the humanoid manipulator is in human-robot interaction environment, human-robot accidental collision may occur at any time, and the collision direction is opposite to the motion direction of the humanoid manipulator. The effective mass of the humanoid manipulator is m R = 20 kg, and considering the weight of the head of the adult human body, the effective mass of the human body is m H = 10 kg. The setting of gravitational load and motion path of the humanoid manipulator are the same as that of the humanoid manipulator working alone. The joint torque τ and the passive deflection angle ∆θ of each joint conform to the hyperbolic tangent relation equation.
According to the above motion planning, the motion speed of the end effector of the humanoid manipulator in the base coordinate system is known in real-time. Since the opposite direction of this velocity is the human-robot collision direction, the collision direction vector in the base coordinate system is calculated as follows: The direction vectors of each axis of the end effector coordinate system of the humanoid manipulator in the base coordinate system are calculated as follows: The direction cosines of the collision direction vector and each axis of the end effector coordinate system are calculated as follows: cos(n c , n x ) = n c · n x |n c | · |n x | (18) Similarly, direction cosines cos n c , n y and cos(n c , n z ) can be obtained. The collision forces on the end effector of the humanoid manipulator in X, Y, and Z directions are calculated as follows: Considering the gravitational load in real-time motion, the real-time force/torque of the end effector of the humanoid manipulator are calculated as follows: (20) where G x , G y and G z are the components of the gravitational load in the coordinate system of the end effector of the humanoid manipulator; T gx , T gy , and T gz are respectively the torque exerted by gravitational load on each direction of the end effector of the humanoid manipulator.
According to the joint stiffness configuration strategy, take A = 0.3 and A = 0.5 respectively, the relevant important indicators during the motion are shown in Table 1. It can be seen from Table 1 that the smaller the stiffness of the contact surface during the human-robot collision, the longer the collision time T c , and the greater the movement speed of the humanoid manipulator that can be allowed to ensure that the human body is not injured.
It is assumed that the stiffness of the human body surface is K H = 50, 000N/m, if the comprehensive surface contact stiffness K between the humanoid manipulator and human body is known, then the surface stiffness K R of the humanoid manipulator in the collision direction is calculated as follows: The parameter matrices a and b in Equation (6) need to be reasonable. Assuming that a i = 50 π , i = 1 · · · 7, we obtain the parameter matrix b according to the surface contact stiffness K R of the humanoid manipulator. As shown in Table 2, if the constant A is different, the surface contact stiffness K R of the humanoid manipulator and the force F y of the end effector in Y direction are different. ∆y is the expected translational displacement of the end effector in Y direction, we try to obtain the reasonable parameter matrix b through trial and error method, then the actual translational displacement of the end effector in Y direction is ∆y ≈ ∆y .         It can be seen from Figures 9 and 10 that after adopting the real-time joint stiffness configuration strategy, the force on the end effector is controlled within a certain range, and the collision force will not cause harm to the human body. Meanwhile, the value of real-time MSI is far less than max MSI . As can be seen from Figures 11 and 12, compared with the humanoid manipulator working alone, in the human-robot interaction environment, the stiffness of each joint of the humanoid manipulator is smaller, and the overall flexibility of the humanoid manip- As can be seen from Figures 11 and 12, compared with the humanoid manipulator working alone, in the human-robot interaction environment, the stiffness of each joint of the humanoid manipulator is smaller, and the overall flexibility of the humanoid manipulator is better, which means that the human body is safer in a human-robot collision.
It is assumed that if there is no real-time stiffness configuration strategy, then the surface contact stiffness of the robot is set as K R = 10 5 N/m. According to Equations (1) and (3), in case of accidental collision, the comparison of results with and without real-time joint stiffness configuration strategy is shown in Table 3. It can be seen from Table 3 that the real-time joint stiffness configuration strategy can improve human safety in human-robot collision.
In practical applications, such as robot grasping or placing tasks, the lower joint stiffness of the robot will affect its position accuracy. Therefore, a position compensation method is needed to improve the accuracy of the robot.
Suppose that the desired trajectory of the robot is P e , the flexible deformation of the end effector due to the low joint stiffness of the robot is δP, and the compensation for the trajectory is δP c , then the real trajectory of the robot is calculated as follows: According to the above desired trajectory, the real-time position error without compensation is shown in Figure 13a, and the position error after trajectory compensation is shown in Figure 13b. It can be seen from Figure 13 that the position error of the end effector after trajectory compensation is less than 0.1mm, which does not affect the robot's grasping and placement tasks.
In addition, in the application of the joint stiffness configuration strategy, if the robot is mobile, the speed of the robot itself and the speed of the mobile car should be considered simultaneously in the human-robot collision.

Conclusions
In this paper, the real-time joint stiffness configuration strategy of a series of parallel hybrid 7-DOF humanoid manipulators with flexible joints in continuous motion is studied. We find that the change of the joint space stiffness or the posture of the humanoid It can be seen from Figure 13 that the position error of the end effector after trajectory compensation is less than 0.1mm, which does not affect the robot's grasping and placement tasks.
In addition, in the application of the joint stiffness configuration strategy, if the robot is mobile, the speed of the robot itself and the speed of the mobile car should be considered simultaneously in the human-robot collision.

Conclusions
In this paper, the real-time joint stiffness configuration strategy of a series of parallel hybrid 7-DOF humanoid manipulators with flexible joints in continuous motion is studied. We find that the change of the joint space stiffness or the posture of the humanoid manipulator can directly affect the Cartesian space stiffness of the humanoid manipulator. The hyperbolic tangent relation equation between the joint torque and the passive joint deflection angle of the humanoid manipulator is proposed, which is beneficial for realtime calculation of joint stiffness and obtaining reasonable joint stiffness. According to the working environment of the humanoid manipulator, the joint stiffness configuration strategy of the humanoid manipulator in continuous motion is given. When the humanoid manipulator works alone, the joint space stiffness will be larger to ensure the working accuracy of the humanoid manipulator in Cartesian space. When the humanoid manipulator works in the human-robot interaction environment, in order to prevent the human body from being injured in human robot accidental collision, we consider the manipulator safety index and human injury threshold, and the motion speed and joint stiffness of the humanoid manipulator are optimized in advance. The simulation results show that the joint stiffness configuration strategy can effectively improve the safety of the human body in human-robot collision, and different parameters will affect the flexibility of the humanoid manipulator. In addition, in application, when the joint space stiffness of the robot is lower, the position accuracy can be improved by trajectory compensation, and the position error of the end effector after trajectory compensation is less than 0.1 mm.
In the future, we will focus on the relationship between anthropomorphic motion and joint space stiffness of the humanoid manipulator. In addition, the application and improvement of the joint stiffness configuration strategy is our concern. We hope that the strategy can be applied to mobile as well as static robots.

Conflicts of Interest:
The authors declare that there are no conflicts of interest.

Appendix A. Structure Parameters of the Humanoid Manipulator
The mechanism diagram of the humanoid manipulator is shown in Figure A1. Based on the research on the range of motion of each joint of the human arm [31][32][33], the posture angle ranges of each motion platform of the humanoid manipulator are shown in Table A1.

Conflicts of Interest:
The authors declare that there are no conflicts of interest.

Appendix A. Structure Parameters of the Humanoid Manipulator
The mechanism diagram of the humanoid manipulator is shown in Figure A1. Based on the research on the range of motion of each joint of the human arm [31][32][33], the posture angle ranges of each motion platform of the humanoid manipulator are shown in Table A1. By calculation, the input angle range of each joint of the humanoid manipulator are shown in Table A2. As shown in Figure A1, the size of the humanoid manipulator is given as follows. According to the forward kinematics, the workspace of the end effector of the humanoid manipulator is shown in Figure A2.
As shown in Figure A1, the size of the humanoid manipulator is given as follows. According to the forward kinematics, the workspace of the end effector of the humanoid manipulator is shown in Figure A2.