Multimode Design and Analysis of an Integrated Leg-Arm Quadruped Robot with Deployable Characteristics

To improve locomotion and operation integration, this paper presents an integrated leg-arm quadruped robot (ILQR) that has a reconfigurable joint. First, the reconfigurable joint is designed and assembled at the end of the leg-arm chain. When the robot performs a task, reconfigurable configuration and mode switching can be achieved using this joint. In contrast from traditional quadruped robots, this robot can stack in a designated area to optimize the occupied volume in a nonworking state. Kinematics modeling and dynamics modeling are established to evaluate the mechanical properties for multiple modes. All working modes of the robot are classified, which can be defined as deployable mode, locomotion mode and operation mode. Based on the stability margin and mechanical modeling, switching analysis and evaluation between each mode is carried out. Finally, the prototype experimental results verify the function realization and switching stability of multimode and provide a design method to integrate and perform multimode for quadruped robots with deployable characteristics.


Introduction
Quadruped robots can replace humans in some certain or dangerous environments, such as toxic, high-temperature, and high-pressure environments, to complete tasks and improve the safety of industrial production [1].Because of its good terrain adaptability and carrying ability, this kind of robot has a wide range of applications in deep space exploration and military reconnaissance.
In recent years, research on quadruped robots has mainly focused on practical applications [2,3].Compared with motion characteristics, manipulability is of greater concern to researchers.Because hexapod robots have six legs, scholars can directly convert two or three of the legs into operation arms through the foot end design.However, in contrast to hexapod robots, quadruped robots have a smaller number of legs.
To realise the manipulability of a quadruped robot, the method for installing an operation arm on the robot body is adopted.The earliest robot with an operation arm [4,5] is composed of a movable base and an operation arm connected with it.The base can be moved by wheels, rails or mechanical legs, and the operation arm can achieve fast and accurate operation.BigDog [6] and SpotMini robots [5] with operation arms developed by Boston Dynamics have two or three degrees of freedom operation arms installed on the fuselage, but the operation arms increase the fuselage mass and affect the stability of fuselage motion.Additionally, the leg of a multilegged walking robot can act as an operation arm.Kato and Hirose [7] of the Tokyo Institute of Technology developed a quadruped robot, TITAN-IX, which can not only walk normally but it can also operate with the foot end and automatically change the foot end tools.The extra-terrestrial exploration robot, ATHLETE [8,9], developed by NASA can quickly install and replace different tools on the side of each foot end wheel to achieve different operation functions.ETH's quadruped robot [10,11] was equipped with a six-degree-of-freedom manipulator and realised stable walking while tracking the arm position.The IIT [12], VT [13], and legged research institutions have carried out research in this field.
The combination of a movable robot base and an operation arm has redundant degrees of freedom, which can perform multiple motion tasks.However, it also poses challenges to motion stability and control.When manipulability is realised by the above methods, the following problems will occur: (a) The configured operation arms or chains are arranged and stored when the robot is nonworking so that the robot can reduce the structural complexity.(b) The manipulator, as an operation arm, can increase the body mass.When the robot performs tasks, the operation arm will produce a large torque, which will bring problems to the dynamic stability.(c) The existence of redundant degrees of freedom increases the complexity of motion control, and the coordinated control of multiple chains in the robot is challenging.
In addition, for some specific occasions, such as the size limitation of the transport device, the robot needs to occupy a small space and be light in weight so that it is easy to carry and transport.From the perspective of robot configuration, each leg or chain is composed of several links in series form.If the robot is used in some occasions where the structure size is large, the structure size and the number of its own links will be increased, which is not conducive to the transport of the robot.Meanwhile, when the robot integrates the locomotion and operation functions, it can be regarded as a kind of mode reconfigurable robot.Carrying out mode reconfiguration and mode switching needs to be researched further.In addition, the difficulty of solving the mechanical balance analysis and control analysis will be affected when the operation arm is configured on the basis of the quadruped robot.Therefore, the difficulties in solving these problems lie in carrying out a deployable design on the basis of the integration of locomotion and operation functions of the robot, optimising the volume occupied by the robot in a nonworking state, and improving the efficiency of its carrying and transportation.In the working state, the robot can complete locomotion and operation tasks after deployment.That is, the robot has the integrated functions of deployment, locomotion and operation.
Another key problem for this kind of robot is having to solve the switching strategy between the modes and functions and determine the switching mode and configuration of each mode.Scholars have performed many studies on the multimode and multifunction switching of robots.Tian et al. [14] proposed a four-arm parallel mechanism, which can realise the four operation modes, translation, plane, rotation and locking.These modes are switched by controlling their singular positions.Nurahmi et al. [15] studied the reconstruction of a 3-(rR)PS metamorphic parallel mechanism based on a complete workspace and working mode analysis.The mechanism consists of three (rR)PS legs, and each (rR) joint consists of two vertical revolute joints.By changing the direction of the reconfigurable (rR) joint, the mechanism can be divided into three different configurations.The constraint equation is derived by the algebraic geometry method, and the main decomposition is calculated in each configuration to obtain different operation modes of each configuration.Inbar et al. [16] introduced a reconfigurable field robot that can climb circular and rectangular pipes.The robot is equipped with two mechanisms, allowing it to change the width and height and move its centre of mass to adapt to the size of the pipe.According to the geometry, configuration, centre of mass position, pipe diameter and the robot's coefficient of friction, force analysis is carried out, and the strategies of driving, climbing and switching between the two modes are formulated.Han et al. [17][18][19] introduced a reconfigurable legged mobile lander (ReLML) with modes from tuning and landing to r\text{OA}ming.Based on the invented metamorphic variable axis rotary hinge, ReLML is able to switch between three modes and two actuation states.Nan et al. [20] proposed the design of a reconfigurable robotic leg that can switch seamlessly between springsuspended and unsuspended configurations.Switching is achieved by crossing the singularity of the legs.Through literature analysis, when the robot performs mode switching, it is usually determined according to the configuration characteristics corresponding to each mode.Additionally, during mode switching, the overall motion stability of the robot should always be maintained to ensure the reliability and continuity of work.
To improve the manipulability performance of quadruped robots, this paper focuses on designing a quadruped robot that integrates locomotion and operation functions and studying the mode switching and manipulability of the robot.Meanwhile, the deployable design of each chain is carried out to optimise the occupying volume when the robot is in a nonworking state.This paper is organised as follows: In Section 2, the reconfigurable joint and the ILQR structure are presented, and three working modes are classified in detail.The kinematics modelling and dynamics modelling of the ILQR are established in Section 3. Based on the dynamic analysis and the stability margin, the mechanical manipulability and switching evaluation are studied in Section 4 and Section 5.The corresponding prototype experiment is carried out in Section 6.

ILQR Structure
Figure 1 shows four configurations of the integrated legarm quadruped robot.From Figure 1(a-b), the structure of the robot contains a platform and four chains, and each chain can fold in a certain area.Through the rotation of each actuation joint, the configuration of the robot can be converted from a folded position to an unfolded position.After the robot is standing, it can perform two working modes: locomotion mode and operation mode.In locomotion mode, every chain serves as a leg, and the robot moves with the gait of quadruped walking.When the robot performs an operation task, one of the chains becomes an arm through the reconfigurable joint.The remained three chains are continue to serve as the legs to support the body of the robot.The configurations of the locomotion mode and operation mode are shown in Figure 1(c-d) respectively.

Reconfigurable Joint
As described in Figure 1, the ILQR structure contains a platform and four chains.In this robot, one chain contains a reconfigurable joint in which the reconfigurable joint is assembled at the end of the chain.The other three chains are identical and have no reconfigurable joints.Each chain contains four actuation joints (A, B, C, D), as shown in Figure 2(a).When the robot is walking, the chains are supported on the ground by the end of the joint.
In Figure 2(b), the reconfigurable joint consists of two gear trains, two grippers and two motors.Grippers 1 and 2 are fixedly connected with the outputs of gear trains 1 and 2 respectively, and the two grippers produce rotation around the v-axis driven by the motors.Therefore, we can change the positions of the grippers by controlling the rotation angles of the two motors so that the reconfigurable joint can complete the switch between locomotion mode and operation mode.

Working Modes and Switching
As mentioned above, the ILQR has locomotion and operation functions, and can be switched between functions by the reconfigurable joint.In addition, each chain in the robot can be stacked in the designated area when it is in non-working state.To realize the switch of each function, the working modes corresponding to each function and the switch configuration should be clearly divided.Here, we define three working modes for this robot: deployable mode, locomotion mode and operation mode.The deployable mode is the process between the folding and full extension of each chain, as shown in Figure 1(a-b).In locomotion mode, every chain of the robot serves as a leg, and the robot moves with the gait of quadruped walking, as shown in Figure 1(c).The operation mode is defined as three chains of the robot serving as legs, and one chain serving as an operation chain as shown in Figure 1(d).The switching between the three modes will be studied in Section 5.

Kinematics and Dynamics
The kinematics modeling in this section establishes the corresponding relationship between the position and orientation of the robot platform and actuation joints in each chain.For each chain, the kinematics modeling is unified and establishes the relationship between each actuation joint and the positions of each chain end.The dynamics analysis of the ILQR can be divided into two parts: one is the dynamics modeling in locomotion mode, and the other is the dynamics modeling in operation mode, that is, the dynamics modeling in the three-legged support and one-arm operation.In Section 3.3, the dynamics analysis of the two parts is carried out.

Kinematics Analysis
As shown in Figure 3, the base coordinate system is Oxyz.The coordinate system O p x p y p z p is established in the moving platform, where its origin point O p is the center of the platform.Here, we assume the transformation matrix from frame Oxyz to frame O p x p y p z p is o p T .For kin- ematics modeling, the robot can be treated as structural symmetry that contains four chains.Every chain consists of four actuation joints.The rotation angle of the ith joint in the jth chain is denoted by θ ij , and the length parameters of links are denoted by l ij , (i, j=1, 2, 3, 4), as shown in Figure 3. Therefore, the D-H parameters of each chain can be obtained as shown in Table 1.Based on Table 1, the transformation matrix from initial point A i to terminal point S i can be denoted by Ai Si T .Suppose the position of A i in the coordinate system O p xp y p z p can be expressed as a i =(x Ai , y Ai , z Ai ,) T , then the coordinates of point A i in the coordinate system Oxyz can be written as: Therefore, the end point S i of each chain in the coordinate system Oxyz can be expressed as: Here, the values of γ i are 0º, 90º, 120º and 270º, and Rotz(γ i ) represents frame O p x p y p z p rotates γ i about the z p -axis.According to Eqs. (1) and (2), the end position of S i can be solved by providing the position of the center point O p of the platform and the actuation joint values of each chain.
The above is the forward kinematics of the robot, while the inverse kinematics of the robot can be calculated as follows: The inverse kinematics is to solve every actuation joint values when the position and orientation of S i are (1) Trans(x Ai , y Ai , z Ai , ) = o p T a i . ( given.From Eq. ( 2), the coordinates of S i are represented by joint values θ ij and the structure parameters of each link.For a single chain, there would be four unknown variables with three constraint equations, which leads to an infinite solution of θ ij .Therefore, one of the joint values θ ij needs to be given first.Here, we can set the value of joint B ij so that the plane formed by the leg structure is always perpendicular to the ground as a constraint to determine the unique solution of the inverse kinematics.
To verify the correctness of the kinematics modeling, the structure diagrams of the robot are shown by giving the position and orientation of the robot platform and the coordinates of point S i .Assuming the coordinates of the center of the platform is o p =(0, 0, 350) T , the coordinates of point S i are denoted by S 1 =(390, 170, 0) T , S 2 =(−300, 250, 0) T , S 3 =(−180, −390, 0) T , S 4 =(300, −320, 0) T , unit: mm.Based on these conditions, the obtained structural diagram of the robot is shown in Figure 4

Velocity Analysis
The robot can realize quadruped locomotion and threelegged support operation.For this robot, the velocity analysis can be divided into two parts: The first part is the velocity analysis in the operation process, that is, when one chain of the robot is used as an operation chain (arm), the mapping relationship between the velocity of each joint and the velocity of the end of the arm; The second part is the velocity analysis of all the supporting chains (legs) of the robot, that is, the mapping relationship between the velocity of the central point of platform and the velocities of joints in each leg when the robot is in standing or supporting state.
For the first part, the arm can be regarded as a manipulator with four actuation joints, and the relationship between the end position and joint variables of the arm can be written as: where x is the end position of the arm, and q is the angle value of each joint variable of the arm.The derivative of time t on both sides of Eq. ( 3) to obtain: where ẋ is the velocity at the end of the arm, q is the rota- tional velocity of each joint, and J q is the 4×n Jacobian matrix of the arm.To obtain the analytical form of the Jacobian matrix, here we use the vector product method [21] to solve the matrix.For sliding joint i in the chain: For revolute joint i in the chain: (3) where i p o n is the representation of the coordinate vector at the end of the chain in coordinate system{i} under coordinate system {o}, and z i is the representation of the unit direction vector of the z axis in coordinate system{i} under coordinate system {o}.
Through the above method, a Jacobian matrix with dimensions of 6×4 is calculated, and only 4 rows in the matrix are linearly independent.Therefore, the 4×4 submatrix under linear independence is mainly considered: The element in J are provided in Appendix.Eq. ( 7) is the Jacobian matrix of the arm, through which the mapping relationship between the velocity at the end and the joint velocity of the arm can be obtained.At the same time, the matrix is related to the configuration of the robot, which is the calculation basis of the mechanical analysis and operation performance analysis of the robot in operation mode.
The supporting part of the robot is composed of three legs and one platform.If the legs contact the ground without relative sliding, the structure formed by the three legs, platform and ground can be treated as a parallel mechanism structure, and the joints connecting each leg and the ground are equivalent spherical joints.Therefore, for the supporting part, the velocity analysis method of the parallel mechanism is adopted to solve the velocity mapping matrix.
Because the platform has degrees of freedom of translation and rotation, to avoid dimension inconsistency when analyzing operation performance through the Jacobian matrix, screw theory [22,23] is used to solve the velocity relationship of the supporting part.
According to screw theory, the screw of each joint is shown in Figure 5, and the instantaneous velocity $ p of the center point p of the robot platform can be expressed as: where $ ij is the kinematic screw of the ith joint in the jth chain, and θij is the rotational rate of the ith joint in the jth chain.
a 13 a 14 a 21 a 22 a 23 a 24 0 a 32 a 33 a 34 0 − sin θ1 cos θ1 sin θ2 cos θ1 sin θ2 0 cos θ1 sin θ1 sin θ2 sin θ1 sin θ2 In the jth chain, the screw of each joint can be written as: where s ij (j=1,2,3) is the unit vector of the ith joint of the jth chain.
When the legs contact to the ground, the contact point can be regarded as a spherical joint.The spherical joint can be represented by kinematic screws of three revolute joints, and the axes of the revolute joints are perpendicular to each other: Let $ r i,j be the reciprocal screws of the kinematic screw system of the jth chain, and its reciprocal product with all the kinematic screws of this chain is equal to 0. Both sides of Eq. ( 8) are calculated by reciprocal product with $ r i,j (j=1, 2, 3, 4), then we can obtain: where Therefore, the kinematic Jacobian matrix of the robot can be solved.Assuming that all the actuation joints in the legs are locked, the kinematic screw system in each chain is changed to be composed of two revolute joint screws and a spherical joint screw, and its reciprocal screws are $ r1 i,j with dimension 2, where $ r1 i,j is a subset of $ r1 i,j .The reciprocal product of both sides of Eq. ( 9) with $ r1 i,j can be obtained: Then, we can obtain: where By combining J c and J x , the complete Jacobian matrix of the robot, J = [J c J x ] T , can be obtained.According to the above solution process, the velocity mapping relationship between the robot platform and the legs can be obtained.

Dynamics Analysis
The dynamic characteristic is an important evaluation index of operation performance.For this robot, the dynamics modeling of a single chain is the basis of the dynamic analysis of deployable mode and locomotion mode.In operation mode, the robot is supported by three legs, and the other chain will perform as an arm.Kinetostatics modeling is established to obtain coupling relationship between the legs and the arm.
Therefore, the dynamics analysis mainly considers the dynamics modeling of a single chain in the robot and the kinetostatics modeling when the robot supported by three legs based on the Newton-Euler method [24] to find the mechanical evaluation of related operations.Through dynamics analysis, the mechanical properties are obtained to realize subsequent mode switching and control under typical tasks.

Dynamics Modeling of a Single Chain
The single chain dynamics modeling of the robot is established as shown in Figure 6.The length of each linkage is set as l 1 , l 2 , l 3 and l 4 , the mass of each link is set as m 1 , m 2 , m 3 and m 4 , the reconfigurable joint is assembled at the end of the operation chain, and the inertia tensor of each link can be expressed by i I i in the coordinate system i.The reference coordinate system is established at each revolute joint, then the position vector from the origin of each coordinate system to the next coordinate system i is: Where According to the D-H parameters in Table 1, the pose matrix of coordinate system i−1 under coordinate system i can be calculated, that is, the transformation matrix i−1 R i .Similarly, the transformation matrix i R i−1 of coor- dinate system i under coordinate system i−1 can also be obtained.
Since the transformation matrix has orthogonality, then: Through the forward iteration method, the iterative equations of angular velocity and angular acceleration between link i−1 and linkage i can be obtained: The iterative equations of velocity and acceleration between link i−1 and linkage i are shown in Eqs. ( 13) and ( 14): The gravity acceleration iteration equation of each link can be expressed as: The force between each link is calculated by backward iteration method: (11)  Additionally, the external force and torque applied at the end of the chain are: According to the Newton-Euler equation, the iterative relationship of force and torque between link i and link i−1 can be written as Eq. ( 20): where f i,i−1 and n i,i−1 are the force and torque of the ith link acting on the ith link in the coordinate system i respectively, and i f * i is the representation of the inertial force acting on the mass center of link i in coordinate system i.Using the transformation matrix, the transformation of f i,i−1 and n i,i−1 in coordinate system i and coordinate system i−1 can be realized: According to the relationship of force projection on the joint axis, the torque of each joint:

Kinetostatics Modeling in Operation Mode
For kinetostatics modeling in operation mode, in this section, integrated modeling is established by simultaneously considering the arm, the contact between the three legs and the ground, and the coupling relationship between the three legs and the arm.The established kinetostatics modeling is shown in Figure 7.
To simplify the modeling, the following assumptions are made: (1) Assuming there is no sliding when the end of the legs contact to the ground; (2) Assuming the contact between the leg and the ground is a point contact with friction, that is, the contact force can be decomposed into one force component perpendicular to the ground and two force components tangent to the ground.
According to the single chain dynamics modeling in Section 3.3.1, it can be calculated that the force and torque applied on the platform from the first link are [ 0 f 1,0 ] and [ 0 n 1,0 ] , respectively.They are transformed into the coordinate system O p x p y p z p : where p R 0 is the transformation matrix from the first joint to the coordinate system O p x p y p z p , P F , P M are the force and torque applied on the first joint in the coordinate system O p x p y p z p .
Among the four chains of the robot, one of them is an arm to operate with, and the other three are the legs for support.The force on the end of the arm is denoted by F t = [f tx , f ty , f tz ] , while the force on the end of the leg is denoted by F j = [f jx , f jy , f jz ] .Therefore, the overall mechanical equilibrium equation can be obtained: The above two equations are converted to matrix form: where W is the force and torque applied on the center of the platform, Because the torque acting on the rigid body does not change with the position of the torque center, P M can be equivalent to the torque acting on the center of the platform, and thus, W can be expressed as: (23)  Eq. ( 27) is the kinetostatics modeling of the robot in operation mode, which represents the coupling relationship between the legs and the arm of the robot.

Mechanical Manipulability in Operation Mode
To compare and evaluate the mechanical manipulability of the supporting legs in different support directions during the operation, this section uses the mechanical manipulability ellipsoid as the evaluation index of mechanical manipulability [25].
When the direction of a certain operation task is given, the larger the transformation ratio of the ellipsoid in this direction means the smaller the torque required to be output by the robot, which also indicates that the robot has better mechanical manipulability in this direction.Figure 8 shows the carrying direction of the leg and the transformation ratio.Under a specific configuration, the robot has different transformation ratios M for different robot carrying directions λ.
The mechanical manipulability ellipsoid can be obtained from the Jacobian matrix, which can be established based on the configuration of the robot.Thus, for a specific carrying direction, when the end position of the leg changes, the transformation ratio in this direction will also be different.Figure 9 shows the transformation ratio in z=220mm plane along [0, 0, 1].It can be seen that the transformation ratio varies noticeably with the configuration under different positions of the supporting range.
According to the above results, the transformation ratio is mainly related to two factors: the position and orientation of the leg and the carrying direction of the leg.When the platform is subjected to the reaction force produced by the acceleration and gravity of the arm, the configuration of each chain will affect the matrix A in Eq. ( 27), and it can determine the position and orientation of each leg.Therefore, after determining the specific direction of the task, we can adjust the corresponding transformation ratio of the ellipsoid in the specified task direction to change the positions and orientations of the legs and make each leg have the best mechanical manipulability in the given task direction.Figures 10,11 show the mechanical manipulability ellipsoid of the jth leg and the direction of the force P F acting on the center of platform in a specific configuration.Each supporting leg forms a mechanical manipulability ellipsoid denoted by E j , and the transformation ratios are different with the same carrying direction.
If the motion and the external force applied on the arm are given, the direction of the force P F acting on the center of platform can be obtained, which is denoted by u.In this direction, the transformation ratio of the jth leg is |OM j |, which can be expressed as [25]: In order to make each leg end satisfy the expected position range, the constraint condition can be expressed as Eq.(30).When setting the position of each leg end, the (29) α j (q j ) = (u T J j (q j )J T j (q j )u) −1/2 .gravity center of the robot should be located in the supporting area composed of each leg to ensure that the robot possesses good motion stability when adjusting the supporting position and orientation: where p(q jx ), p(q jy ) and p(q jz ) are the end positions of the jth supporting leg in three directions.
To obtain the best supporting configuration of each leg in direction u, based on the constraint of Eq. ( 30), taking the maximum value of mechanical manipulability in direction u as the objective, each joint variable q j can be solved when Σα j (q j ) takes the maximum value.
After the joint variable q j obtained from Eq. ( 30), the transformation matrix R j of each leg can be obtained.Then, the force applied at the end of the leg from the ground will be solved through Eq. ( 27).When the matrix F has the minimum norm solution: The torques of each joint in the jth leg can be obtained: Through the above calculation, the minimum torques of each joint can be obtained when each leg is in the best position of mechanical manipulability.The minimum torque means that the actuation motor has a low power, which makes the robot less energy efficient in future practical applications.

Multimode Switching Process
In Section 2.3, according to the functions realized by the robot, three working modes of the robot are defined: deployable mode, locomotion mode and operation mode.Among them, the deployable mode is all the motion processes between the folded configuration and the unfolded configuration of each chain of the robot.In the locomotion mode, each chain is used as the leg, and the robot moves with a quadruped gait.The operation mode is when chains are used as the leg, and one chain is used as the arm so that operation can be performed according to a given task.
Figure 12 shows a schematic diagram of the three working modes and the switching relationship of the robot.The numbers ①, ②, ③ represent the corresponding motion processes of the deployable mode, locomotion mode and operation mode.To simplify the (30)    (pq jx ) min < p(q jx ) < (pq jx ) max , (pq jy ) min < p(q jy ) < (pq jy ) max , (pq jz ) min < p(q jz ) < (pq jz ) max , switching between three modes, the locomotion mode is set as the transition mode, that is, when the robot needs to switch from deployable mode to operation mode, it needs to switch to locomotion mode first.The initial configuration of the locomotion mode is selected as the switching node between modes.
Figure 13 shows the initial and unfolding configurations of the ILQR in deployable mode.Figure 14 shows the configurations of the ILQR in locomotion mode and operation mode.Figure 14(a) is the intermediate transition configuration between the deployable mode and operation mode.In Figure 14(a), the robot forms four supporting points with the ground through the end of each chain to realize switching from deployable mode to locomotion mode.During the switching, the initial position of the locomotion mode can be determined by providing the positions of the supporting points and platform.When the robot realizes mutual switching between the operation mode and the deployable mode, the robot needs to move to the initial position first.Similarly, when the robot performs mutual switching between locomotion mode and operation mode, it needs to move first to the initial position defined in Figure 14(a).However, when the robot is in operation mode as shown in Figure 14(b), because chain 2 is switched to an arm, the supporting body composed of the remaining three chains as legs needs to maintain its own standing stability without tipping and overturning during operation.Before chain 2 switches to an arm, the positions of the supporting points of the three legs need to be adjusted to complete switching from locomotion mode to operation mode.In the next section, the position of switching between locomotion mode and operation mode is determined based on the solution of the stability margin formed by the remaining three legs.

Switching Evaluation
Stability is a very important index for locomotion and operation, especially when the robot is switching between locomotion and operation.The switching node and the positions of supporting legs are the key factors to ensure mode switching stability.This section evaluates the switching stability based on the stability margin [26,27].The stability margin is expressed by the shortest distance from the projection of the zero moment point (ZMP) on the support plane to each side of the triangle formed by three supporting points.
When the robot is in locomotion mode or operation mode, there are three supporting legs connected to the ground, and the other chain is in a swing or operation state.As shown in Figure 15, when the projection point c of gravity center and any two supporting points A 2 and A 3 are determined, the position of supporting point A 1 of the other chain can be determined according to the gravity center contained in triangle The first schematic diagram of Figure 16 shows the initial configuration of the robot in locomotion mode.Due to the complete symmetry of each chain and supporting points, the projection of its gravity center in the ground is the intersection of the straight lines A 1 A 3 and A 2 A 4 .When the robot moves in a certain direction, the projection of gravity center in the supporting plane needs to be located in the triangle formed by any three supporting points.The robot moves according to the following action sequence: chain 3→ chain 2→ chain 4→ chain 1. Figure 16 shows the changes in the position of gravity center in a moving gait cycle.
The projection of gravity center located in the triangle can ensure that the robot does not tip and overturn during operation.Furthermore, the measurement of the stability margin can be used to evaluate the stability during operation.In the global reference coordinate system established in Figure 16, the acceleration of gravity is g=[0 0 -g] T .Assume that the total weight is M, the coordinate of gravity center is p g =[x g y g z g ] T , and the coordinate of ZMP is p=[x c y c z c ] T .The resultant force of the ground reaction force on the supporting point is f.The torque τ of the ground reaction around the coordinate origin is: where τ p is the torque through ZMP.
From the theorem of momentum and the theorem of angular momentum: Simultaneous Eq. (34) and Eq. ( 35), τ and f are eliminated to obtain: According to ZMP theory, let the horizontal components τ px and τ py in the above equation be 0, and the ZMP position coordinates x c and y c are obtained: where z c is the height of the supporting plane, and the supporting plane in this section is the ground, taking z c =0.
If the robot is simplified to a mass point, its momentum and angular momentum are: (33) , Substituting Eq. (38) into Eq.( 37), the ZMP coordinate expression is obtained as: According to Eq. (39), if the coordinate of gravity center p g is given and the ground height z c =0, the coordinates of ZMP can be obtained.Based on the dynamics modeling established in Section 3.3 and Eq.(39), after the coordinates of ZMP are obtained in operation mode, the ZMP can be placed in the formed supporting triangle area by adjusting the position of the supporting points.
According to the supporting triangle area formed by the three supporting points, it is possible to judge whether there is instability during the movement of the robot.To evaluate the stability ability of the robot in the process of locomotion and operation, this section uses the stability margin S m as the evaluation index.As shown in Figure 15, the stability margin of the robot is defined as the shortest vertical distance from ZMP to each boundary of the triangle, namely: When the robot moves in a quadruped gait and performs operation tasks, the value of the stability margin is positive if the ZMP is in the supporting triangle area.If the ZMP is outside the triangle area, the value of the (40) S m = min (S m1 S m2 S m3 ).
Figure 16 The projection of gravity center during a moving gait cycle stability margin will be negative.A larger value of the stability margin means that the motion of the robot is more stable.According to Eq. (40), when the ZMP is in the center of the support triangle area, the stability margin of the robot takes the maximum value.
The change of the stability margin in the process of mode switching is shown in Figure 17. Figure 17(a) shows the change of the stability margin of deployable mode, that is, the robot chains from the initial configuration to the unfolding configuration.The results obtained in Figure 17(b) are the changes of stability margin when the robot switches from deployable mode to locomotion mode and from operation mode to locomotion mode.In order to verify the correctness of the calculation, we set L 3 =180 mm and L 3 =200 mm respectively to solve and compare the values of the stability margin.
According to the obtained results in Figure 17, because of the symmetry of the robot structure, the distance from the ZMP position to the end point of each chain is the same.When L 3 takes different values, the change trends of the stability margin are the same.The difference in link length makes the value of stability margin different.In the unfolding configuration, the differential value of the stability margin is 20, which equals the value difference of the link length.
At the same time, when the robot switches mode from operation to locomotion, the stability margin of operation mode is greater than that of locomotion mode.In the whole mode switching, the stability margin is positive, which proves that the position of ZMP is always in the support triangle area formed by footholds during the mode switching process, and the robot can carry out a stable switching process.
Based on the above modeling of the ZMP and stability margin, we give a calculation case to measure the variation of the ZMP position when the robot performs operation tasks.The initial conditions are set as follows: The overall mass of the robot is M=4 kg; The position of the gravity center p g =[0 0 280] T , unit: mm; The force applied at the end of the arm F t =[0 0 2] T and the supporting force on the three supporting legs 6 Prototype Experiment

Prototype Construction
Based on the above design and analysis, a prototype for the integrated leg-arm quadruped robot is designed as shown in Figure 19.The three chains of the robot are leg structures.The other chain is an integrated leg-arm structure, and the reconfiguration joint is installed at the end of the chain.Each chain has 4 actuation joints configured with motors.In addition, there are 2 motors assembled in the reconfiguration joint of the leg-arm chain, and the rotation of the gripper in the reconfiguration joint is controlled by these 2 motors to realize the mutual switching of locomotion and operation functions.
In the prototype, the platform and links are 3D printed.The control flow chart when a locomotion or operation task is performed is shown in Figure 20.Arduino Mega 2560 is used as the central control board of the robot to control the overall system.In this section, the 24 channel actuator controller is selected to control the 14 digital motors, and the parameters of the other control devices are shown in Table 2.

Gait Control during Movement
The movement of the robot will occur in locomotion mode, and the other is when the robot switches from locomotion mode to operation mode.During the movement, we need to carry out trajectory planning for the end of each chain, and here the inverse kinematics solution is taken as the actuation parameter of each motor controller.When the robot is in locomotion mode, the gait control is based on the quadruped form designed in Figure 16.Each leg chain takes the Bézier curve [28] as the motion trajectory, as shown in Figure 21.Given  (t)) is the Bernstein polynomial of degree n, p k ∈ R 2 is the kth control point, k ∈ {0, 1, ..., 11} , T is the set leg swing trajectory period.
According to the kinematics modeling obtained in Section 3.1, we can obtain the chain configuration corresponding to the motion trajectory as shown in Figure 21.
To verify the correctness of the kinematics and control algorithm, here we use the Jacobian matrix transposed iterative algorithm [29] to control the motion trajectory and track the trajectory through the kinematics Equation k(q) and the transpose of the Jacobian matrix J T (q).The algorithm flow chart is shown in Figure 22.Where x d represents the desired motion trajectory, x e represents the actual motion trajectory, e represents the tracking error between x d and x e , K is the gain matrix, which is usually in diagonal form, and k(•) represents the kinematics equation.
According to the control algorithm, we can control the Bezier curve as the motion trajectory of the leg end.Let the initial point of motion trajectory be [284.37,168.42, −181.08]T , and then the angle of each actuation joint is(π, π/2, −5π/6, −2π/3). (41) , At the same time, let K=300*[1 0 0; 0 1 0; 0 0 1], T=0.5 s, and the integration step length ʃ =0.001 s.The actual motion trajectory, desired motion trajectory and their error calculated by this algorithm are shown in Figure 23.According to the observation in the figure, the actual motion trajectory is basically consistent with the desired motion trajectory, and the maximum error is less than 0.6mm, which indicates the correctness of the kinematics calculation and the control algorithm.

Multimode Experiment
In this section, multimode verification experiments are carried out for each mode and multimode switching.First, according to the results discussed above, the deployable mode is verified.By providing the initial folding configuration and the positions of the supporting points, each chain moves from the initial configuration to the unfolding configuration, and finally realizes the standing of the robot.The experimental process is shown in Figure 24.After the robot stands, the vertical distance between the center point of the platform and the ground is approximately 220 mm.In the folding and unfolding process, the maximum unfolding size of the robot measured under the full extension configuration of each chain is approximately 803 mm, while in the initial folding configuration, the side length of the square area formed by the robot platform is 370 mm, and its folding to unfolding ratio is approximately 1:2.2, which has clear deployable characteristics.The experimental process of locomotion mode is shown in Figure 25.In the process, the robot moves based on the quadruped gait designed in the simulation, where the gait cycle is 2 s, the step height is 25 mm, and the step distance is 110 mm.Through the observation in Figure 25, the robot can complete locomotion mode with a quadruped gait speed 50 mm/s, and the results are basically consistent with the simulation results.However, due to the small friction between the supporting point of each chain and the ground, a certain amount of deviation occurs during the locomotion process.
In operation mode, the robot is used to grasp and place a square box.By adjusting the supporting point of chain, the robot can make the arm move smoothly to point A. After grasping the square box, the robot can place the square box at designated point B by the operation chain, and switch back to the initial configuration.Based on the experiment, due to the prototype is made by 3D printing, a deformation is generated at the connection between the platform and the operation chain during the operation.After measurement, the deviation of the deviation between the ideal position and the actual position of the end of the operation chain moving from point A to point B is 3 mm.In the future, we will manufacture a prototype with rigid materials as components for testing to further study the stiffness and control stability of the robot.Figure 26 shows the experimental process of operation mode.Based on the analysis of the above experiments, the designed prototype can realize the functions of deployable mode, locomotion mode and operation mode.It can also successively and stably switch between each mode.From the mode switching results, it can be seen that there is no tipping or overturning during operation or locomotion, which verifies the correctness of the designed mode switching planning and proposes forward a reference method for the multimode design and multimode switching for this kind of robot.

Conclusions
(1) An integrated leg-arm quadruped robot with deployable characteristics is proposed, which can effectively reduce the space occupancy volume of the robot during transportation or non-working state.
(2) In addition, the innovation of the proposed robot is that it not only can stack in a designated area to improve carry efficiency, but also possesses both operation and locomotion function.

Figure 2
Figure 2 Structures of the chain and reconfigurable joint (a).If one of the chains is used as an operation chain, and its terminal position coordinates are given as S 4 =(300, −320, 300) T .The obtained structural diagram of the robot is shown in Figure 4(b).

Figure 3
Figure 3 Coordinate system establishment

Figure 4
Figure 4 Structural diagrams of kinematics solutions

Figure 5
Figure 5 Screw system of a single supporting leg

Figure 6
Figure 6 Dynamic model of single chain

Figure 7
Figure 7 Kinetostatics modeling in operation mode

Carrying direction λ 1 Carrying direction λ 2 Figure 8 Figure 9
Figure 8 Transformation ratio under different carrying directions

Figure 10 Figure 11
Figure 10 Mechanical manipulability ellipsoid E j

Figure 12 Figure 13
Figure 12 Schematic diagram of the three working modes and switching relationship of the ILQR

Figure 17 Figure 18
Figure 17The change of the stability margin during mode switching

Figure 19 Figure 20
Figure 19 Prototype construction

Figure 21 Figure 22
Figure 21 Motion trajectory and gait result

Figure 23 Figure 24
Figure 23 Kinematic algorithm calculation result

Figure 25 Figure 26
Figure 25 Experiment of locomotion mode: (a-f) Typical configurations in locomotion mode

Table 1 D
-H parameter

Table 2
The parameters of the prototype system