A Novel Expanding Mechanism of Gastrointestinal Microrobot: Design, Analysis and Optimization

In order to make the gastrointestinal microrobot (GMR) expand and anchor in the gastrointestinal tract reliably, a novel expanding mechanism of the GMR is proposed in this paper. The overlapping expanding arm is designed to be used to increase the variable diameter ratio (ratio of fully expanded diameter to fully folded diameter) to 3.3, which makes the robot more adaptable to the intestinal tract of different sections of the human body. The double-layer structure of the expanding arm increases the contact area with the intestine, reducing the risk of intestinal damage. The kinematics and mechanical model of the expanding arm are established, and the rigid velocity, rigid acceleration, and expanding force of the expanding arm are analyzed. The elastodynamics model of the expanding arm is established. Through the finite element analysis (FEA), the velocity, acceleration, and the value and distribution of the stress of the expanding arm under elastic deformation are obtained. Based on the elastodynamics analysis, the structure of the expanding arm is optimized. By the structure optimization, the thickness of the expanding mechanism is reduced by 0.4mm, the weight is reduced by 31%, and the stress distribution is more uniform. Through the mechanical test, the minimum expanding force of the expanding mechanism is 1.3 N and the maximum expanding force is 6.5 N. Finally, the robot is tested in the rigid pipeline and the isolated intestine to verify the reliability and safety of the expanding mechanism.


Introduction
The morbidity and mortality of gastrointestinal malignancy and related diseases are increasing year by year, which has seriously threatened people's health and even life [1,2]. Traditional endoscopy has some problems, such as missed detection, the painful process, and potential to cause serious complications. Capsule endoscopy can only rely on the passive movement of intestinal peristalsis and cannot carry out fixed-point detection of the gastrointestinal tract. It also does not have the function of expanding the intestinal tract and cannot be examined at the intestinal fold [3]. Therefore, the research focused on the gastrointestinal microrobot which can move autonomically and expand the intestinal tract is important [4][5][6][7][8].
The expanding mechanism is the key device for the gastrointestinal microrobot (GMR) to achieve active locomotion and anchoring in the intestinal tract. The performance of the GMR is directly related to the gastrointestinal tract safety, applicability and work efficiency [9]. The robot must have enough safety, so as to avoid damage to the intestine. In addition, due to different size of the intestine in The mechanical structure of the robot mainly consists of three parts: the front expanding mechanism (FEM), the rear expanding mechanism (REM), and the telescoping mechanism (TM). The FEM and REM have the same structure, the FEM moves relative to the TM, and the REM is fixed to the TM. The expanding mechanism is mainly composed of a driving device, a transmission device and three sets of expanding arms. The driving device is composed of a hollow cup motor and a reducer. The reducer adopts a 5-layer planetary gear type structure, and the reduction ratio of each layer is 4. The transmission device is mainly composed of three sets of external meshing gears. There are three sets of expansion arms, each consisting of four curved connecting rods.
The structure of the expanding mechanism of GMR is shown in Figure 2.  The motor provides driving force, the torque is reduced by the reducer, the force is transmitted to the transmission gear set, and then the transmission shaft is driven to rotate by the transmission gear set, thereby driving the expanding arm to achieve expanding and folding. The expanding arm is in contact with the intestinal tract during the expansion process. The larger the expanding radius is, the greater the resistance will be, resulting in the larger the current of the control circuit. It is assumed that: (1) the mechanical properties of various parts of the human digestive tract are the same, The mechanical structure of the robot mainly consists of three parts: the front expanding mechanism (FEM), the rear expanding mechanism (REM), and the telescoping mechanism (TM). The FEM and REM have the same structure, the FEM moves relative to the TM, and the REM is fixed to the TM. The expanding mechanism is mainly composed of a driving device, a transmission device and three sets of expanding arms. The driving device is composed of a hollow cup motor and a reducer. The reducer adopts a 5-layer planetary gear type structure, and the reduction ratio of each layer is 4. The transmission device is mainly composed of three sets of external meshing gears. There are three sets of expansion arms, each consisting of four curved connecting rods.
The structure of the expanding mechanism of GMR is shown in Figure 2. The mechanical structure of the robot mainly consists of three parts: the front expanding mechanism (FEM), the rear expanding mechanism (REM), and the telescoping mechanism (TM). The FEM and REM have the same structure, the FEM moves relative to the TM, and the REM is fixed to the TM. The expanding mechanism is mainly composed of a driving device, a transmission device and three sets of expanding arms. The driving device is composed of a hollow cup motor and a reducer. The reducer adopts a 5-layer planetary gear type structure, and the reduction ratio of each layer is 4. The transmission device is mainly composed of three sets of external meshing gears. There are three sets of expansion arms, each consisting of four curved connecting rods.
The structure of the expanding mechanism of GMR is shown in Figure 2.  The motor provides driving force, the torque is reduced by the reducer, the force is transmitted to the transmission gear set, and then the transmission shaft is driven to rotate by the transmission gear set, thereby driving the expanding arm to achieve expanding and folding. The expanding arm is in contact with the intestinal tract during the expansion process. The larger the expanding radius is, the greater the resistance will be, resulting in the larger the current of the control circuit. It is assumed that: (1) the mechanical properties of various parts of the human digestive tract are the same, The motor provides driving force, the torque is reduced by the reducer, the force is transmitted to the transmission gear set, and then the transmission shaft is driven to rotate by the transmission gear set, thereby driving the expanding arm to achieve expanding and folding. The expanding arm is in contact with the intestinal tract during the expansion process. The larger the expanding radius is, the greater the resistance will be, resulting in the larger the current of the control circuit. It is assumed that: (1) the mechanical properties of various parts of the human digestive tract are the same, (2) the motor performance remains stable all the time. The upper limit of current is set in the control circuit through in vitro intestinal experiment. Once the upper limit of the current is exceeded, the expanding arm will stop expanding, so as to avoid damage to the intestinal tract caused by excessive expanding force.
The relevant parameters of the expanding mechanism are shown in Table 1.

Locomotion Principle
The locomotion principle is shown in Figure 3. Two expanding mechanisms of the GMR alternately expand and fold. The screw-nut pair of the telescoping mechanism drive the folded expanding mechanism to move, thereby the robot moves in the intestinal tract.
Step 0: The FEM and REM are folded.
Step 2: The screw-nut pair drive the FEM to move forward.
Step 3: The FEM expands first, and then the REM folds.
Step 4: The screw-nut pair drive the REM to move forward. The inchworm-like GMR repeats the Step 1-4, thus moves forward. (2) the motor performance remains stable all the time. The upper limit of current is set in the control circuit through in vitro intestinal experiment. Once the upper limit of the current is exceeded, the expanding arm will stop expanding, so as to avoid damage to the intestinal tract caused by excessive expanding force. The relevant parameters of the expanding mechanism are shown in Table 1.

Locomotion Principle
The locomotion principle is shown in Figure 3. Two expanding mechanisms of the GMR alternately expand and fold. The screw-nut pair of the telescoping mechanism drive the folded expanding mechanism to move, thereby the robot moves in the intestinal tract.
Step 0: The FEM and REM are folded.
Step 2: The screw-nut pair drive the FEM to move forward.
Step 3: The FEM expands first, and then the REM folds.
Step 4: The screw-nut pair drive the REM to move forward. The inchworm-like GMR repeats the Step 1-4, thus moves forward. Step 0

Kinematics Analysis
For rigid body kinematics analysis of the expanding arm, the expanding arm is simplified into a slider-crank mechanism module, as shown in Figure 4. Create a Cartesian coordinate system Oxy with the center of the mechanism O as the origin, and define the coordinates of the hinge points O 1 (x 1 ,y 1 ), M(x 2 ,y 2 ), P(x 3 ,y 3 ).

Kinematics Analysis
For rigid body kinematics analysis of the expanding arm, the expanding arm is simplified into a slider-crank mechanism module, as shown in Figure 4. Create a Cartesian coordinate system Oxy with the center of the mechanism O as the origin, and define the coordinates of the hinge points O1(x1,y1), M(x2,y2), P(x3,y3). The mathematical model of the hinge point coordinate matrix S is as follows: x y The constraint equation is: where, l1, l2 are the lengths of the rod O1M and the rod MP, respectively; θ, α are the angles of the rod O1M and the rod MP with the vertical direction, respectively.
The point O1 is a fixed point, let x1 = c, y1 = r0, and c, r0 is constant. Then in the Oxy coordinate system, the mathematical model of each hinge point coordinate matrix is: where, ( )  The mathematical model of the hinge point coordinate matrix S is as follows: The constraint equation is: where, l 1 , l 2 are the lengths of the rod O 1 M and the rod MP, respectively; θ, α are the angles of the rod O 1 M and the rod MP with the vertical direction, respectively. The point O 1 is a fixed point, let x 1 = c, y 1 = r 0 , and c, r 0 is constant. Then in the Oxy coordinate system, the mathematical model of each hinge point coordinate matrix is: where, Q = l 2 2 − (l 1 · sin θ + c) 2 . The first and second derivatives of coordinate matrix S with respect to time t are velocity matrix V and acceleration matrix A of each hinge point respectively.
It is the angular velocity of the rod O 1 M. According to the above Equations (1)-(5), the expanding radius r c and the velocity and acceleration of point P can be obtained. As follows:   The relevant design parameters of the expanding mechanism are shown in Table 2. At different expanding radii r c (7.5 mm ≤ r c ≤ 24.5 mm), the velocity v p and acceleration a p of point P are shown in Figure 5. When the expanding radius r c = 10.0 mm, the absolute value of acceleration at point P reaches the maximum, |a p | max = 53.12 mm 2 /s. When the expanding radius r c = 15.2 mm, the point P velocity reaches the maximum, v pmax = 22.28 mm/s.
It is the angular velocity of the rod O1M. According to the above Equations (1)-(5), the expanding radius rc and the velocity and acceleration of point P can be obtained. As follows: The relevant design parameters of the expanding mechanism are shown in Table 2. At different expanding radii rc (7.5 mm ≤ rc ≤ 24.5 mm), the velocity vp and acceleration ap of point P are shown in Figure 5. When the expanding radius rc = 10.0 mm, the absolute value of acceleration at point P reaches the maximum, |ap|max = 53.12 mm 2 /s. When the expanding radius rc = 15.2 mm, the point P velocity reaches the maximum, vpmax = 22.28 mm/s.

Expanding Force Analysis
For expanding force analysis of the expanding mechanism, the expanding arm can be considered as a static system, as shown in Figure 6.

Expanding Force Analysis
For expanding force analysis of the expanding mechanism, the expanding arm can be considered as a static system, as shown in Figure 6. According to the principle of virtual work, the virtual work done by the moments T1 and T2 on the small-angle increment Δθ is T1·Δθ and T2·Δθ, respectively.
From Equation (3): According to Equations (7), (8), the expanding force FP can be derived: where, rc is the radius of expanding; P F and P F ′ are the expanding force and reaction force at point P; T1 and T2 are the maximum driving torques acting on O1 and O2, respectively; T is the maximum driving torque of the expanding arm under the rated voltage of the motor, the value is tested to be 32 N·mm.
According to Equations (1) and (9), the relationship between the expanding force at point P FP and the expanding radius rc can be obtained, as shown in Figure 7. As the mechanism arm expands, the expanding force FP first gets smaller and then larger. When rc = 7.5 mm (the fully folded state of the expanding arm), FP is the maximum, FPmax = FP(7.5) = 28.498 N. After that, FP sharply decreases.  According to the principle of virtual work, the virtual work done by the moments T 1 and T 2 on the small-angle increment ∆θ is T 1 ·∆θ and T 2 ·∆θ, respectively.
From Equation (3): According to Equations (7), (8), the expanding force F P can be derived: where, r c is the radius of expanding; F P and F P are the expanding force and reaction force at point P; T 1 and T 2 are the maximum driving torques acting on O 1 and O 2 , respectively; T is the maximum driving torque of the expanding arm under the rated voltage of the motor, the value is tested to be 32 N·mm. According to Equations (1) and (9), the relationship between the expanding force at point P F P and the expanding radius r c can be obtained, as shown in Figure 7. As the mechanism arm expands, the expanding force F P first gets smaller and then larger. When r c = 7.5 mm (the fully folded state of the expanding arm), F P is the maximum, F Pmax = F P (7.5) = 28.498 N. After that, F P sharply decreases. F P changes relatively small when r c is from 10 mm to 22 mm. When r c = 15.3 mm, F P is the minimum,

Elastodynamic Model
The expanding arm is simplified into a slider-crank mechanism module and divides the module into three units. Think of the crank as a unit-unit 1, the connecting rod is divided into two unitsunits 2 and 3. Set 11 generalized coordinates in the mechanism U = [U1 U2 … U11] T , as shown in Figure  8. For each unit, define the angle between the beam element and the horizontal direction as θ. define the generalized coordinate array of the unit u = [u1 u2 … u8] T . where u1, u5 are the longitudinal displacements of the nodes at both ends of each unit; u2, u6 are the lateral displacements of the nodes at both ends of each unit; u3, u7 are the elastic corners of the nodes at both ends of each unit; u4, u8 are the curvatures of the nodes at both ends of each unit. The unit generalized coordinate array in the absolute coordinate system is defined as U e . For the i-th unit, their relationship is shown as follows: where R is the coordinate transformation matrix; Bi is the coordinate coordination matrix, which is an 8 × 11 matrix in this model, and the R and Bi is as follows: Figure 7. The curve of expanding force to expanding radius.

Elastodynamic Model
The expanding arm is simplified into a slider-crank mechanism module and divides the module into three units. Think of the crank as a unit-unit 1, the connecting rod is divided into two units-units 2 and 3. Set 11 generalized coordinates in the mechanism U = [U 1 U 2 . . . U 11 ] T , as shown in Figure 8.

Elastodynamic Model
The expanding arm is simplified into a slider-crank mechanism module and divides the module into three units. Think of the crank as a unit-unit 1, the connecting rod is divided into two unitsunits 2 and 3. Set 11 generalized coordinates in the mechanism U = [U1 U2 … U11] T , as shown in Figure  8. For each unit, define the angle between the beam element and the horizontal direction as θ. define the generalized coordinate array of the unit u = [u1 u2 … u8] T . where u1, u5 are the longitudinal displacements of the nodes at both ends of each unit; u2, u6 are the lateral displacements of the nodes at both ends of each unit; u3, u7 are the elastic corners of the nodes at both ends of each unit; u4, u8 are the curvatures of the nodes at both ends of each unit. The unit generalized coordinate array in the absolute coordinate system is defined as U e . For the i-th unit, their relationship is shown as follows: where R is the coordinate transformation matrix; Bi is the coordinate coordination matrix, which is an 8 × 11 matrix in this model, and the R and Bi is as follows: For each unit, define the angle between the beam element and the horizontal direction as θ. define the generalized coordinate array of the unit u = [u 1 u 2 . . . u 8 ] T . where u 1 , u 5 are the longitudinal displacements of the nodes at both ends of each unit; u 2 , u 6 are the lateral displacements of the nodes at both ends of each unit; u 3 , u 7 are the elastic corners of the nodes at both ends of each unit; u 4 , u 8 are the curvatures of the nodes at both ends of each unit. The unit generalized coordinate array in the absolute coordinate system is defined as U e . For the i-th unit, their relationship is shown as follows: where R is the coordinate transformation matrix; B i is the coordinate coordination matrix, which is an 8 × 11 matrix in this model, and the R and B i is as follows: The differential equation of motion of the mechanical system can be expressed as: Where, M, C, and K are the mass matrix, damping matrix, and stiffness matrix of the system, respectively. F is the generalized force array of the system, and .. U r is the rigid body acceleration array of the system, which can be obtained by the rigid body motion analysis of the mechanism. U is the system generalized coordinate array, . U and ..
U are the first and second derivatives of the system generalized coordinate array U with respected to time t, respectively.

Elastodynamic Analysis by FEA
During the locomotion of the robot in the intestine, the force exerted by the intestine on the expanding arm can be divided into two directions. One is the resistance Fr in the radial direction formed by the elastic deformation of the intestine, and the other is the resistance Ft of the intestine to the expanding arm in the direction of locomotion of the robot, as shown in Figure 9. According to the above expanding force analysis, the theoretical radial resistance Fr on the expanding arm can be obtained. According to literature [28], Ft ≤ 0.6 N.
Since the expanding arm is an arc structure, if it is equivalent to a straight beam with a uniform section, some errors will be caused to the result, so the elastodynamic analysis of the expanding arm is carried out by the FEA software ANSYS [29].
The load applied to the expanding arm in ANSYS is shown in Figure 10. According to the above analysis, a radial resistance Fr and an axial resistance Ft = 0.6 N are applied to the expanding arm, and the velocity load ω = 1.7 rad/s is applied to the two D-shaped holes of the expanding arm respectively. Expanding mechanism design must meet the requirements of the thickness of two layer expanding arm + the thickness of bottom plate (0.8 mm) + the thickness of two layer backing plate (2 mm × 0.4 mm) ≤ the thickness of reducer (6 mm) − half of the thickness of connection sleeve (0.5 mm × 4 mm), so the thickness of monolayer expanding arm ≤ 1.2 mm. In order to ensure the strength, the maximum thickness of the monolayer expanding arm should be 1.2 mm before in-depth strength analysis. Since the expanding arm is an arc structure, if it is equivalent to a straight beam with a uniform section, some errors will be caused to the result, so the elastodynamic analysis of the expanding arm is carried out by the FEA software ANSYS [29].
The load applied to the expanding arm in ANSYS is shown in Figure 10. According to the above analysis, a radial resistance Fr and an axial resistance Ft = 0.6 N are applied to the expanding arm, and the velocity load ω = 1.7 rad/s is applied to the two D-shaped holes of the expanding arm respectively. Expanding mechanism design must meet the requirements of the thickness of two layer expanding arm + the thickness of bottom plate (0.8 mm) + the thickness of two layer backing plate (2 mm × 0.4 mm) ≤ the thickness of reducer (6 mm) − half of the thickness of connection sleeve (0.5 mm × 4 mm), so the thickness of monolayer expanding arm ≤ 1.2 mm. In order to ensure the strength, the maximum thickness of the monolayer expanding arm should be 1.2 mm before in-depth strength analysis. The equivalent stress distribution of the expanding arm is shown in Figure 11. Figure 12 shows the maximum equivalent stress values of the expanding arms 1 and 2 with different expanding radii. It can be seen that with the expansion of the expanding arm, the maximum equivalent stress appears alternately on the expanding arm 1 and 2. The maximum equivalent stress of the whole motion process appears on expanding arm 2 in the initial expanding phase and the maximum value σmax = 428.53 MPa. The material of the expanding arm is Ti-6Al-4V ELI, its yield strength σs = 950 MPa. The safety factor [s] is set to 1.1, so the safety stress of expanding arm is σ[s] = σs/[s] = 864 MPa. As σmax < σ[s], the strength of expanding arm meets requirements.  Since the expanding arm is an arc structure, if it is equivalent to a straight beam with a uniform section, some errors will be caused to the result, so the elastodynamic analysis of the expanding arm is carried out by the FEA software ANSYS [29].
The load applied to the expanding arm in ANSYS is shown in Figure 10. According to the above analysis, a radial resistance Fr and an axial resistance Ft = 0.6 N are applied to the expanding arm, and the velocity load ω = 1.7 rad/s is applied to the two D-shaped holes of the expanding arm respectively. Expanding mechanism design must meet the requirements of the thickness of two layer expanding arm + the thickness of bottom plate (0.8 mm) + the thickness of two layer backing plate (2 mm × 0.4 mm) ≤ the thickness of reducer (6 mm) − half of the thickness of connection sleeve (0.5 mm × 4 mm), so the thickness of monolayer expanding arm ≤ 1.2 mm. In order to ensure the strength, the maximum thickness of the monolayer expanding arm should be 1.2 mm before in-depth strength analysis. The equivalent stress distribution of the expanding arm is shown in Figure 11. Figure 12 shows the maximum equivalent stress values of the expanding arms 1 and 2 with different expanding radii. It can be seen that with the expansion of the expanding arm, the maximum equivalent stress appears alternately on the expanding arm 1 and 2. The maximum equivalent stress of the whole motion process appears on expanding arm 2 in the initial expanding phase and the maximum value σmax = 428.53 MPa. The material of the expanding arm is Ti-6Al-4V ELI, its yield strength σs = 950 MPa. The safety factor [s] is set to 1.1, so the safety stress of expanding arm is σ[s] = σs/[s] = 864 MPa. As σmax < σ[s], the strength of expanding arm meets requirements. The equivalent stress distribution of the expanding arm is shown in Figure 11. Figure 12 shows the maximum equivalent stress values of the expanding arms 1 and 2 with different expanding radii. It can be seen that with the expansion of the expanding arm, the maximum equivalent stress appears alternately on the expanding arm 1 and 2. The maximum equivalent stress of the whole motion process appears on expanding arm 2 in the initial expanding phase and the maximum value σ max = 428.53 MPa. The material of the expanding arm is Ti-6Al-4V ELI, its yield strength σ s = 950 MPa. The safety factor [s] is set to 1.1, so the safety stress of expanding arm is σ [s] = σ s /[s] = 864 MPa. As σ max < σ[s], the strength of expanding arm meets requirements.
Based on the FEA, the response of the velocity v pf and the acceleration a pf of point P is compared with the theoretical value v p and a p as shown in Figure 13a,b. As can be seen from the figure, the velocity and acceleration of the expanding arm fluctuate greatly in three stages, namely r c = 7.5 mm stage, r c = 8.5-9.7 mm stage, and r c = 22.8-24.0 mm stage. The corresponding maximum deviation values of velocity |∆v| max and acceleration |∆a| max are shown in Table 3. From the comparison between Figures 12  and 13, it can be seen that when the stress mutation occurs in the expanding arm, the velocity and acceleration of point P will fluctuate. Micromachines 2019, 10, x FOR PEER REVIEW 11 of 18 Figure 11. The equivalent stress of expanding arm.  Table 3. From the comparison between Figures 12 and 13, it can be seen that when the stress mutation occurs in the expanding arm, the velocity and acceleration of point P will fluctuate.  Based on the FEA, the response of the velocity vpf and the acceleration apf of point P is compared with the theoretical value vp and ap as shown in Figure 13a,b. As can be seen from the figure, the velocity and acceleration of the expanding arm fluctuate greatly in three stages, namely rc = 7.5 mm stage, rc = 8.5-9.7 mm stage, and rc = 22.8-24.0 mm stage. The corresponding maximum deviation values of velocity |Δv|max and acceleration |Δa|max are shown in Table 3. From the comparison between Figures 12 and 13, it can be seen that when the stress mutation occurs in the expanding arm, the velocity and acceleration of point P will fluctuate.

Structure Optimization of the Expanding Arm
As can be seen from the above FEA, the maximum stress of the expanding arm is far less than

Structure Optimization of the Expanding Arm
As can be seen from the above FEA, the maximum stress of the expanding arm is far less than the safe stress, and the stress is mainly concentrated at the joint of each arm and the edge of the expanding arm, so the structure of the expanding arm needs to be optimized.
The thickness of the expanding arm is first optimized. The maximum equivalent stress is less than the safe value as the boundary condition. The thickness of the expanding arm is used as the optimization variable. The objective of the optimization is to minimize the thickness of the expansion arm. As shown in the following formula: where h i is the thickness of the expanding arm, σ max-h is the maximum equivalent stress of the expanding arm with different thicknesses. The FEA is carried out on the expanding arms with different thickness respectively to obtain the maximum equivalent stress in the whole movement process, as shown in Table 4. It can be seen from Table 4 that when the thickness of the expanding arm is 0.8 mm, the stress of the expanding arm does not meet the safety requirement, so the thickness of the expanding arm is optimal when it is 1 mm. It can be seen from the stress distribution of the expanding arm that the stress in the middle region is much less than the stress in the edge region. The structure optimization of expanding arm 1 and 2 is carried out respectively. First, hollow out the middle region of the expanding arm. Then, the middle region of the expansion arm is divided into segments 1, 2, 3... until the maximum equivalent stress of the expanding arm is less than the safety stress. The optimization process is shown in Figure 14. From the analysis results, it can be concluded that the stress of the hollow part of expanding arm 1 and 2 meets the safety requirements when they are divided into three segments. Figure 15 shows the equivalent stress curve of the optimized expanding arm 1 and 2 during the movement. It can be seen that the stress of the optimized expanding arm is increased, and the overall maximum equivalent stress appears on the expanding arm 1, the maximum value σ' max = 852.47 MPa < σ [s] = 864 MPa, it meets the requirements of safety strength. shown in Figure 14. From the analysis results, it can be concluded that the stress of the hollow part of expanding arm 1 and 2 meets the safety requirements when they are divided into three segments.  Figure 15 shows the equivalent stress curve of the optimized expanding arm 1 and 2 during the movement. It can be seen that the stress of the optimized expanding arm is increased, and the overall maximum equivalent stress appears on the expanding arm 1, the maximum value σ'max = 852.47 MPa < σ[s] = 864 MPa, it meets the requirements of safety strength.
The comparison between the velocity v'pf and acceleration a'pf at point P of the optimized expanding arm and the theoretical value is shown in Figure 16a,b. As before structural optimization, the velocity and acceleration of the optimized expanding arm fluctuate greatly in three stages. The corresponding maximum deviation values of velocity |Δv|max, and acceleration |Δa|max are shown in Table 5. Affected by the increase of stress, the fluctuation of velocity and acceleration at point P of expanding arm also increases. Figure 17 shows the comparison of equivalent stress with different expanding radii before and after the expansion arm optimization. After optimization, the overall thickness of the expanding arm is reduced by 0.4 mm, the weight of expanding arm is reduced by 31%.    Figure 15 shows the equivalent stress curve of the optimized expanding arm 1 and 2 during the movement. It can be seen that the stress of the optimized expanding arm is increased, and the overall maximum equivalent stress appears on the expanding arm 1, the maximum value σ'max = 852.47 MPa < σ[s] = 864 MPa, it meets the requirements of safety strength.
The comparison between the velocity v'pf and acceleration a'pf at point P of the optimized expanding arm and the theoretical value is shown in Figure 16a,b. As before structural optimization, the velocity and acceleration of the optimized expanding arm fluctuate greatly in three stages. The corresponding maximum deviation values of velocity |Δv|max, and acceleration |Δa|max are shown in Table 5. Affected by the increase of stress, the fluctuation of velocity and acceleration at point P of expanding arm also increases. Figure 17 shows the comparison of equivalent stress with different expanding radii before and after the expansion arm optimization. After optimization, the overall thickness of the expanding arm is reduced by 0.4 mm, the weight of expanding arm is reduced by 31%.  The comparison between the velocity v' pf and acceleration a' pf at point P of the optimized expanding arm and the theoretical value is shown in Figure 16a,b. As before structural optimization, the velocity and acceleration of the optimized expanding arm fluctuate greatly in three stages. The corresponding maximum deviation values of velocity |∆v|max, and acceleration |∆a|max are shown in Table 5. Affected by the increase of stress, the fluctuation of velocity and acceleration at point P of expanding arm also increases.     Figure 17 shows the comparison of equivalent stress with different expanding radii before and after the expansion arm optimization. After optimization, the overall thickness of the expanding arm is reduced by 0.4 mm, the weight of expanding arm is reduced by 31%.
(a) (b) Figure 16. The response curves of velocity (a) and acceleration (b) after optimization.

Expanding Force Test
According to theoretical analysis, the expanding force is large in the fully folded stage, which may cause intestinal damage. Therefore, a mechanical test platform is built to test the actual expanding force of the expanding mechanism, as shown in Figure 18. The test platform consists of the DC power supply, dynamometer, control switch, clamping device, and base. The expanding mechanism is fixed on the clamping device, and the knob on the clamping device is used to adjust Figure 17. Comparison of stress distribution before and after optimization.

Expanding Force Test
According to theoretical analysis, the expanding force is large in the fully folded stage, which may cause intestinal damage. Therefore, a mechanical test platform is built to test the actual expanding force of the expanding mechanism, as shown in Figure 18. The test platform consists of the DC power supply, dynamometer, control switch, clamping device, and base. The expanding mechanism is fixed on the clamping device, and the knob on the clamping device is used to adjust the distance between the expanding mechanism and the probe of the dynamometer, so as to measure the expanding force under different expanding radius. The control switch is used to control the forward and reverse of the motor and to protect the motor.
the distance between the expanding mechanism and the probe of the dynamometer, so as to measure the expanding force under different expanding radius. The control switch is used to control the forward and reverse of the motor and to protect the motor. Based on this platform, the expanding forces of the expanding arms 1, 2 and 3 are tested at the interval of 1 mm and the limit positions of 7.5 mm and 24.5 mm respectively. Each group of expanding arms is tested three times, and the average value is obtained. The experimental and theoretical curves of the expanding forces of the three groups of expanding arms are compared, as shown in Figure 19. The analysis of the experimental results is as follows: The three groups of experimental curves have the same trend as the theoretical curves, and the experimental values are less than the theoretical values. This is due to the efficiency of gear transmission and friction loss between mechanisms.
The maximum experimental value of three groups of expanding arms is 6.5 N, and the minimum experimental value is 1.3 N. The expanding force of expanding arm 1 is larger than that of expanding arm 2 and 3. In the process of installation, the running-in degree and transmission gear of expanding arm 1 is better than that of expanding arm 2 and 3, and the friction resistance is smaller in the course of motion, so that the expanding force is larger than that of the other two groups.
When the expanding radius is from 7.5 mm to 10 mm and from 22 mm to 24.5 mm, the slope of the curve is larger so that the small disturbance will cause a huge error to the expanding force, so the error between the experimental value and the theoretical value is larger. When the expanding radius is 10 mm to 22 mm, the curve is relatively stable and the error is relatively small. The average Based on this platform, the expanding forces of the expanding arms 1, 2 and 3 are tested at the interval of 1 mm and the limit positions of 7.5 mm and 24.5 mm respectively. Each group of expanding arms is tested three times, and the average value is obtained. The experimental and theoretical curves of the expanding forces of the three groups of expanding arms are compared, as shown in Figure 19.
the distance between the expanding mechanism and the probe of the dynamometer, so as to measure the expanding force under different expanding radius. The control switch is used to control the forward and reverse of the motor and to protect the motor. Based on this platform, the expanding forces of the expanding arms 1, 2 and 3 are tested at the interval of 1 mm and the limit positions of 7.5 mm and 24.5 mm respectively. Each group of expanding arms is tested three times, and the average value is obtained. The experimental and theoretical curves of the expanding forces of the three groups of expanding arms are compared, as shown in Figure 19. The analysis of the experimental results is as follows: The three groups of experimental curves have the same trend as the theoretical curves, and the experimental values are less than the theoretical values. This is due to the efficiency of gear transmission and friction loss between mechanisms.
The maximum experimental value of three groups of expanding arms is 6.5 N, and the minimum experimental value is 1.3 N. The expanding force of expanding arm 1 is larger than that of expanding arm 2 and 3. In the process of installation, the running-in degree and transmission gear of expanding arm 1 is better than that of expanding arm 2 and 3, and the friction resistance is smaller in the course of motion, so that the expanding force is larger than that of the other two groups.
When the expanding radius is from 7.5 mm to 10 mm and from 22 mm to 24.5 mm, the slope of the curve is larger so that the small disturbance will cause a huge error to the expanding force, so the error between the experimental value and the theoretical value is larger. When the expanding radius is 10 mm to 22 mm, the curve is relatively stable and the error is relatively small. The average The analysis of the experimental results is as follows: The three groups of experimental curves have the same trend as the theoretical curves, and the experimental values are less than the theoretical values. This is due to the efficiency of gear transmission and friction loss between mechanisms.
The maximum experimental value of three groups of expanding arms is 6.5 N, and the minimum experimental value is 1.3 N. The expanding force of expanding arm 1 is larger than that of expanding arm 2 and 3. In the process of installation, the running-in degree and transmission gear of expanding arm 1 is better than that of expanding arm 2 and 3, and the friction resistance is smaller in the course of motion, so that the expanding force is larger than that of the other two groups.
When the expanding radius is from 7.5 mm to 10 mm and from 22 mm to 24.5 mm, the slope of the curve is larger so that the small disturbance will cause a huge error to the expanding force, so the error between the experimental value and the theoretical value is larger. When the expanding radius is 10 mm to 22 mm, the curve is relatively stable and the error is relatively small. The average experimental value of the expansion arm 1 is 79.30% of the theoretical value, the expansion arm 2 is 68.04%, and the expansion arm 3 is 63.90%.

Locomotion Experiment
In order to verify the reliability and safety of the optimized mechanism, the robot is placed in a rigid tube (acrylic tube) and an isolated intestine (pig small intestine) for the locomotion experiment, as shown in Figure 20a-f. Figure 20a-c show the robot moving in the rigid pipe, and Figure 20d-f show the robot moving in the in vitro intestinal tract. During the locomotion of the robot, the mechanism works stably and reliably, and there is no obvious bending deformation of the expanding arm and no obvious damage to the intestine by a visual check. The average velocity of the robot in rigid tubes is 1.21 mm/s, while that in in vitro intestines was 0.94 mm/s. The velocity of the robot in the isolated intestine was significantly lower than that in the rigid tube. This is because the robot will lose step when it locomotes in the intestine. The main reasons for step loss are as follows: experimental value of the expansion arm 1 is 79.30% of the theoretical value, the expansion arm 2 is 68.04%, and the expansion arm 3 is 63.90%.

Locomotion Experiment
In order to verify the reliability and safety of the optimized mechanism, the robot is placed in a rigid tube (acrylic tube) and an isolated intestine (pig small intestine) for the locomotion experiment, as shown in Figure 20a-f. Figure 20a-c show the robot moving in the rigid pipe, and Figure 20d-f show the robot moving in the in vitro intestinal tract. During the locomotion of the robot, the mechanism works stably and reliably, and there is no obvious bending deformation of the expanding arm and no obvious damage to the intestine by a visual check. The average velocity of the robot in rigid tubes is 1.21 mm/s, while that in in vitro intestines was 0.94 mm/s. The velocity of the robot in the isolated intestine was significantly lower than that in the rigid tube. This is because the robot will lose step when it locomotes in the intestine. The main reasons for step loss are as follows: The intestinal tract is malleable. As the robot locomotes in the intestine, the intestine will be elongated.
Compared with rigid pipes, the intestinal tract is relatively slippery. During the locomotion of the robot, there is slippage between the expanding mechanism and the intestinal tract, leading to the loss of step distance and the decrease of velocity.

Conclusion
In this paper, a novel GMR is proposed. Compared with other commercialized capsule endoscopy systems, the GMR proposed in this paper has the following advantages: (1) The GMR can achieve active locomotion in the intestinal tract so that the intestinal tract can be detected at a fixed point and the diagnostic efficiency can be improved. (2) The GMR has the function of expanding the intestinal tract so that the collapsed and folded areas of the intestinal tract can be seen to reduce missed detection. The double-layer overlapping structure of expanding arm increases the VDA of the mechanism and the contact area with the intestine, so that the robot has a certain improvement in reliability and safety to the gastrointestine. Based on the elastodynamics analysis, a structure optimization method of the expanding arm is proposed. After optimization, the overall thickness of the expanding arm is reduced by 0.4 mm, the weight of expanding arm is reduced by 31%. Then the reliability and safety of the optimized expanding mechanism are proved by experiments. The results show that this optimization method is effective and this method can also be applied to the overall structure optimization of the GMR in the future.
However, there are still some problems with the robot. The structure of the GMR in this paper can be divided into two parts, one is composed of the imaging module and the front expanding The intestinal tract is malleable. As the robot locomotes in the intestine, the intestine will be elongated.
Compared with rigid pipes, the intestinal tract is relatively slippery. During the locomotion of the robot, there is slippage between the expanding mechanism and the intestinal tract, leading to the loss of step distance and the decrease of velocity.

Conclusion
In this paper, a novel GMR is proposed. Compared with other commercialized capsule endoscopy systems, the GMR proposed in this paper has the following advantages: (1) The GMR can achieve active locomotion in the intestinal tract so that the intestinal tract can be detected at a fixed point and the diagnostic efficiency can be improved. (2) The GMR has the function of expanding the intestinal tract so that the collapsed and folded areas of the intestinal tract can be seen to reduce missed detection. The double-layer overlapping structure of expanding arm increases the VDA of the mechanism and the contact area with the intestine, so that the robot has a certain improvement in reliability and safety to the gastrointestine. Based on the elastodynamics analysis, a structure optimization method of the expanding arm is proposed. After optimization, the overall thickness of the expanding arm is reduced by 0.4 mm, the weight of expanding arm is reduced by 31%. Then the reliability and safety of the optimized expanding mechanism are proved by experiments. The results show that this optimization method is effective and this method can also be applied to the overall structure optimization of the GMR in the future.
However, there are still some problems with the robot. The structure of the GMR in this paper can be divided into two parts, one is composed of the imaging module and the front expanding mechanism, and the other is composed of the rear expanding mechanism, the telescoping mechanism, the wireless power receiving module, and the control circuit module. There is a big difference in mass between the two parts, with the latter weight about twice as much as the former. This will decrease the locomotion efficiency of the robot. The emphasis of future work is to reduce the overall weight of the robot, optimize the weight distribution, and improve the locomotion efficiency of the robot.