# Real-Time FPGA-Based Balance Control Method for a Humanoid Robot Pushed by External Forces
## 2 Small-Sized Humanoid Robot  
A small-sized humanoid robot named \"TKU-X\" was developed by our laboratory and used to perform the proposed balance control method. As shown in Figure 1, it has 23 degrees of freedom (DOFs). A CMOS sensor is installed on the head so that it can be a vision-based autonomous robot. The planning of 2 DOFs for the head is to enable the CMOS sensor to move up-and-down and left-and-right to capture information about the surrounding environment of the robot in a wide range. The planning of 1 DOF for the waist is to enable the robot to do more movements to enhance its view. Moreover, the planning of 4 DOFs for one arm and 6 DOFs for one leg is to enable the robot to grasp objects and walk flexibly. The mechanism's size and the overall specifications of the TKU-X are respectively shown in Figure 2 and Table 1. Its height and weight are 564.5 mm and 4.5 kg, respectively. The main hardware includes 23 servo motors, 1 CMOS (complementary metal-oxide-semiconductor) sensor, 1 gyroscope, 1 accelerometer, 8 pressure sensors, 1 FPGA board, and 1 integrated circuit board. A gyroscope and an accelerometer are attached on the waist of the robot to measure its inclination angle, and four pressure sensors are installed per sole of foot, in the corners [1; 4], to measure the ZMP. Through the designed integrated circuit board, this FPGA board can be connected to all device components (such as servo motors, gyroscope, accelerometer, and pressure sensors) by using GPIO (general-purpose input/output) pins. FPGA chips have the advantages of parallel processing and low power consumption. Therefore, compared to the Darwin-OP robot with an Arduino board [9; 13], TKU-X with this FPGA board has more significant computing and real-time processing capabilities.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Category** & **Description** & **Data** \\ \hline \hline Dimension & Height & 564.5 mm \\  & Weight & 4.5 kg \\ \hline \multirow{4}{*}{DOFs} & Head & 2 DOFs \\  & Arm & \(2\times 4\) DOFs \\  & Waist & 1 DOF \\  & Leg & \(2\times 6\) DOFs \\ \hline \multirow{4}{*}{Main Controller (FPGA board)} & CPU & Altera Cyclone III EP3C120F780C8 \\  & RAM & DDRII SDRAM 64 M \(\times\) 2 \\ \cline{1-1}  & Logic Gates & 119088 \\ \cline{1-1}  & Power Requirement & 1 DC Power Jack with 5 V Power Input \\ \cline{1-1}  & Size & \(112\times 67\times 19\) mm \\ \hline \multirow{4}{*}{Actuator MX-28 (arm)} & PID Controller & STM32F103C8 (CORTEX-M3) \\  & Holding Torque & 2.5 N-m @ 12 V \\ \cline{1-1}  & Speed & 55 PRM @ No Load \\ \cline{1-1}  & Resolution & 0.088\({}^{\circ}\) \\ \cline{1-1}  & Position Sensor & Magnetic Rotary Encoder AS5045 \\ \hline \multirow{4}{*}{Actuator MX-64 (leg)} & PID Controller & STM32F103C8 (CORTEX-M3) \\  & Holding Torque & 6.0 N-m @ 12 V \\ \cline{1-1}  & Speed & 63 PRM @ No Load \\ \cline{1-1}  & Resolution & 0.088\({}^{\circ}\) \\ \cline{1-1}  & Position Sensor & Magnetic Rotary Encoder AS5045 \\ \hline \multirow{4}{*}{Sensors} & Gyroscope & 3-Axis \\ \cline{1-1}  & Accelerometer & 3-Axis \\ \cline{1-1}  & Pressure-meter & 4 per foot \\ \hline \hline \end{tabular}
\end{table}
Table 1: Overall specifications of TKU-X.  
Figure 1: (**a**) Photograph of TKU-X. (**b**) Twenty-three degrees of freedom (DOFs) of TKU-X.  
Figure 2: Dimensions of the TKU-X robot. (**a**) Whole body. (**b**) Soles of the feet.  
The diagram of the legs of TKU-X and its coordinate system are shown in Figure 3, where \(P_{W}=(P_{W}^{x},P_{W}^{y},P_{W}^{z})\) is the position of the waist. \(P_{RA}=(P_{RA}^{x},P_{RA}^{y},P_{RA}^{z})\) and \(P_{LA}=(P_{LA}^{x},P_{LA}^{y},P_{LA}^{z})\) are the ankle positions of the right foot and the left foot, respectively. The humanoid robot exchanges the right foot for the left foot as the supporting foot, and vice versa, to gain the ability to walk. \(d^{y}\) is the distance between the waist \(P_{W}\) and the hip joint. \(d^{z}\) is the distance between the hip joint and the ankle joint.