Kinematics , Dynamics , and Optimal Control of Pneumatic Hexapod Robot

Pneumatic hexapod robot is driven by inert gas carried by itself, which has board application prospect in rescue operation of disaster conditions containing flammable gas. Cruising ability is main constraint for practical engineering application which is influenced by kinematics and dynamics character. The matrix operators and pseudospectral method are used to solve dynamics modeling and numerical calculation problem of robot under straight line walking. Kinematics model is numerically solved and relationship of body, joints, and drive cylinders is obtained. With dynamics model and kinematics boundary conditions, the optimal input gas pressure of leg swing and bodymoving in one step is obtained by pseudospectralmethod. According to action character ofmagnetic valve, calculation results of control inputs satisfy engineering design requirements, and cruising ability under finite gas is obtained.


Introduction
In recent years, more and more robots are used in industrial accident's detect and rescue operation.The commonly used robots include motor and hydraulic drive types, but they are not suited for some close space accident environment which fills with flammable gas, such as gas explosion accident of coal mine, because electric devices of them may lead to secondary explosion.The pneumatic robot is driven by inert gas and is convenient to be controlled, which is widely used in industrial and medical domains.Verrelst et al. [1] designed a pneumatic biped robot, which verifies feasibility of using pneumatic system as power source, Lavoie and Desbiens [2] designed a cockroach type pneumatic hexapod robot, Morimoto et al. [3] designed a rehabilitation used soft touch manipulator by soft cylinder and obtained a high working accuracy, Qiu et al. [4] designed a pipe inspection robot by soft cylinders, Diez et al. [5] designed a neural rehabilitation pneumatic robot, Low et al. [6] explored a soft pneumatic massager used in joints auxiliary motion, and Ramsauer et al. [7] explored an error detection using pneumatic Stewart platform.
With these backgrounds, a natural antiexplosion pneumatic hexapod robot (PHR) which is driven by inert gas is designed in this exploration.However, cruising ability is a big influence in robot's engineer application, for the carried gas's volume is limited by self-weight of robot.The cruising ability of PHR is measured by straight line walking distance limited by product of volume and pressure of carried gas.During straight line walking, the same characters of each gait decide they have same gas consumption, so cruising ability problem changes to be calculation of distance and gas consumption of one step.Gas consumption of one step is defined as product of cylinder's volume and drive pressure.The cylinder volume is known, and pressure is influenced by dynamics character of robot.The optimal control method is used to calculate minimum drive pressure.
In the last few years, there are many explorations on optimal control problems of hexapod robots.Sliva and Machado [8] reviewed optimization method used in legged robots; energy/power optimal control objective functions are listed out; Sanz-Merodio et al. [9] explored energy consumption of mammal and insect type robots and concluded that leg dynamics accounts for most energy consumption; Chen et al. [10] designed an insect type hexapod robot and leg has a series mechanism type; the optimal control of leg swing is solved by pseudospectral method; Roy et al. [11][12][13][14] explored kinematic dynamics and optimal control problems of hexapod robot; the hexapod robot is driven by electric motor, so it has a series mechanism type; Luneckas et al. [15] analyzed hexapod robot's energy consumption by motion of body and step height; Deng et al. [16] explored energy reducing problem of hexapod robot by kinematics analysis; Gonzalez de Santos et al. [17] explored minimization of hexapod robot in irregular terrain; the optimal analysis is based on statically stable gait; Jin et al. [18] explored hexapod walking robot's power consumption optimization problem by torque distribution algorithm and parameters include duty factor, stride length, bogy height, and foot trajectory lateral offset; Zhu et al. [19] explored optimal design of hexapod robot with kinematic model.
Fundamentally, PHR is a parallel mechanism, most of optimal control explorations of it are static, or simplify it as serial mechanism, so the real dynamics character cannot faithfully represent it.The first reason is that complex dynamics character of parallel mechanism makes it difficult to use triangle functions to calculate it, and complex triangle and antitriangle transformations will lead to unsolvable model.Secondly, complex nonlinear characters need optimal control algorithm that has high calculation accuracy and stability, but classic algorithms such as Runge-Kutta method do not satisfy these two characters.
According to references of dynamics modeling by Lie group [20,21] and optimal control with pseudospectral method [22,23], the matrix and vector operators can avoid triangle and antitriangle transformations which makes dynamics modeling easier.Pseudospectral method is a global numerical method which has high stability and is widely used in many domains, many engineering problems are solved successfully [24,25].So, in this exploration, matrix and vector operators are used as units for dynamic modeling, and optimal control problem is solved by pseudospectral method.The control inputs curves which satisfy pneumatic control characters are obtained, and then cruising ability calculation method is built at last, which offers a reference for the improvement of robot.

The Mechanism and Gait of Pneumatic Hexapod Robot
PHR is a biorobot, so it has two design schemes, insect type in Figure 1 and mammal type in Figure 2.Many people like insect type, but it has some problems.Firstly, it walks along  direction by triangle gait of hip; joints bear great yawing forces which will lead to joints' rapid abrasion and to not being suited for engineering application.Secondly, it has a big width, so crosswise passing ability is restricted.Thirdly, the realization of straight line walking needs combination motion of three joints, which is more difficult to realize by pneumatic system and has high gas consumption.The mammal type PHR does not have these problems.The nitrogen gas bottle is in trunk; the maximum pressure can reach 15 MPa.The high pressure gas is decompressed to 1 MPa by PRV (pressure reducing valve), and then gas can be decomposed to different low pressures from 0.15 MPa to 0.8 MPa by DP (duplex pieces).All the magnetic valves and control devices can be packaged in box which is convenient for antiexplosion design.Each leg is composed of shank and thigh which are driven by cylinder.
According to comparison between Figures 1 and 2, each leg of mammal type hexapod robot has two joints which is less than the insect type.Based on this mechanism, the PHR can realize straight line walking as gait in Figure 3.The gait can be divided into four actions.Firstly, the shank drive cylinder shrinks to make foot tip separate from ground; secondly, the thigh drive cylinder stretches out to make the leg step forward; thirdly, the shank drive cylinder stretches out to make foot contact with ground again; fourthly, the thigh drive cylinder shrinks to make body move forward.According to the above gait analysis, the two joints work at different time and have no coincides.So the swing of thigh and shank can be treated as a parallel pendulum.When body moves forward by support of legs, PHR and ground form a close loop.According to straight line walking gait, the movement of body is only decided by motion of thigh.So the movement process can be expressed only by one parameter.The motion process of straight line walking can be expressed as in Figure 4.

Kinematics Modeling of PHR
In this part, the pneumatic hexapod robot's whole straight line walking kinematic model is built with matrix and vector operators.The parallel pendulum kinematic model that corresponds to leg swing process is built at first.Then the kinematics model of whole machine under straight line walking process is derived as follows.

The Kinematic Model of Leg Swing.
The mechanism and parameters of thigh and shank are given in Figure 5.According to Figure 5, thigh and shank have same mechanism which consists of rocker ( 1  3 ) and push rod  2  3 .So thigh and shank can be expressed by same kinematic model.Suppose rotate angle of rocker along  1 is  1 , rotate angle of push rod along  2 is  2 , and length of push rod is , rotation matrix of rocker and push rod can be written as The rotation matrix satisfies RR  = I 2×2 , det R = 1.Suppose position vector of point  3 on rocker is r 1 = (  ,   ), so the coordinate of  3 in inertial frame is R 1 r 1 .Suppose position vector of  2 in inertial frame is r 2 = (  ,   ).According to translate process as  1 →  2 →  3 , the coordinate of  3 in inertial frame is r 2 + R 2 e 1 .According to coordinates of  2 ,  3 , and length between them, the relation can be expressed as Equation ( 2) can be unfolded as Equation ( 1) can be decomposed by R  =   I +    (1).Bring it into (3), and   ,   can be solved by nonlinear equations as (4). 2  +  2  = 1 is the constraint between   and   .
In ( 4),  = r  2 (1)r 1 ,  = r  2 r 1 ,  = (r  1 r 1 + r  2 r 2 −  2 )/2.According to (4), R 1 can be calculated.The relation of push rod and rocker's attitudes and length of push rod is ( The attitude matrix satisfies the differential relation as Ṙ = R(); then, differentiating (3), the velocity relation can be derived as In (6), l = V.After transposition of terms, the relation between angular velocity of rocker and velocity of push rod is written as Differentiating (3), the relation of pose, attitude, velocity, and angular velocity is written as Systemizing (8), the relation between angular velocity of push rod and rocker is written as Differentiating (6), and then systemizing it, the angular acceleration of rocker is written as In (10),  = V .Differentiating (8), the angular acceleration of push rod is written as According to (12) and straight line walking gait, the position of body is decided by rotation of thigh for shank joint keeps still during body moves.The velocity relation of leg and body is derived out by differential calculation of (12) and the result is Equation ( 13) can be written as an expansion type as The acceleration relation of leg and body is derived by differentiating (14), and the result is The neat type of ( 15) is

Dynamics Model of Leg
Swing.With kinematics model, the dynamics model of parallel single pendulum can be built by Lagrange theory.For the control objective is rocker, so rotation angle  1 of rocker is chosen as generalized coordinate of dynamics system.The complete expression form of rotation matrix of push rod R 2 can be derived by multiplying e  1 and e  2 on both sides of (5), respectively.It shows in In (17), r 2 ; then bring (17) into (9) which is the expression of  2 , so it has a new type as (13).
In (18), Based on ( 6), V can be written as According to system's pose-attitude relation, the kinematic energy of system can be written as The potential energy of system can be written as Bringing ( 18) and ( 19) into ( 20) and ( 21), energy formula based on R 1 and  1 can be obtained.According to Lagrange theory, dynamics equation of conservation system can be derived out by After expanding dynamics equation, the complete equation of dynamics system can be expressed as In (23), the expressions of parameters are shown as follows.
The mechanisms of PHR's whole machine and the equivalent type under straight line gait.

Dynamics Model of Body Moving.
The straight line walking of PHR is realized by rotation of thigh joints, and shank joints keep still during motion process.According to Figure 7, PHR is supported by three legs, contact forces are on feet tips which are respectively.Thigh joints are driven by  0 ,  0 ,  0 ; shank joints are driven by  1 ,  1 ,  1 .The torque corresponds to drive forces of cylinders.When shank joints keep still, shank thigh and shank drive cylinder can be handled as one unit.So drive forces of shank have no influence on the walking.The six legs of PHR have same mechanism character, and body has no rotation during straight line walking, so rotation angles of thighs are equal, which means  0 =  0 =  0 ,  1 =  1 =  1 =  in Figure 7. Supposing that feet tips have no motion relative to ground, so the mechanism of the whole machine can be equivalent to the mechanism type as the right part in Figure 7.In this mechanism, displacement of body is equal to displacement of thigh joint in inertial frame, and dynamics character of whole machine can be expressed by one parameter.Define   as mass of body; mass center is defined at .For body has no rotation during straight line walking, so potential energy is only related to vertical distance between mass center and hinge joint;  1 is gather mass of shank, thigh, and drive cylinder of shank. 2 ,  3 are masses of cylinder tube and rod, respectively.Define  1 as inertia moment of leg unit which rotates along foot tip ;  2 ,  3 are inertia moments of drive cylinder's tube and rod along   and   , respectively.Suppose r  is position vector of point   in body frame  of leg unit, and position vector of   in frame  is r  .So kinetic energy and potential energy of leg unit are written as In formula (25),  =  −   −   , so θ = − θ  = −  ,   is angular velocity of thigh, and r 1 is position vector of mass center.The position of   in frame  is written as So kinetic energy and potential energy of body is written as The motion of drive cylinder is analyzed as follows.The motion of drive cylinder consists of motion of cylinder tube and rod.As in Figure 7, the tube connects with thigh and rod connects with body, so the motion of tube is combination of displacement of point   and rotation along   .The motion of rod is combination of displacement of point   and rotation along   .So kinetic and potential energy of cylinder tube are written as (28), and the rod's are written as (29).
Mathematical Problems in Engineering 7 For straight line walking is realized by three legs' motion, so Lagrange function of whole system is written as According to kinematic character of parallel pendulum, R(  ) can be expressed by R(  ), and   can be expressed by   and R(  ).The concrete expressions are in In (31) R  = R(  ), R  = R(  ); Lagrange function can be written as (32) with (31).In (32), R  = R(  +   ).According to Lagrange theory, the dynamics equation of system is obtained as In (33 33) is dynamics equation of PHR under straight line walking.

The Force Analysis.
The dynamics models of leg swing and straight line walking are built in Sections 3.1 and 3.2, respectively.According to dynamics models, rotation angles of joints are chosen as generalized coordinates.Actually, the joints are driven by cylinders, so the relation between joint drive torques and cylinder drive forces should be constructed.
In order to construct the relation between joint torque and cylinder drive force, the parallel pendulum structure of thigh joint is used as example in Figure 8. Supposing the cylinder's push force is , the angle between push rod and thigh is So the projections of hinge joint on thigh and drive force vector are as in The cross product of (37) is According to analysis on geometry, the joint torque is cross product of leg's hinge point's position vector and cylinder direction vector, which can be expressed as matrix type as in According to the relation between R 2 and R 0 , (39) can be written as Furthermore, the drive force is generated by gas, and the relation is  =  2 /4,  is cylinder bore (mm), and  is gas pressure (MPa).When cylinder is confirmed, the gas consumption is only influenced by pressure .

The Optimal Control with Pseudospectral Method
The main character of pseudospectral method is that the state and control variables of ordinary differential equations are discrete on Legendre-Gauss points.The discrete points are used as nodes to construct Lagrange interpolating polynomial which is used to approximate state variables and control variables.The derivatives of state variables are approximated by differentiating the overall interpolating polynomial so that differential equation constraints are changed to be algebra constraints.The integral part of performance index is calculated by Gauss integral.From above transformations, the optimal control problem is translated to be a nonlinear programming problem with a series of algebra constraints.

The Problem Description.
According to ( 23) and ( 40), state equation of parallel pendulum which represents leg swing is written as (41).According to ( 23) and (33), state equation of robot during straight line walking is as in (42).
The boundary conditions are (x( 0 ),  0 , x(  ),   ) = 0.In this exploration, boundary conditions include initial, terminal, and boundary values of rotation angle  and angular velocities .The control constraint is written as C(x(), u(), ) ≤ 0. In this exploration, the constraint is variation boundaries of input gas pressure.

The Time Domain Transformation.
Before using Gausspseudospectral method, the time interval of optimal control should be transformed from  ∈ [ 0 ,   ] to  ∈ [−1, 1] first.The process is shown as The transformation process for minimum performance index is written as The dynamics differential equation constraints can be transformed to be The boundary condition: (x(−1),  0 , x(1),   ) = 0.The path constraints: C(x(), u(), ) ≤ 0.

The State and Control Variables Approximated by the
Overall Interpolating Polynomial.Gauss-pseudospectral method uses  Legendre-Gauss points and  0 = −1 as nodes, which forms +1 Lagrange interpolating polynomials   (),  = 0, . . .,  as primary function to approximate the state variables, as in In (48), base function of Lagrange interpolating polynomials can be expressed as (49), which makes approximate state on nodes equal to virtual conditions, as x(  ) ≈ (  ),  = 0, . . ., , The Lagrange interpolating polynomials are used as basis function for approximate control variables as In above equations,   ,  = 1, . . .,  are Legendre-Gauss points.

The Transformation of Differential Constraints to Algebra
Constraints.Differentiating state variable, dynamics differential equation constraints can be transformed to be algebra constraints as The expression of differential matrix is written as In ( 52),  = 1, . . ., ,  = 0, . . ., .From the above transformations, dynamics differential constraints are translated to be algebra constraints. (53)

The Terminal State Constraints under Discrete Condition.
For nodes of Gauss-pseudospectral method excludes end point   = 1, so the terminal state X  is not definite in dynamics differential equation constraints.The terminal state should satisfy dynamics constraints as The termianl constraints are discreted and approximated by the Gauss integral method, which can be written as (55); terminal constraint is written as In (55),   = ∫ 1 −1   () is Gauss weight;   is Legendre-Gauss points.

The Performance Index under Discrete Condition.
Integral parts of performance index are approximated by Gauss integral, and performance index with pseudospectral type can be obtained as Therefore, the continuous optimal control problem is transformed to be a nonlinear programming problem with discrete work of pseudospectral method.Then discrete control and state variables can obtain a minimum performance index which satisfies state constraints, terminal constraints, boundary conditions (X 0 ,  0 , X  ,   ) = 0, and path constraints C(X  , U  ,   ;  0 ,   ) ≤ 0.

The Optimal Control of PHR. The gas consumption optimal control of PHR under straight line walking has two parts.
The first part is gas consumption optimal control of leg swing when foot has no contact with ground, which corresponds to state equation (41).The second part is gas consumption optimal control of body moving by support of legs in which feet contact with ground.This part corresponds to state equation ( 42).The sum of these optimal control results is gas consumption of one step.For the goal of optimal control is minimum of gas consumption, so objective function is  = ∫    0 .The optimal control of PHR can be expressed as searching control input  to make system move from initial condition x( 0 ) = x 0 to terminal condition x(  ) = x  under minimum energy consumption and satisfy a certain of constraints in a given time interval.The process can be written as follows.

The Functional Extreme Value Problem of Optimal Control
The performance index: The constraints of initial value: x( 0 ) = x 0 .
The state equation: The constraints of control: The constraints of states: The boundary conditions:  ≤   , (  ) ≤ x  .

The Kinematics Analysis
The kinematic process of PHR's straight line walking is analyzed in this part.The structure parameters of PHR are as follows.The parameters are obtained from the 3D model of PHR as Figure 2. In order to verify the correctness of mathematical model, the 3D model is kinematic, simulated by ADAMS, and the simulation results are used as criterions for the correctness of numerical results of mathematical model.The numerical solution path is designed as follows.

The Numerical Solution Path
The initialization of the variables: For loop: solve the following formulas as sequence: (3), ( 4), ( 6), ( 8), (9), and (10); calculate the following parameters: R 1 , R 2 ,  1 ,  2 , ω 1 , ω 2 ; the initial value update is as follows:  = (), V = V(),  = (); is 198 mm, and shank's is 248 mm.The cylinder's stroke is 50 mm.For the pneumatic experiment has not proceeded, the acceleration of cylinder motion is supposed as 10000 mm/s 2 in simulation.For magnetic valve's minimum action time is 0.1 s, so the action time of cylinder is supposed to be 0.1 s.According to the above parameters and motion relations, the variation curves of leg's kinematics parameters are as in Figures 9-15.
The track of foot tip and shank joint is expressed in Figure 9.The black, blue, and red curves are the tracks of foot swing process.The coordinates of initial and terminal points are [−65; 506] and [−255.8;−445.5],respectively.These two coordinates indicate that the forward distance of one step is 190 mm, and the difference of coordinates on  direction indicates that body has  direction motion during foot transformation which is 60 mm.The rotation angles variation curves of thigh and shank are expressed in Figure 10.According to Figure 10, the initial and terminal angles of thigh joint are −62.2∘ and −85.56 ∘ , the variation range of thigh joint is 23.36 ∘ , and the three key values of shank joint are −60 ∘ , −79.64 ∘ , and 19.64 ∘ , respectively.The curves are smooth and have parabola character, which means that the rotation of thigh and shank joints have stable acceleration, which is identical to the motion character of drive cylinders.
The rotation angles variation curves of drive cylinders of thigh and shank are expressed in Figure 11.According to Figure 11, the initial and terminal rotation angles of thigh joint's drive cylinder are 31.42∘ and 33.92 ∘ , the variation range of it is 2.5 ∘ , and the three key values of shank joint's drive cylinder are −25.15∘ , −32.03 ∘ , and 6.87 ∘ , respectively.The variation ranges are far smaller than main joints.
The angular velocities variation curves of thigh and shank joints are expressed in Figure 12.The variation range of thigh joint's angular velocity is 7.552 rad/s and shank joint's variation ranges are 6.898 rad/s and 6.192 rad/s on different rotation directions.The curves are smooth and variation tendencies are similar to a straight line, which means the gradients of angular velocity are constant.
The angular velocities variation curves of drive cylinders are expressed in Figure 13.According to Figure 13, the variation curve of thigh drive cylinder's angular velocity has a parabola character, and the maximum value is 0.6729 rad/s; the variation ranges of shank drive cylinder's angular velocities are 1.958 and 2.063 rad/s.The values and variation ranges of drive cylinders angular velocities are far smaller than joints expressed in Figure 12.
The angular acceleration variation curves of thigh and shank joints are expressed in Figure 14.According to Figure 14, the variation range of thigh joint's angular acceleration is between −86.99 rad/s 2 and −80.26 rad/s 2 , which has a small variation range.The variation ranges of shank joint drive cylinder's angular acceleration on two different motion directions which are [−73.17,−54.33] rad/s 2 and [64.88, 92.57] rad/s 2 , respectively.The variation curves are smooth and continuous, which means the motion of thigh and shank joints is second-order continuous.
The angular acceleration of drive cylinders is shown in Figure 15.The variation range of thigh joint drive cylinder's angular acceleration is [22.45, −29.38] rad/s 2 , and shank joint's is [−27.79,0] rad/s 2 and [20.22,41.47]rad/s 2 on two directions, respectively.This means that although rotation angels and angular velocities of the drive cylinders are small, the variation processes are rapid.
The displacement, velocities, and acceleration variation curves of body which moves by support of legs are expressed in Figures 16,17,and 18, respectively.According to Figure 16, the initial and terminal positions of thigh joint relative to foot tip are [258.5,440.9] mm and [52.4, 508.4] mm, respectively.The variation curve is a smooth arc.According to two coordinates, the forward displacement of one step is 206.1 mm, and the displacement on vertical direction is 67.5 mm.According to Figure 17, the velocity's maximum value on  direction is 4.48 m/s, and on  direction is −0.461 m/s; the velocity on  direction is 10 times the velocity on  direction.According to Figure 18, the maximum values of acceleration on  and  directions are 72.98 m/s 2 and 32.37 m/s 2 , respectively, and maximum values are occurring at the end of motion process.
According to kinematics analysis, the conclusions can be summarized as follows.
(1) The variation curves of angles, angular velocities, and angular acceleration are all smooth, which means the straight line walking process has second-order smooth character.
(2) The rotation angles, velocities, and acceleration values of thigh and shank joints are much larger than that of drive cylinders.This means that the mechanism of leg can be improved to be the type where drive cylinders have no rotation during motion process in the future.
(3) The maximum values of angular velocities and angular acceleration appear at the end of motion, so in  the actual engineering design, the accelerate motion at the end of cylinders stroke should be avoided.(4) The straight line walking distance of one step is 0.2 m, and the process needs 4 cylinder strokes.The gas consumption volumes of each stroke are product of cylinder inner area and stroke distance.The front 3 strokes only need to drive a small mass, so they only need a low pressure, the 4th stroke needs to drive the mass of the whole machine, so it needs a high pressure.The pressure values of each stroke are calculated in the following part with optimal control method.

The Optimal Control Analysis
In order to analyze dynamics and control of PHR, the pseudospectral optimal control method is used to solve dynamics equations of straight line walking as (36) and (37).With this calculation, the variation curves of motion parameters as rotation angles, angular velocities, and angular acceleration of straight line will be obtained, and control input pressures curves of each action will also be obtained.With these curves, the dynamics and control of PHR can be synthetically analyzed.
According to straight line gait, the first step is uplift process of shank.The mass and inertia of shank are   = 0.8154 kg and   = 0.0492 kg⋅m 2 and the mass center's position vector is r  = [0.223;0] m.According to the kinematics analysis results, the initial length of cylinder is 248 mm, so initial rotation angle of shank joint is 60 ∘ , and terminal length of cylinder is 198 mm, so terminal angle of shank joint is 79.64 ∘ ; initial and terminal values of (36) are  intial The second step is rotation of thigh joint.In this step shank joint keeps still, so thigh and shank can seem as a whole.The mass and inertia of this whole part are   = 1.576 kg and   = 0.1276 kg⋅m 2 and the mass center's position vector is r  = [0.2;0.133] m.The initial length of cylinder is 198 mm, so initial rotation angle of shank joint is 62.2 ∘ , and terminal length of cylinder is 248 mm, so terminal angle of shank joint is 85.56 ∘ ; the initial and terminal values of (36) are  intial The drive cylinder two parts' mass, moment of inertia, and distance of mass center to hinge joint are as follows. 1 = 0.257 kg,  1 = 5.3 × 10 −4 kgm 2 ,  1 = 0.069 m;  2 = 0.043 kg,  2 = 2.15 × 10 −4 kgm 2 ,  2 = 0.058 m.
The 4 steps of one straight line walking gait are solved by pseudospectral method, and simulation results are expressed in Figures 19-22.According to Figure 19, the uplift process of shank only needs a low pressure as 0.15 MPa, but the control time only needs 0.08 s, as the left graph of Figure 9.If the control time is 0.1 s, the control input pressure only needs 0.1 MPa.On point of engineering, the magnetic valve will not act if the pressure is lower than 0.15 MPa, so the first optimal control result as in Figure 19 meets the need of engineering application.However, the lowest action time of magnetic valve is 0.1 s, so impact may occur during the experiment.According to Figure 20, thigh joint has a stable motion process when input pressure is 0.15 MPa and control time is 0.1 s.
The optimal control results of third step are shown in Figure 21, which are similar to results as in Figure 19, and control input pressure is also 0.15 MPa.The optimal control results of fourth step are shown in Figure 22.When the input pressure is 0.6 MPa and control time is 0.1 s, variation of rotation angle is not smooth, and when control input pressure is 0.5 MPa, and control time is 0.3 s, the variation of rotation angle and angular velocity are smooth, so control input is 0.5 MPa with control time 0.3 s being the best choice.
According to the above optimal control calculation results, the conclusions can be summarized as follows.
(1) The leg swing only needs a low gas pressure as 0.15 MPa, and body moves by support of legs need pressure of 0.5 MPa with mass of whole machine being 30 kg.
(2) The optimal control results indicate that it needs at least two gas pressure stages to be designed in practical engineering design.
(3) The gas consumption of one gait is 0.15 MPa × (/ 4) 2 ×3×3+0.5 MPa×(/4) 2 = 1.85 MPa×(/4) 2 = 0.04 MPa⋅L with mass of whole machine being 30 kg and inner diameter of cylinder being 32 mm.In this exploration, the volume and gas pressure of high pressure bottle are 8 L × 15 MPa, so the carried high pressure gas can support the PHR to walk 3000 steps straightly.According to kinematic analysis, the forward distance of one step is 0.2 m, so the cruising ability of PHR is 600 m.

Conclusion
In this paper, kinematic, dynamics, and optimal control problem of PHR are explored, and cruising ability of designed  PHR is analyzed.According to this exploration, the conclusions can be summarized as follows.
(1) Matrix and vector operator are a good modeling method that can replace triangle method, which makes kinematic and dynamic modeling of complex parallel mechanism easier.In this exploration, kinematic and dynamic model of PHR are built by matrix and vector operators which are successfully solved.
(2) Pseudospectral method is convenient to solve optimal control problems of nonlinear dynamics systems for its high accuracy.In this exploration, dynamics equation of PHR is successfully solved, and optimal input gas pressures of different actions in one gait are obtained, which offers guidance for engineering design.
(3) Cruising ability of PHR is influenced by kinematic and dynamics characters synthetically.Forward distance of one step is obtained by kinematics analysis and gas pressures are obtained by dynamics analysis.
The results indicate that cruising ability of designed PHR satisfies engineering needs.

Figure 3 :Figure 4 :
Figure 3: The straight line walking gait of PHR.

Figure 5 :
Figure 5: The parallel pendulum diagram of thigh and shank.

Figure 6 :
Figure 6: The mechanisms schematic diagram of pneumatic hexapod robot under straight line walking.

FFigure 8 :
Figure 8: The force of the single joint.
relation, suppose that R 0 and R 2 are

Figure 16 :Figure 17 :
Figure 16: The track of thigh joint with body moving.

Figure 18 :
Figure18: The acceleration of mass center.
variation ranges of  1 and  1 are /3 ≤  1 ≤ 0.44 and −10 ≤  1 ≤ 10, respectively.The control input pressure range is 0.15 MPa ≤  ≤ 0.8 MPa for minimum and maximum valid pressures of magnetic valve are 0.15 MPa and 0.8 MPa.

1 =
the variation ranges of  1 and  1 are 0.34 ≤  1 ≤ 0.48 and −10 ≤  1 ≤ 10, respectively.Control input pressure range is as the first step.The third step is rotation of shank joint.The parameters of this step are identical to the first step, the initial and terminal values of (36) are  intial1 = 0.44,  intial 1 = 0;  end 1 = /3,  end 1 = 0.The fourth step is body moving with rotation of thigh joint.In this step, foot tip contacts ground and shank keeps still.The mass of body is   = 30 kg, the mass of leg is  1 = 1.576 kg, the moment of inertia along the foot tip is  1 = 0.1247 kg⋅m 2 , the mass center position is r 1 = [0.227;0.059] m, the initial and terminal values of (37) are  intial  = 0.475,  intial  = 0;  end  = 0.346,  end  = 0, and variation ranges of   and   are 0.34 ≤   ≤ 0.48 and −10 ≤   ≤ 10, respectively.

14 MathematicalFigure 19 :
Figure 19: The optimal control results of shank joint on the first step.

Figure 20 :
Figure 20: The optimal control results of thigh joint on the second step.

Figure 21 :Figure 22 :
Figure 21: The optimal control results of shank joint on the third step.

origin 𝑂 𝐵 relative to inertial frame 𝑂 𝐼 𝑋 𝐼 𝑌 𝐼 as in Figure 6. Define p 𝐵 and r 𝐼2 as position vectors of body and foot tip in inertial frame 𝑂 𝐼 𝑋 𝐼 𝑌 𝐼 , respectively, r 𝐵0 is position vector of thigh joint 𝑂 0 in frame 𝑂 𝐵 𝑋 𝐵 𝑌 𝐵 , r 01 and r 12 are position vectors of shank joint 𝑂
1 in thigh's body frame  0  0  0 and foot tip  2 in shank's body frame  1  1  1 , respectively.Supposing that rotation matrixes of thigh and shank are R 0 and R 1 , respectively, so the close loop relation of body, thigh, shank, and ground is derived as