## 7 Stability and Support Polygons  
The stability of a hexapod robot's motion is primarily ensured by maintaining the center of mass (CoM) within the support polygon formed by the legs in contact with the ground. During omnidirectional walking, tripod gaits are employed, where three legs are in contact with the ground at any time, forming a triangular support polygon. The variation in \(q_{5}\), which defines the robot's orientation and direction, contributes to generating a smooth trajectory, as illustrated in Figure 27. However, the key factor in ensuring that the CoM remains within the support polygons, thus maintaining stability and avoiding collisions, lies in the geometric design of the closed-loop trajectory. The trajectory design in this study utilizes the following parameters:  
* \(a=40\) mm--Semi--major axis of the elliptical trajectory. * \(b=20\) mm--Semi--minor axis of the elliptical trajectory. * \(\omega=2\pi\) rad/s--Angular frequency of the trajectory. * \(\theta=\pi/4\) rad--Rotation angle defining the trajectory's orientation. * \(\eta_{1}=0\)--Phase shift constant for the first group of legs, ranging from 0 to 1. * \(\eta_{2}=1\)--Phase shift constant for the second group of legs, ranging from 0 to 1. These parameters define the shape and orientation of the closed-loop trajectory, ensuring that it fits within the robot's workspace and supports stable locomotion. Figure 27 illustrates the perimeters of the support polygons during an omnidirectional walk of the hexapod robot. The polygons shown represent the space covered by the legs in contact with the ground as the trajectory parameter \(q_{5}\) varies linearly. These results  
Figure 26: Behavior of joint variables for a sinusoidal function of \(q_{5}\). Figure 27: Perimeters of the support polygons generated during an omnidirectional walk. The blue polygons represent the groups of legs in contact with the ground. The circle in the center indicates the position of the CoM. These results correspond to kinematic walks on a uniform surface. correspond to kinematic walks performed on a uniform surface, which is essential for understanding the behavior of the support polygons under controlled conditions. In this article, the frequency of this tripod gait pattern is adjusted by modifying the parameter \(\eta\). This adjustment is reflected in the time vector \(t\), which includes a phase shift \(\eta\) as described in (19). This modification allows for precise control over the timing of the leg movements, ensuring that the robot's trajectory remains smooth and consistent with the desired gait pattern (see Table 4). Let \(\text{Leg}_{i}\) represent the position of leg \(i\) in a local reference frame of the robot. For a set of three legs in contact with the ground, the support polygon is defined by the vertices \((\text{Leg}_{1},\text{Leg}_{3},\text{Leg}_{5})\) for one set of legs and \((\text{Leg}_{2},\text{Leg}_{4},\text{Leg}_{6})\) for the complementary set. The condition for stability is established when the projection of the CoM onto the ground plane, denoted as \(\mathbf{C}\), is contained within the area of these polygons, such that:  
\[\text{Stability}\equiv\mathbf{C}\in\text{Area of the Support Polygon.} \tag{27}\]  
The design of the closed-loop trajectory is critical for maintaining stability throughout the robot's movement. While the variation in the parameter \(q_{5}\) contributes to a smooth trajectory, it is the comprehensive design of the closed-loop trajectory that ensures that the CoM remains within the support polygons, preventing collisions and guaranteeing stability. This design must also consider the feasible and safe workspace of the robot, avoiding self-collisions and maintaining the stability condition defined in Equation (27). The importance of these considerations is emphasized in studies such as [5, 7], where the geometric design of the trajectory directly influences the robot's stability.