Integer inverse kinematics method using Fuzzy logic

In this paper, we propose an integer inverse kinematics method for multijoint robot control. The method reduces computational overheads and leads to the development of a simple control system as the use of fuzzy logic enables linguistic modeling of the joint angle. A small humanoid robot is used to confirm via experiment that the method produces the same cycling movements in the robot as those in a human. In addition, we achieve fast information sharing by implementing the all-integer control algorithm in a low-cost, low-power microprocessor. Moreover, we evaluate the ability of this method for trajectory generation and confirm that target trajectories are reproduced well. The computational results of the general inverse kinematics model are compared to those of the integer inverse kinematics model and similar outputs are demonstrated. We show that the integer inverse kinematics model simplifies the control process.

computers requires a degree of ingenuity and an efficient algorithm.
Many robots actively work with limbs constructed from links and joints. These joints, e.g., robot arms and legs, often have one or more degrees of freedom (DOF). Forward and inverse kinematics for controlling the limb positions of the target machine are used to relate the controlled object to the coordination system. This is a standard approach to robot control. Naturally, the mathematics involved in this level of control usually includes trigonometric functions and matrix techniques based on real numbers. In addition, the higher is the number of joints of the robot, the more complex and nonlinear the inverse kinematics equation. Such mathematical functions are computationally expensive and a burden on small processors.
To solve the problem of multijoint control, many authors have proposed a control approach based on fuzzy logic or other related technology for simplifying trajectory generation and extending the range of applications. In addition, the purposes of a conventional fuzzy control method for robotic trajectories are an increased robustness in spite of noise or sensor failure, the ability to handle non-linearity without degradation or failure, redundancy resolution, and high-accuracy positioning. However, because the natural fuzzy logic and normalized general calculations rely on a conventional algorithm based on real numbers and their operations, float or double-precision floating number type variables are used in the microprocessor. This is significant burden for small microprocessors that can be reduced by an integer method. [1][2][3][4][5][6].
Fuzzy logic deals with intermediate values via a membership function, in contrast to traditional binary logic. The membership function expands the range of the defined function from {0, 1} to [0, 1]. The function specifies the degree to which an input is included in the set and the numerical value grade. When explaining the theory and mathematical logic using an intermediate value, the grade is often normalized to aid understanding and use. This is natural fuzzy logic and is a general method for quantifying ambiguity. However, normalization is not necessarily needed for computational calculations for fuzzy logic, because it can be calculated by only four arithmetic operations in some defined method of membership function.
In this paper, we propose a simplifying method to implement inverse kinematics using only integer arithmetic. In addition, we show how this approach can be applied to experiments with an actual self-contained multijoint robot and evaluate the reproducibility of the orbit to produce the integer inverse kinematics.

Extended range of fuzzy set
Fuzzy logic can accommodate an unnormalized definition function. We define a fuzzy set A of the universal set X consisting of integer multiples in the one byte range: where μ A (x) is the membership function of A with x ∈ X and is an integer value in the closed interval [0, 255].

Fuzzy model for multijoint robot control
A limb with n joints can be controlled using the following inverse kinematics control model based on fuzzy logic. The ith control rule is given by the fuzzy relation R i defined by the space (x, y, θ) where x and y are the coordinates of bicycle pedal and θ is the joint angle. Then, the fuzzy relations for the robot mechanism joints are given by where j denotes a specific joint, i.e., the hip, knee, or ankle joint.
The following four rule bases use the sentence connective "also": Here, HP, HR, KN, and AN denote the hip pitch, hip roll, and knee and ankle joints, respectively.
The input membership function μ i1 (x) of the x coordinate and the input membership function μ i2 (y) of the y coordinate are defined as where ω i is the grade of the ith rule. The maximum grade for this system is 255, and with this step, the grade value can be truncated to an integer value by the input x. In general, the fuzzy relation between the input and the output membership Here, the measurement points are set to x 0 and y 0 ; an input of (x 0 , y 0 ) gives the output joint angle B 0 j (θ j ). In Eq. (5), ∧ is minimum criterion logic, ∨ is maximum criterion logic, and the function B 0 overlaps each output membership result, which are reduced to their fuzzy set in Eq. (4).
We aim to increase the joint control performance with a lightweight algorithm, and, therefore, we apply a center of gravity (COG) defuzzification method using a singleton-type output membership function: This fuzzy logic control model will be applied to multijointed robots. Thus, this logic can derive each joint angle from the tip coordinate of the limb [7]. Moreover, since this algorithm is, by definition, an integer variable system, any decimal value obtained by division is rounded down according to the microprocessor specifications. Pedaling defines a trajectory that is approximately twodimensional. We thus define the controlled object to be a single foot with 3 DOF.

Integer inverse kinematics control model
The controller utilizes the algorithm defined in Sect. 2 to construct the quantification method for the behavior of the human subject and the formulation of linguistic rules. This algorithm easily describes the behavior of the human subject by the four arithmetic integer operations. In this way, we have realized a lightweight and flexible control process for a small robot. The advantage of the fuzzy model is that human behavior models can be easily applied by the microprocessors inside small robots [8]. To demonstrate, we applied the fuzzy controller to the legs of a small autonomous multijoint type robot. Figure 2 shows the system block diagram of the control section designed by the fuzzy logic.

Linguistic quantification
Using the results of sample image analysis (Table 1), we used fuzzy sets to quantify the (x, y) coordinates of the foot position on the bicycle pedal. Figure 3 shows the input membership functions, scaling factors, language labels, and fuzzy sets. The output membership functions are shown in Fig. 4.
The turning radius of the pedals, the input target object, is 250 mm, and we use eight points at 45 • intervals on the circumference of this circle to define the center of each input membership function fuzzy set to the x-axis. In a similar manner, the joint angles of the leg are allocated to the center of each output membership function fuzzy set. Here, the output membership functions are defined by singletons (Fig. 4). At the same time, fuzzy labels of the singleton set points on the x-axis used as the results of Table 1 are defined for the fuzzy sets of all membership functions using the dynamic characteristic data from the human analysis. These set points are chosen based on previous experimental experience using a general fuzzy technique and the data from Fig. 1.

Fuzzy rule for inverse kinematics
We consider the hip joint fuzzy-control rules R i based on Table 1, Figs. 3, and 4 in the following form: Thus, there is a set of 8 rules for moving each link, and in total, 24 rules describe the inverse kinematic mapping of the 3 hip, knee, and ankle joints in one leg. Table 2 shows the fuzzy control rule table that was obtained from the human action analysis and the 24 rules. This shows the relationship between the language label and the corresponding joint angle dynamics. The rule constitutes the inverse kinematics model used to calculate the joint angles of the 3 DOF system by using fuzzy reasoning for the target coordinates. The rule table is presented in one table for conciseness, but the hip, knee, and ankle joints of the actual rule table are independent. That is, this table relates the (x, y) coordinates of the bicycle pedal to each joint angle using a fuzzy labels, referring to Fig. 1. In addition, the inference algorithm uses the minimum-maximum composition method and a singleton type membership function.   Figure 5 shows a photograph of the robot used in the experiment and the hardware configuration. The lower body is an autonomous 10 DOF humanoid robot with a 16-bit microprocessor [8][9][10][11][12]. However, we have defined the leg to consist of 3 DOF, and, therefore, 6 DOF in total are controlled. The system specifications are shown in Table 3.

Bicycle driving experiment and results
System checks were undertaken by initial simulations before the actual experiment was conducted. The coordinates of pedals were entered into the simulated integer inverse kinematics fuzzy control model, and the output results were confirmed to be the appropriate joint angles. The model was then implemented in a small, low performance 16-bit microprocessor, and an experiment was carried out using the robot. Because the two pedals differ by 180 • (π rad), this was taken into account in calculating the joint angles of each leg. Figure 6 shows the trajectories of each actual robot joint angle as a function of the pedal angle over a sampling time of 100 ms. The pedal angle of rotation was used for the input data at intervals of 1 • (π /180 rad). These results show that the control model, constructed from eight points, complements the angle between these points continuously and smoothly from the angle of the pedal. Figure 7 shows photographs of the bicycle operation performed by the robot. The robot exhibits a fluid pedaling action and good bicycle control. In addition, this result demonstrates that appropriately interpolated trajectories can be used to realize a collaborative twolegged cycling work system. Table 4 lists the calculation times of the joint angles using this algorithm for increasing DOF on a 16-bit microprocessor with a clock frequency of 25 MHz. In the case of a small humanoid robot with 24 DOF, the processing time is about 1 ms. This is equal to the pulse-width modulation (PWM)  control process time of a standard commercial remote-controlled servo motor. The results in Table 4 show that the microprocessor can control all joints without overloading.

Evaluation of integer inverse kinematics
The general inverse kinematics model always gives the same result for the same input. The integer inverse kinematics model with fuzzy logic is constructed by the membership functions and control rules based on three joint angles and movement from sampling image data of human behavior. Therefore, if we can construct an integer inverse kinematics model based on the behavior results from the general inverse kinematics model, then we can evaluate the motion trajectory generative capacities of this integer model.

Feature extraction from general inverse kinematics
We first calculated the 3 DOF movement of the leg from a general inverse kinematics model. Figure 8 shows the simulation models of the real small humanoid behavior used in the experiment. Here, the angles θ 1 , θ 2 , θ 3 , and θ p represent the hip joint, knee joint, ankle joint, and pedal angles, respectively. The angle of the foot is kept constant at 20 • , and the posture for eight pedaling positions at 45 • intervals is shown. The region of interest for this behavior is the hip, knee, and ankle with the sampling posture being the posture of the leg at pedal positions at 45 • intervals (see Fig. 8). The truncated integer joint angle for each posture is recorded in Table 5.
Each joint angle at a pedal angle of 90 • is shown in Fig. 8.

Fuzzy integer inverse kinematics model derived from general inverse kinematics
The membership functions and fuzzy control rules are derived from the behavior and joint angle characteristics. When the (x, y) coordinates of the pedal rotational position is input in 1 • steps, the reproducibility of the integer inverse kinematics model can be demonstrated through a comparison with the calculated results of the general inverse kinematics model. In addition, x and y are used as inputs to express rotation in terms of integer coordinates. Figures 9 and 10 show the input and output membership functions constructed using the survey data of Table 5 and the general inverse kinematic model. The joint angles in Table 5 were sorted in descending order, assigned a label, and from this, the output membership functions and fuzzy control rules (Table 6) were developed.

Evaluation and consideration of integer inverse kinematics model reproducibility
We calculated the hip, knee, and ankle joint angles during the pedaling action using the x and y coordinates of the pedal position for both the general and integer inverse kinematic models. Figures 11 and 12 show the simulation results of the general and integer inverse kinematics models, respectively. The results of the fuzzy inverse kinematics model using real variables are shown in Fig. 13. The results of the integer inverse kinematics model are very similar to the output of the general model. This    demonstrates that the integer inverse kinematics model can reproduce the original behavior by only performing integer operations. In addition, when comparing Figs. 12 and 13, the integer inverse kinematics model shows discretely controlled results of the model based on real variables. From these results, the integer inverse kinematics model is confirmed to be a simplified method that can approximate traditional inverse kinematics. Figure 14 shows the simulated behavior using the results of Fig. 12 when a 45 • interval and the x, y coordinates of the pedal are inputted. We note that Figs. 8 and 14 show very similar results and, thus, further confirm that this model approximates traditional methods well.

Conclusion
This paper has outlined an inverse kinematics model consisting of integer variables and proposed a method to realize inverse kinematics using integer input and output and integer arithmetic. We have also shown that the application of this periodic trajectory model to an actual humanoid robot system reproduces the cycling behavior of a human very well. Furthermore, we have confirmed the reproducibility of this model based on the original target behavior when deriving this inverse kinematics model. We have also showed that it is possible to generate approximated behavior of the original motion. Moreover, the integer inverse kinematics model is shown to be a simplified calculation method that discretizes the real variables of a conventional robot joint control program.
Although the model in this paper was evaluated through an experiment with the robot performing a periodic controlled motion, future work will involve evaluating other controlled objects or motion using the proposed inverse kinematic model that includes results of our previous research.