# Precise Calculation of Inverse Kinematics of the Center of Gravity for Bipedal Walking Robots
## 1 Introduction  
Humanoid robots have a similar joint structure to humans and are expected to perform actions usually performed by them. Robots with human-like mobility that do not require changes in work environments in the industry, space, service, and health sectors can increase the quality of life of people. Humanoid robots have advanced enough for use in industrial settings [1; 2; 3]. These robots mainly consist of a bottom part, which consists of two legs connected to the pelvis that carry the trunk and is responsible for locomotion, and an upper body, which is connected to two arms and contains a central computer, sensors, for Bipedal Walking Robots. _Appl. Sci._**2024**, 14, 3706. [[https://doi.org/10.3390/app14093706](https://doi.org/10.3390/app14093706)]([https://doi.org/10.3390/app14093706](https://doi.org/10.3390/app14093706))  
Automatic Editor: [PERSON]  
Received: 3 April 2024  
Received: 23 April 2024  
Accepted: 24 April 2024  
Published: 26 April 2024  
**Copyright**: © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license ([[https://creativecommons.org/licenses/by/4.0/](https://creativecommons.org/licenses/by/4.0/)]([https://creativecommons.org/licenses/by/4.0/](https://creativecommons.org/licenses/by/4.0/))).  
When the CoG is not calculated precisely, the deviations in the CoG caused by contact forces prevent the locomotion of the robot [27]. The methods used in the literature to solve this are listed in the following paragraph.  
In a previous study, the feet of the robot were increased in size [28]. To increase the accuracy of calculation, in addition to CoG and foot trajectories, analyses requiring the hip position and trajectory and orientation trajectories were carried out [20; 29]. When the weight of the foot constitutes a higher proportion of the total weight of the robot, the foot that is in motion has a greater influence on the locomotive dynamics of the robot. To mitigate this effect, the method of modeling the moving foot as a pendulum was used. Nevertheless, there were still errors in CoG tracking and the movements of the robot were restricted due to the aforementioned assumptions [30].  
Applications aim to ensure that the controller moves the robot within the desired tolerances against these errors. The smallest achievable error was found to be 0.18 m with the inverse dynamics control method [31] and 0.03-0.4 m with the non-linear optimization control method [32].  
In this study, for the precise tracking of the CoG, an iterative method of calculating joint angles was developed, which can calculate the CoG at a precision of 0.001 m or lower, resulting in a single solution. There is no need to select the optimum solution among multiple; only the CoG and the trajectories of the feet are sufficient.  
The novelty of this study is that the precision of the CoG calculation error can be determined before the robot starts moving. Rather than analyzing and eliminating the cause of errors in the CoG trajectory by looking at the trajectory resulting from the control cycle, it would be better to examine the error that occurs according to the predetermined error in establishing cause-effect relationships.  
The rest of this paper is organized as follows. Section 2 gives information on the robot used in this study. The kinematics and dynamics of the robot are explained in Sections 2.2 and 2.3, respectively. The calculation of the CoG and zero-moment point equations is explained in Section 2.4. The main subject of the study, the algorithm, is explained in Section 2.5 with equations and pseudo-code. Initial values and result trajectories are also given. In Section 2.6, the simulation model and parameters of this study are presented. The results of this study are discussed in Section 3, and its conclusions are given in Section 4.