# A Machine Learning Approach for Improving the Movement of Humanoid NAO’s Gaits

Authors: Fatmah Abdulrahman Baothman
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

A humanoid robot’s development requires an incredible combination of interdisciplinary work from engineering to mathematics, software, and machine learning. NAO is a humanoid bipedal robot designed to participate in football competitions against humans by 2050, and speed is crucial for football sports. Therefore, the focus of the paper is on improving NAO speed. This paper is aimed at testing the hypothesis of whether the humanoid NAO walking speed can be improved without changing its physical configuration. The applied research method compares three classification techniques: artificial neural network (ANN), Naïve Bayes, and decision tree to measure and predict NAO’s best walking speed, then select the best method, and enhance it to find the optimal average velocity speed. According to Aldebaran documentation, the real NAO’s robot default walking speed is 9.52 cm/s. The proposed work was initiated by studying NAO hardware platform limitations and selecting Nao’s gait 12 parameters to measure the accuracy metrics implemented in the three classification models design. Five experiments were designed to model and trace the changes for the 12 parameters. The preliminary NAO’s walking datasets open-source available at GitHub, the NAL, and RoboCup datasheets are implemented. All generated gaits’ parameters for both legs and feet in the experiments were recorded using the Choregraphe software. This dataset was divided into 30% for training and 70% for testing each model. The recorded gaits’ parameters were then fed to the three classification models to measure and predict NAO’s walking best speed. After 500 training cycles for the Naïve Bayes, the decision tree, and ANN, the RapidMiner scored 48.20%, 49.87%, and 55.12%, walking metric speed rate, respectively. Next, the emphasis was on enhancing the ANN model to reach the optimal average velocity walking speed for the real NAO. With 12 attributes, the maximum accuracy metric rate of 65.31% was reached with only four hidden layers in 500 training cycles with a 0.5 learning rate for the best walking learning process, and the ANN model predicted the optimal average velocity speed of 51.08% without stiffness:V1=22.62cm/s, V2=40cm/s, and V=30cm/s. Thus, the tested hypothesis holds with the ANN model scoring the highest accuracy rate for predicting NAO’s robot walking state speed by taking both legs to gauge joint 12 parameter values.


---

## Body

## 1. Introduction

Engineers have investigated humanoid walking in the area related to control, stability, and speed in simulated or real environments, focusing on hardware design and functions. Walking is a complicated process that involves several domains in different planes such as sagittal, frontal, and transverse; it requires vision, several joints, muscles, and awareness, and the speed cycle varies with human body structure, strength, stability, and others. Humanoid NAO provides a good research platform for bipedal locomotion to perform different walking styles such as static, forward, and sideways. Aldebaran builds NAO for an international football competition based on movements and collaboration between robot agents, and speed is crucial for football sports. Although walking is a complex problem, the author simplifies the assumption to determine which classification techniques can improve NAO’s gaits’ speed and, if so, which one is the most successful without applying any mechanical changes to the structure. The hypothesis is as follows:H0 is the humanoid NAO speed that can be improved without changing its physical configuration.H1 is the humanoid NAOspeed can be improved without changing its physical configuration.In this research, the author tests if theH0 hypothesis holds. If “H0” is true, the inference would be that the humanoid robot NAO’s speed velocity can be improved without changing its physical structure. If “H0” is false, the conclusion would be that there is no need to concentrate on classification techniques without changing the physical design. The Robotic Industries Association (RIA) [1] defined “a robot as a reprogrammable multifunctional manipulator designed to move material, parts, tools or specialized devices through variable programmed motions for the performance of a variety of tasks.” Sometimes, robots are categorized in production according to the time frame and characteristics. The first robot generation in the 1970s was stationary, nonprogrammable, and described as electromechanical devices without sensors [2]. The second robot generation appeared in the 1980s and included sensors plus programmable controllers. The third robot generation was developed in the 1990s with some intelligence characteristics, while the fourth generation is under the R&D phase [3], embedding advanced intelligent features of miniaturization, growth, autoreplication, and autoassembly. The word “Robot” was first introduced in 1890 and used by Karel Capek; in 1921, it was mentioned in his known play (Rassum’s Universal Robots) and entered the English dictionary in 1923. Six years later, Westinghouse, Electric introduced the robot “Elektro,” with some walking capabilities. After a few years, Walter completed the two autonomous robots called Elmer and Elsie. In 1968, Stanford Research Institute (SRI) created “Shakey” who can plan and move objects [4]. In the 80s, Honda produced its first robot called H0 by 2000, and “Asimo” went to the market and has walking capabilities.Robots are created in many shapes and structures, such as an ant-like tiny structure [5, 6]. Some are as huge as the Japanese giant robot Gundam, which weighs 24 tons and 60 feet high. Robots can perform a particular task or multitasks for industry, security, service, research, education [7], or entertainment purposes. For example, the ancient Japanese created the robot kimono-clad for entertainment and Chahakobi Ningyo for tea-serving. They enabled the Robot Buddha to learn from nature’s law and Astroboy to go to a regular school with human children [8–10]. Thus, robots became socially interactive, mimicked human behavior, and understanding [11], such as Sophia, the first robot granted a Saudi nationality. Such behaviors highlighted the advancement and versatility in the artificial intelligence (AI) field to improve robots’ value to replace humans in repetitive tasks and services. For example, KUKA, the Lightweight Robot [12], with a control architecture, unlike Jijo-2, was designed to serve in an office environment [13]. These robots need special training to attain the specific task’s knowledge and sense to employ walking in an environment. Empowering robots with walking capabilities by teaching them to advance their performance requires ethical standards, laws, and regulations to match human values. In the 40’s, Asimov [14] described three basic laws for controlling robots’ behaviors, a robot must not destroy a human being, a robot must abide by the orders given, and a robot must protect its own existence. Chien et al. argued the necessity of modifying the three rules for robot home services and ethical purposes [15, 16]. Recently, a superior professor of artificial intelligence, Frank Pasquale, argued that Asimov rules should be updated by four more principles regarding the concept of augmented AI [17]:“Law 1: AI should complement professionals, not replace them.Law 2: Robotic systems and AI should not counterfeit humanity.Law 3: Robotic systems and AI should not intensify zero-sum arms races.Law 4: Robotic systems and AI must always indicate the identity of their creator (s), controller (s), and the owner (s).”Although robots were invented in the last century, robotic designers are still facing significant challenges, and continuous developments are required for creating autonomous walking robots to perform multitasks service. Different materials were used to overcome such design challenges, for example, robots such as Manav, Mitra, INDRO, and Daksh are made of 3D-printer, fiberglass, wood, cardboard, plastic, and aluminum. Intelligent living robots are innovative inventions mimicking humans’ behavior, and some can even perform tasks that seem impossible for humans to accomplish as fast with high accuracy. The robotic era of 2020 has also covered many sectors, including education and research supporting humanoid walking robots, for example, a robot agent presented by [18] named “Interactive Phantom” supported medical education in orthopedic for knee joint clinical inspection training. The International Federation of Robotics (IFR) indicated that the robot market in education, research, and entertainment would significantly increase [19]. Robots with moving capabilities can now work in car shops, production industries [20], packaging, medical services [21], and hotel services, leading to complete replacements of humans with the robots dentist, surgeon, and nurse. Such [22] humanoid robots can perform tasks and move like humans. This type of robot represents a challenging approach in the area of multicontrol, intelligent, and evolutionary robots. Nowadays, some humanoid robots accomplish extraordinary responsibilities that are considered even challenging for humans to perform.According to Ray Kurzweil, computers will be as smart as humans by 2029, and by 2045, they would be billions of times more powerful than humans [23]. In the 21st century, intelligent humanoid robots were produced to imitate humans’ capabilities to communicate, sing, dance, perform detailed tasks better than humans, and even design or manufacture another robot. The word humanoid robot describes a physical structure similar to a human having a head, body, hands, and two legs (biped). Some humanoid robots have one or more parts of the body: upper or lower torso and a head equipped with human facial features. A humanoid robot’s main characteristic is its autonomous adaptation in changing its environments and imitating humans’ physical and mental tasks in intelligence, cognition, behavior, and actions. The humanoid robots are one of the greatest inventions of the century; designing them to move, walk, and run like humans, or faster is essential even in evolutionary robotics (ER). The ER robots [24] require autonomous design and implementation for robot control and structure to develop comprehensive knowledge about itself, its walking behavior, and the environment, but the speed of gaits is still an issue for robots to perform human-like jobs. Thus, the robot’s legs and feet should be designed carefully with full functionalities.Developing intelligent humanoid robot characteristic is challenging and too complicated. For example, babies take several months before they learn their first step and start walking, due to gravity effects, the body weight, and the learning technique, which is self-developed by the child at an early stage. The process of human walking is highly complicated and dynamic in nature; it involves 29 Degree of Freedom (DoF) and 48 muscles for coordination. It includes the eyes, legs, joints, hip, knees, ankles, the upper body, and the basin. With such complexities of a walking cycle, [25] identified sixteen states. NAO walking technique has been evaluated and a trapezoid function augmented by [24] for implementing an improved dynamic walk. [26] introduced an omnidirectional walk, using ZMP [27, 28] centered on low motor stiffness to help fast movements. The current research mainly focuses on NAO’s walking and movement learning without changing the hardware configuration. The author focused only on gaits and speed/velocity, excluding vision, navigation, uneven floor, turning around, or going up or down. The main idea is to implement AI, classification, and learning techniques to test the robot NAO walking speed. Such characteristics are considered to add an intelligence flavor to any humanoid robot. The advantages of the proposed methods are small number of parameters, low memory requirements during the testing and training process, and most importantly, the optimal average velocity speed obtained of V2=40cm/s for the humanoid real robot NAO and the improved average velocity speed of 51.08% without stiffness during walking.The research contributions are as follows:(i)
Analyzing NAO’s gaits with only 12 parameters to improve the real robot walking speed of 9.52 cm/s(ii)
Applying three classifications techniques, an ANN model with 12 parameters accomplished an improved average velocity speed of 51.08% without stiffness(iii)
Achieving an optimal average velocity speed ofV2=40cm/s for the humanoid the real robot NAO(iv)
NAO’s gait speed can be improved without changing its physical structure configurationsThis paper is structured to cover six primary sections. Section2 briefly presents the NAO platform and architectural limitations. Section 3 discusses the biped robots and gaits control. Following this, Section 4 introduces the methodology and techniques, and in Section 5, the author discusses the experiment’s design, implementation, and results. Finally, Section 6 summarizes the work and proposes future directions.


### 1.1. NAO Platform and Architecture Limitations

Humanoid biped robots such as NAO are used in the Robot World Cup Initiative, which started in 1992 as the Robot J-League (Japan). The initiative objective is “By the year 2050, a team of fully autonomous humanoid robots can win the world soccer champion against the human” [1]. The initiative areas are AI, machine learning (ML), machine vision, image processing, natural language processing, multiagents, team planning, electronics, and control. Aldebaran created the NAO humanoid robot’s evolution several generations (V3+, V3, 2, V4, V5, V6) of NAO existed. The latest generation is considered the most powerful, stronger, and smarter autonomous and programmable robots specially designed for educational and research purposes [29]. NAO became famous, and more than 70 countries have been using NAO for computer and science classes either in schools, colleges, or universities. This research focuses on the NAO humanoid robot, and (Table 1) below lists the joints chains of the 12 legs and feet parameters that are only related to this work:Table 1
NAO 12 leg joint chains [Aldebaran documentation].
The chainLLegRLegThe jointsLHipYawPitchRHipYawPitchLHipRollRHipRollLHipPitchRHipPitchLKneePitchRKneePitchLAnklePitchRAnklePitchRAnkleRollLAnkleRollThe NAO robot consists of a head, torso, motors, actuators, multiple sensors, sonar, and bump sensors in hands and feet, gyrometer, accelerometer, and infrared. The body’s structure is made of plastic, which lacks movement flexibility. “Nao has 25 Degrees of Freedom (DoF) (Head: 2 DoF; Arm: 5 DoF x 2; Pelvis: 1 DoF; Leg: 5 DoF x 2; Hand: 1 DoF x 2)” [30] as visualized in (Figure 1) describing 24 joints. NAO weight 5.4 kg, 574 mm in height, Intel Atom E3845 processor, built-in Linux (Gentoo) OS, and equipped with two CPUs located on the head and the torso. NAO can see via two OV5640 2592×1944 digital cameras and has loudspeakers and microphones to hear and talk in two default languages but can be upgraded to 21 languages; the author was among the pioneers of building and activating the Arabic language in human-robot interaction (HRI). The robot NAO can also connect over Ethernet or Wi-Fi. It is equipped with rechargeable battery powers that work only 60 minutes in active use and 90 minutes in regular use. Although its obstacle detection capability and battery power have improved to 30 percent [28, 31] in the latest generation, NAO still needs more development to match an adult human’s walking patterns and time duration. However, NAO’s velocities, accelerations, and inclinations are measured dynamically.Figure 1
NAO 24 joints: 12 parameters for legs and feet and 12 for hands and arms.The software platform supports Linux, Windows, and Mac operating systems. The NAO robot can be programmed in several languages: C++, MATLAB, Urbi, JAVA, LabVIEW, Python, and JavaScript. The Choregraphe is a multiplatform supported with a visual programming language to create unprogrammed animations and behaviors with Python and C++ for testing, simulation, interaction, control, and monitoring the physical robot NAO with the NAOqi tool (see Figure2). The NAOqi is a middleware that connects with the main broker via modules [32]; it interfaces with motor joints, interacts with the Linux-Geode operating system, and performs many actions using (ALMotion).Figure 2
Aldebaran NAO NAOqi tool structure [32].A screenshot of the Choregraphe software (see, Figure3) represents a graphical user interface to initiate behaviors by connecting boxes of preprogrammed code to support testing the robot’s joint angles control via the ALMotion proxy. The monitor software allows users to record or watching the robot’s eyesight perception and his encountered action in real-time. The simulator software is called Naosim and is used to test NAO behaviors and build new algorithms for the virtual environment, enabling object insertion and shapes modification [33]. The Linux-Geode OS offers a safety interface layer for preserving the motor joints’ durability [34]. The NAOqi software is based on a distributed system, and its components can be executed in the robot’s system or between systems. One limitation in the distributed system is that the primary process referred to as main broker must be executed on the NAO robot’s physical structure when using actuators or sensors [21].Figure 3
Choregraphe graphical interface.Featuring NAO’s technical capabilities, its mechanical architecture, including hearing, speaking, walking, or seeing, has several limitations. For example, the default walking speed for NAO is limited to 9.52 cm/s. Additional constraints are related to the plastic material covering the robot’s shape; the number of fingers is only three in each hand, NAO has no toes in his feet, and the size of memory is minimal and its inability to simulate multicomplex human movements. For example, NAO could not bend his torso to 900 toward the front and keeping his balance and could not sit down while bending the knee and feet behind the body. According to Aldebaran, as in Figure4, LHipYawPitch and RHipYawPitch cannot be controlled independently because a single motor physically controls them, and by default, in case of order conflict, LHipYawPitch has priority.Figure 4
Single motor control for LHip and RHip.Furthermore, NAO’s initial position is required to sit down before starting any new behavior to reduce the motors’ heating. “Nao’s motion module is based on generalized inverse kinematics, which handles cartesian coordinates, joint control, balance, redundancy, and task priority” [2]. Therefore, the NAO movement is limited by its degree of freedom. There are also anticollision limitations for both right and left ankles resulting from the roll motion range limitation by the pitch value as indicated by the Aldebaran documentation in Table 2 [30] below for the left ankle joint parameters. The joints’ motor is controlled every 10 ms. Böckmann [17] proved a time delay caused by controlled joint angles between 30 ms and 40 ms.Table 2
Left joint ankle parameter values [30].
LAnklePitchLAnkleRoll minLAnkleRoll maxLAnklePitchLAnkleRoll minLAnkleRoll max(degrees)(radians)-68.15-2.864.30-1.189442-0.0499160.075049-48.13-10.319.74-0.840027-0.1799430.169995-40.11-22.8012.61-0.700051-0.3979350.220086-25.78-22.8044.06-0.449946-0.3979350.7689925.73-22.8044.060.100007-0.3979350.76899220.05-22.8031.540.349938-0.3979350.55047752.870.002.860.922755-0.0000000.049916NAO also faces frequent joint stiffness, which requires enslaving the motors, and if NAO is not in a self-stable pose, it usually loses its balance and falls. The only way to maintain the robot’s stability is by setting the walking speed to 0 : 2 m/s, which is very slow. Additionally, NAO requires unique standard floor surfaces to maintain its balance for a more extended period. The best measured enabled walking distance for NAO was estimated by 3 meters.


### 1.2. Biped Walking and Gaits’ Control Techniques

Humanoid robotics is similar to humans in talking, walking, emotions, and so forth. Their way of movements covers gaits’ speed, stability, and steps’ generation. Walking robots [7] can be classified into three main classes: static, dynamic, and passive. Static walkers have regular languid walks. Passive walkers react to the forces of gravity [20, 35]. Dynamic walkers [3, 6] plan their steps with a high level of accuracy. Waseda University’s laboratories introduced WL-10, a revolutionary dynamic continuous walking robot for 1.3 seconds, using Zero Moment Point (ZMP) control; since then, several results were recorded [36, 37] in the area of passive and active walkers, parameter settings for successful walking gaits, balance, and locomotion. For example, [38] Light Adaptive-Reactive biPed (LARP) was created for modeling human lower limbs walking style within an environment using artificial feet, knees, and limbs. According to [39], three planes exist during walking for body movements within an environment: (1) “Sagittal plane - divides the body into left and right sides into a vertical plane” [40]. (2) “Frontal plane - divides the body into the front and back, related to legs and arms” [41]. (3) “Transverse plane - divides the body horizontally” in an upper and lower half associated with twisting rotation [41]. Humanoid robots implement several techniques to overcome the environments’ difficulty, such as nonlinear dynamics, multivariable dynamics, limited foot-ground interaction, hybrid dynamics during steps, quick detection of a push, fast reaction speed, and relatively large actuator power. Classification of locomotion based on swing legged has discrete contact with the ground for a walker. The popular locomotion concepts that support biped are the swing-legged discrete and big-footed (SDB) applied in most of today’s robots using flat ground with stability [37]. Generally, the gaits consist of 3 phases, and each has different frames and defined actions. Table 3 below summarizes the phases.Table 3
Gaits’ phases.
PhaseNameFrame numbersRepetitionActionOneStart110Define a state from inactive to an active state, causing the robot to go into the next phaseTwoWalk44Many timesTake two steps to go again into an inactive positionThreeStop110The robot moves to the start inactive situationAccording to [42], there are nine gait parameters for the controller on flat ground: step length, step height, knee bending, step time, stretch time, torso pitch inclination, quadratic Bezier point, torso roll inclination, and proportion of single support duration. They defined a fitness for the gait’s stability and gait’s energy consumption and implemented a policy gradient reinforcement learning (PGRL) for optimization. The results showed that exploiting the physical robot’s hardware positively impacts without implementing complex deep learning or complex mathematical models. Previous research [36] applied to three walking humanoids Priscilla, ELVIS, and ELVINA reported improved forward walking speed. Reinforcement learning in robots [34] using different techniques [37, 43] surveyed learn from demonstration (LfD) methods. [44] illustrated artificial neural network (ANN) to extract parameters, predict walking patterns, and identify robot’s gait learning errors. In this research, the author shows that the humanoid NAO speed can be improved without changing its physical structure using machine learning techniques.


## 1.1. NAO Platform and Architecture Limitations

Humanoid biped robots such as NAO are used in the Robot World Cup Initiative, which started in 1992 as the Robot J-League (Japan). The initiative objective is “By the year 2050, a team of fully autonomous humanoid robots can win the world soccer champion against the human” [1]. The initiative areas are AI, machine learning (ML), machine vision, image processing, natural language processing, multiagents, team planning, electronics, and control. Aldebaran created the NAO humanoid robot’s evolution several generations (V3+, V3, 2, V4, V5, V6) of NAO existed. The latest generation is considered the most powerful, stronger, and smarter autonomous and programmable robots specially designed for educational and research purposes [29]. NAO became famous, and more than 70 countries have been using NAO for computer and science classes either in schools, colleges, or universities. This research focuses on the NAO humanoid robot, and (Table 1) below lists the joints chains of the 12 legs and feet parameters that are only related to this work:Table 1
NAO 12 leg joint chains [Aldebaran documentation].
The chainLLegRLegThe jointsLHipYawPitchRHipYawPitchLHipRollRHipRollLHipPitchRHipPitchLKneePitchRKneePitchLAnklePitchRAnklePitchRAnkleRollLAnkleRollThe NAO robot consists of a head, torso, motors, actuators, multiple sensors, sonar, and bump sensors in hands and feet, gyrometer, accelerometer, and infrared. The body’s structure is made of plastic, which lacks movement flexibility. “Nao has 25 Degrees of Freedom (DoF) (Head: 2 DoF; Arm: 5 DoF x 2; Pelvis: 1 DoF; Leg: 5 DoF x 2; Hand: 1 DoF x 2)” [30] as visualized in (Figure 1) describing 24 joints. NAO weight 5.4 kg, 574 mm in height, Intel Atom E3845 processor, built-in Linux (Gentoo) OS, and equipped with two CPUs located on the head and the torso. NAO can see via two OV5640 2592×1944 digital cameras and has loudspeakers and microphones to hear and talk in two default languages but can be upgraded to 21 languages; the author was among the pioneers of building and activating the Arabic language in human-robot interaction (HRI). The robot NAO can also connect over Ethernet or Wi-Fi. It is equipped with rechargeable battery powers that work only 60 minutes in active use and 90 minutes in regular use. Although its obstacle detection capability and battery power have improved to 30 percent [28, 31] in the latest generation, NAO still needs more development to match an adult human’s walking patterns and time duration. However, NAO’s velocities, accelerations, and inclinations are measured dynamically.Figure 1
NAO 24 joints: 12 parameters for legs and feet and 12 for hands and arms.The software platform supports Linux, Windows, and Mac operating systems. The NAO robot can be programmed in several languages: C++, MATLAB, Urbi, JAVA, LabVIEW, Python, and JavaScript. The Choregraphe is a multiplatform supported with a visual programming language to create unprogrammed animations and behaviors with Python and C++ for testing, simulation, interaction, control, and monitoring the physical robot NAO with the NAOqi tool (see Figure2). The NAOqi is a middleware that connects with the main broker via modules [32]; it interfaces with motor joints, interacts with the Linux-Geode operating system, and performs many actions using (ALMotion).Figure 2
Aldebaran NAO NAOqi tool structure [32].A screenshot of the Choregraphe software (see, Figure3) represents a graphical user interface to initiate behaviors by connecting boxes of preprogrammed code to support testing the robot’s joint angles control via the ALMotion proxy. The monitor software allows users to record or watching the robot’s eyesight perception and his encountered action in real-time. The simulator software is called Naosim and is used to test NAO behaviors and build new algorithms for the virtual environment, enabling object insertion and shapes modification [33]. The Linux-Geode OS offers a safety interface layer for preserving the motor joints’ durability [34]. The NAOqi software is based on a distributed system, and its components can be executed in the robot’s system or between systems. One limitation in the distributed system is that the primary process referred to as main broker must be executed on the NAO robot’s physical structure when using actuators or sensors [21].Figure 3
Choregraphe graphical interface.Featuring NAO’s technical capabilities, its mechanical architecture, including hearing, speaking, walking, or seeing, has several limitations. For example, the default walking speed for NAO is limited to 9.52 cm/s. Additional constraints are related to the plastic material covering the robot’s shape; the number of fingers is only three in each hand, NAO has no toes in his feet, and the size of memory is minimal and its inability to simulate multicomplex human movements. For example, NAO could not bend his torso to 900 toward the front and keeping his balance and could not sit down while bending the knee and feet behind the body. According to Aldebaran, as in Figure4, LHipYawPitch and RHipYawPitch cannot be controlled independently because a single motor physically controls them, and by default, in case of order conflict, LHipYawPitch has priority.Figure 4
Single motor control for LHip and RHip.Furthermore, NAO’s initial position is required to sit down before starting any new behavior to reduce the motors’ heating. “Nao’s motion module is based on generalized inverse kinematics, which handles cartesian coordinates, joint control, balance, redundancy, and task priority” [2]. Therefore, the NAO movement is limited by its degree of freedom. There are also anticollision limitations for both right and left ankles resulting from the roll motion range limitation by the pitch value as indicated by the Aldebaran documentation in Table 2 [30] below for the left ankle joint parameters. The joints’ motor is controlled every 10 ms. Böckmann [17] proved a time delay caused by controlled joint angles between 30 ms and 40 ms.Table 2
Left joint ankle parameter values [30].
LAnklePitchLAnkleRoll minLAnkleRoll maxLAnklePitchLAnkleRoll minLAnkleRoll max(degrees)(radians)-68.15-2.864.30-1.189442-0.0499160.075049-48.13-10.319.74-0.840027-0.1799430.169995-40.11-22.8012.61-0.700051-0.3979350.220086-25.78-22.8044.06-0.449946-0.3979350.7689925.73-22.8044.060.100007-0.3979350.76899220.05-22.8031.540.349938-0.3979350.55047752.870.002.860.922755-0.0000000.049916NAO also faces frequent joint stiffness, which requires enslaving the motors, and if NAO is not in a self-stable pose, it usually loses its balance and falls. The only way to maintain the robot’s stability is by setting the walking speed to 0 : 2 m/s, which is very slow. Additionally, NAO requires unique standard floor surfaces to maintain its balance for a more extended period. The best measured enabled walking distance for NAO was estimated by 3 meters.


## 1.2. Biped Walking and Gaits’ Control Techniques

Humanoid robotics is similar to humans in talking, walking, emotions, and so forth. Their way of movements covers gaits’ speed, stability, and steps’ generation. Walking robots [7] can be classified into three main classes: static, dynamic, and passive. Static walkers have regular languid walks. Passive walkers react to the forces of gravity [20, 35]. Dynamic walkers [3, 6] plan their steps with a high level of accuracy. Waseda University’s laboratories introduced WL-10, a revolutionary dynamic continuous walking robot for 1.3 seconds, using Zero Moment Point (ZMP) control; since then, several results were recorded [36, 37] in the area of passive and active walkers, parameter settings for successful walking gaits, balance, and locomotion. For example, [38] Light Adaptive-Reactive biPed (LARP) was created for modeling human lower limbs walking style within an environment using artificial feet, knees, and limbs. According to [39], three planes exist during walking for body movements within an environment: (1) “Sagittal plane - divides the body into left and right sides into a vertical plane” [40]. (2) “Frontal plane - divides the body into the front and back, related to legs and arms” [41]. (3) “Transverse plane - divides the body horizontally” in an upper and lower half associated with twisting rotation [41]. Humanoid robots implement several techniques to overcome the environments’ difficulty, such as nonlinear dynamics, multivariable dynamics, limited foot-ground interaction, hybrid dynamics during steps, quick detection of a push, fast reaction speed, and relatively large actuator power. Classification of locomotion based on swing legged has discrete contact with the ground for a walker. The popular locomotion concepts that support biped are the swing-legged discrete and big-footed (SDB) applied in most of today’s robots using flat ground with stability [37]. Generally, the gaits consist of 3 phases, and each has different frames and defined actions. Table 3 below summarizes the phases.Table 3
Gaits’ phases.
PhaseNameFrame numbersRepetitionActionOneStart110Define a state from inactive to an active state, causing the robot to go into the next phaseTwoWalk44Many timesTake two steps to go again into an inactive positionThreeStop110The robot moves to the start inactive situationAccording to [42], there are nine gait parameters for the controller on flat ground: step length, step height, knee bending, step time, stretch time, torso pitch inclination, quadratic Bezier point, torso roll inclination, and proportion of single support duration. They defined a fitness for the gait’s stability and gait’s energy consumption and implemented a policy gradient reinforcement learning (PGRL) for optimization. The results showed that exploiting the physical robot’s hardware positively impacts without implementing complex deep learning or complex mathematical models. Previous research [36] applied to three walking humanoids Priscilla, ELVIS, and ELVINA reported improved forward walking speed. Reinforcement learning in robots [34] using different techniques [37, 43] surveyed learn from demonstration (LfD) methods. [44] illustrated artificial neural network (ANN) to extract parameters, predict walking patterns, and identify robot’s gait learning errors. In this research, the author shows that the humanoid NAO speed can be improved without changing its physical structure using machine learning techniques.


## 2. Materials and Methods

Some machine learning (ML) techniques do not require extensive training, offer quicker time execution for training models, and operate on any machine. ML uses algorithms such as XGBoost, which is impossible to understand its details. There are three main types of ML. Supervised learning is known as classification techniques; the data are labeled for the classification observations process’s training phase. Unsupervised learning is known as clustering techniques, in which the model is fed with unknown unlabeled data to form clusters, involving cluster analysis based on similarity metric, estimated density, and graph connectivity for financial systems [45]. Reinforcement learning implements dynamic programming techniques, for example, used in autonomous cars. ML needs models to operate such as artificial neural networks (ANNs), decision trees, support vector machines (SVMs), regression analysis, Bayesian network, and genetic algorithm (GA). Usually, model performance and validation for accuracy are measured using the holdout method, K-fold crossvalidation, sensitivity, and specificity. The ML algorithms are related to building a computational model to train sample data to assist in predictions or decision-making. The classification is a two-step process that involves model construction and model usage. Figure 5 describes the process for NAO’s walking pattern.Figure 5
Two-step classification process for NAO’s walking pattern.The first phase is model construction and defines a data set of NAO’s walking parameters, represented by two classes: distance and speed of the step cycle walking. The data is divided into two sets for model construction (training set and testing set). The model usage is implemented for classifying unknown walking patterns; it estimates the model’s accuracy metrics. The previously defined label for testing is paired with the model classification outcome. The model accuracy metric is determined by the correct percentage of the classified testing data, which is the focus of this work. The test dataset consists of 25% of all the data, while the training set is equal to 75%. The optimization of the training process has to be carefully determined; otherwise, an overfitting will occur. Using the model to classify unknown data for distance and speed classes is the primary concern of this stage. For example, in the first step, the training data (see, Table4) is collected for each step cycle for the robot Noa concerning (distance, speed time), and the classification algorithm is invoked to complete the model construction with a defined conditional set of rules such as (IFNAOdistance/m=“3”ORtime/s>6 then the returnvalue=“success”), which results in a success score for step cycle two, three, and four.Table 4
Conversion of sample data model building.
Steps cycleDistance/mTime/sSuccessOne13NoTwo17YesThree32YesFour27YesFive16NoSix23NoA new dataset was introduced during model usage (see Table5), and the classifier is tested for unseen data records (11, 1, 9). The results indicate a successful step cycle according to the model construction rules. Thus, prediction models estimate and forecast unknown values.Table 5
Conversion of sample data model usage.
Steps cycleDistance/mTime/sSuccessSeven12NoEight17NoNine35YesTen27YesRobot walking requires path planning algorithms; planning is either static or dynamic depending on how often the robot’s map reading updates. The author implements three ML models for NAO’s walking: (1) decision tree, (2) Naive Bayes, and (3) artificial neural network. Figure6 below shows the walking learning pattern’s overall design for this work.Figure 6
Diagram of ML for NAO’s walking pattern.The decision tree is based on a root node and branches. Each node represents a test, and the branch refers to the result, with each node leaf holds a class label. The tree is constructed in a top-down approach with an iterative technique. All the training data starts at the top, which is called the tree root. The algorithm recursively selects the attributes and partitions. The test attributes are chosen according to statistical measures such as information gain. The stopping condition is set if all samples end up in the same class, or no more attributes can be further partitioning, or there are no samples left. The most critical issue with the decision tree is determining the best splitting criteria for the records. Usually, one of the three measures is applied: Gini index, entropy, or information gain. The Gini index for the (t) node is defined by [46]:
(1)GINIt=1−∑jpj∣t2.pj∣t represents the probability of the j class at node t, while (1-1/nc) calculates the maximum number of distributed records indicating the minimum least interesting information becomes (0.0) if all records fall in a single class, which means the most interesting information.The entropy measure at a given nodet is defined by [46]:
(2)Entropyt=−∑jpj∣tlogpj∣tp(j∣t) represents the probability of thej class at node t. For measuring the node’s homogeneity, the minimum (0.0) is reached if all records fall in a single class, and the maximum (log nc) is calculated if records are equally disseminated within all classes implying the most information.Thus, information gain (IF) selects the split that maximizes the GAIN; it prefers splits with a large number of partitions and is defined by [46]:
(3)GAINsplit=Entropyp−∑i=1kninEntropyi,where the root nodep defined by the entropy is divided into k classes, and ni represents the record number in class i.The second classification technique implemented is the Naive Bayes, based on a statistical probabilistic classifier using Bayes’ theorem features strongly independent. It requires a small amount of data for training, and it is extremely fast compared to other classification techniques. GivenX as the data training set, the posteriori probability of H, PH∣X, comes from the Bayes theorem [46].
(4)PH∣X=PX∣HPHPX,whereX belongs to class C2 if the probability PCi∣X is the highest for all the k classes in PCk∣X. The maximum posteriori of PCi∣X can be found from the following Bayes’ theorem equation:
(5)PCi∣X=PX∣CiPCiPX.SincePX is the constant number for all given classes, then
(6)PCi∣X=PX∣CiPCicanbemaximized.The ANN is a mathematical model that emulates a biological neural network in design, processing, learning, etc. It can solve engineering problems using classification, clustering, and regression. The architecture is described by a set of neurons arranged in three primary layers (input, hidden, and output). A nonlinear function defines it as follows [47]:
(7)netj=∑iWijxij=W0jx0j+W1jx1j+⋯+WIjxIj,where for nodej, xij is the ith input, Wij is the weight related to the ith node, i+1 inputs to node j, x1, x2, ..., xI are inputs from upstream nodes, x0 is the constantinputvalue=1.0, and each input node has extra input W0j×0j=W0j.The complete designed methodology in this work is represented in Figure6 above. The preliminary training data robot’s walking data was collected automatically using the Choregraphe software (see Figure 7 below). Walking gaits are constructed by developing visual boxes representing the walking Python code, the joint movements, and speed activity.Figure 7
Choregraphe screenshot for activating NAO’s walking data collection.This study used different ML types to test the fastest walking technique. The two-step process model building and model using implemented to calculately divide and conquer in the case of the decision tree, maximum posterior in the case of Naive Bayes, and errors minimization with weights updates in the ANN’s case. The walking pattern was learned and generated based on every classification technique. The learning process is repeated until the physical robot NAO shows improving performance. The idea is to find the optimal walking algorithm, as in humans, to measure improvement when simulating a human walking pattern. The practical experiments were carried out, as explained in Section 5 below. This study had several limitations. First, it was impossible to check all classification techniques; so, the authors limited the techniques to the three abovementioned most researched ones. Second, the domain knowledge includes engineering, medical, mathematics, computer science, artificial intelligence, planning, machine learning, and data mining; therefore, the author focused on AI/ML techniques to limit the searched domain. The study covered only the humanoid robot NAO platform because of the research budget limitation. The NAO platform has its limitation, as discussed in the NAO platform.


## 3. Results and Discussion

NAO is taken for the collection of data associated with its gaits joint parameter. In total, there are 26 joints, including the head, arm, and leg, which further split in the right and left sides. The author focuses on the walking pattern only on the first stage of the physical NAO’s different actions during data capturing are shown in Figure8.Figure 8
NAO humanoid movement records.Using NAO robots connected with the Choregraphe interface, only 12 attributes were selected to prepare the feeding for ANN. The list and details of each attribute presented in Table6 [48]. The selection of attributes is based on NAO’s movement, parts’ connection, and the association between leg joints. Each attributes, high, and low values, as recorded in Table 6, depending on its maximum and minimum stretching of both legs. The selection of gaits has shown in Figure 9.Table 6
Max-min list of collected walking attributes.
Right leg valuesVariablesMin-maxLeft leg valuesVariablesMin-maxRight ankle rollRAr-44.1 to 22.8Left ankle rollLAr-22.8 to 44.1Right ankle pitchRAp-68.0 to 53.4Left ankle pitchLAp-68.1 to 52.9Right knee pitchRKp-5.3 to 121.0Left knee pitchLKp-5.3 to 121.0Right hip pitchRHp-88.0 to 27.7Left hip pitchLHp-88.0 to 27.7Right hip yaw pitchRHyp-65.6 to 42.4Left hip yaw pitchLHyp-65.6 to 42.4Right hip rollRHR-45.3 to 21.7Left hip rollLHR-21.7 to 45.3Figure 9
Selection of gaits.


### 3.1. Data Preparation

The experiment starts by collecting all gaits joints’ parameters for the NAO robot generated by both legs and analyzes the walking and standing patterns. Altogether, there are 12 attributes listed in Table7 below; each row represents the standing or walking position of the robot. A new column was added to classify the data named “Position” based on the integer values extracted from gaits parameters. This column has two values assigned according to the remaining attribute’s specification, where “0” denotes standing while “1” denotes the robot’s waking state, respectively. The collected datasets are 5000 records altogether. The data has been shuffled randomly after the assignment of its position. The datasets are preprocessed through different techniques, such as outlier treatment and finding missing datasets to apply neural networks to predict their states and performance vector. To work further, 75% of the total datasets selected as training datasets to “Train” the model, while the remaining 25% associated with “Testing” the model. While selecting datasets for training and testing, the model was performed randomly using a “Validation” operator in RapidMiner [49] (see Table 7, representing RapidMiner values).Table 7
RapidMiner gait parameter metadata.
NameTypeStatisticRangeMissingPositionBinomialMod=12574, least=024260(2426), 1(2574)0RarIntegerAvg=−10.641+/−19.402[-44.000; 22.000]0RapIntegerAvg=−7.723+/−35.331[-68.000; 53.000]0RKpIntegerAvg=−58.660+/−36.803[-5.000; 12.000]0RhpIntegerAvg=−30.235+/−33.373[-88.000; 27.000]0RhypIntegerAvg=−11.801+/−30.985[-65.000; 42.000]0RHrIntegerAvg=−11.797+/−19.270[-45.000; 21.000]0LarIntegerAvg=11.193+/−19.473[-22.000; 44.000]0LapIntegerAvg=−8.681+/−34.768[-68.000; 52.000]0LkpIntegerAvg=57.728+/−36.911[-5.000; 121.000]0LhpIntegerAvg=−30.139+/−33.628[-88.000; 72.000]0LhypIntegerAvg=−12.507+/−31.111[-65.000; 42.000]0LHrIntegerAvg=12.228+/−19.228[-21.000; 45.000]0


### 3.2. Experiment Design, Results, and Discussion

Several experiments were applied to discover the walking pattern and to predict the accuracy by testing the model. For this, RapidMiner has taken for building, testing, and validating the model and finally extracts the accuracy of the model. A RapidMiner is an open-source tool specially designed for data mining and applying different AI and statistical methods [45]. In this research, the classification technique implemented to construct, predict, and measure the performance of the model. Therefore, the first data sliced into two sections, “Training” and “Testing,” using split validation operator, further discussed in each experiment section as follows:


### 3.3. Classification Using Naïve Bayes (Experiment 1)

Many Ml methods have been used in this study to provide accurate implementation due the capacity of theses to use in many applications and adapted to provide accurate solutions. The Naïve Bayes classifier is used in the first experiment as a learner to identify the independent variables characterization for building models. The trained model was then reattempted for testing the model. Screenshots are taken during model building and experiment designing shown in Figures10(a)–10(d). The results of all experiments are shown in Table 8. Altogether, 12 attributes were selected for learning the model for NAO’s walking pattern. 70% of the whole data sets used to train the model. It requires the mean and variance of all attributes necessary for classification to perform the task. Finally, all independent variables, including the dependent variable “Label” column, regulated together based on each attribute’s individual representation. The further developed model has to follow by testing and validation processes using unseen testing datasets, which consist of 30% of the entire data sets. The purpose is to measure the model’s accuracy metric and check the Naïve Bayes algorithm’s performance for NAO’s gait parameters. This model’s accuracy metric is calculated as 48.20%, shown in Table 9 from the system, which means the model predicted somewhere 48% correctly by using all independent attributes for deciding its states as walking or standing. The measured accuracy is not considered as optimal as the model predicted less than 50% correctly.Figure 10
(a) Screenshots of experiment design (b). Screenshots of experiment design. (c). Screenshots of experiment design (d). Screenshots of experiment design.
(a)(b)(c)(d)Table 8
Result summary for all experiments.
Experiment#List of attributesTechniques usedData set trainingData set testingPrediction accuracyHidden layersLearning rateTraining cycle112Naïve Bayes70%30%48.20%212Decision tree70%30%49.87%312ANN70%30%55.12%10.3500412ANN70%30%65.17%20.5500512ANN70%30%65.31%30.5500Table 9
Classification using Naïve Bayes.
Accuracy: 48.20%True 0True 1Class precisionPred.018220746.79%Pred.157054148.69%Class recall24.20%72.33


### 3.4. Classification Using Decision Tree (Experiment 2)

The accuracy metric measured in the previous experiment was not good enough, but not the best. Therefore, another experiment was designed to improve the results and accuracy metric of the model. In this test, we applied a decision tree, another algorithm of classification on the same datasets. As mentioned in Section4, a decision tree is a tree-like classification learning algorithm. Its top branch considers the primary classes (distinct values) of the datasets; it grows downwards according to the learning scheme or attributes of the independent variables. The training dataset was set to 70% randomly and considered unseen data for testing the model. From RapidMiner, the screenshot captured is shown in Figures 10(a)–10(d). The current tree model has improved slightly from the last result, and the accuracy metric recorded 49.87% or 50%, as in Table 10 copied from the system. It helped and improved the prediction level with more accuracy than the previous test.Table 10
Classification using Decision Tree.
Accuracy: 48.87%True 0True 1Class precisionPred. 0000.0%Pred. 175274848.87%Class recall0.0%100.00%As discussed, the data has been divided into two categories standing and walking states of the NAO robot based on 12 independent attributes associated with its gaits’ joint parameters. This work intends to construct a model that can predict NAO’s walking speed/velocity state more accurately. According to this research’s purpose, the result was not the best while using the most common classification methods, Naïve Bayes, and Decision Tree.


### 3.5. Artificial Neural Network (AI) (Experiments 3, 4, and 5)

The last segment of this work is building an ANN model for the NAO humanoid robot to learn the dataset generated by its gaits’ joint. The algorithm used for preparing the ANN is a feedforward technique trained using a backpropagation algorithm known as the multilayer perceptron. Figure11 represents a generic design for NAO’s walking using 12 parameters. Basically, this ANN follows a general structure of three layers: input, hidden, and output. The technique was applied three times with different combinations to get the optimal accuracy of the model. The primary purpose of building an ANN is to determine the difference between the previous two (naïve Bayes and decision tree) implementation and ANN. A first static neural network was designed with only one hidden layer with a 0.3 learning rate with 500 training cycles, as shown in Figure 12. The input layer consists of 12 attributes that relates to NAO’s gait parameters. Splitting of datasets into training and testing used 70% and 30%, respectively, to validate the model. The model’s result showed 55.12% accuracy, which proved that the prediction was more than 50% correctly the first time in this research (Hidden layer: 1; learning rate: 0.3; training cycle: 500. Hidden layer: 3; learning rate: 0.5; training cycle: 500. Hidden layer: 4; learning rate: 0.5; training cycle: 500 (experiments 3 to 5).Figure 11
Generic artificial neural network for NAO’s walking.Figure 12
Neural net learning rate 0.3; training cycle 500.The process repeats two more times with hidden layers with 3 and 4, respectively, while the learning rate also changed by 0.5. Moreover, both times, the accuracy metric measured after the implementation was around 65%, which was supposed to stand the highest and optimal accuracy metric of the learning model for NAO robot’s walking pattern during the whole experiment process. Therefore, the learning cycle was stopped at this point as there is no more improvement even by changes in the learning rate and the number of hidden layers, see Figures10(a)–10(d).Finally, the results show that the last model can predict new and unseen datasets as accurately as 65%. The summary and features of all the experiments are shown in Table8 below, which indicates that the ANN model scored the highest metrics accuracy.The Aldebaran library enables the NAO robot for a maximum straight-line speed of 9.52 cm/s. The best speed NAO records are 32 cm/s, 28 cm/s, 22 cm/s, and 44.47 cm/s [46] achieved during the RoboCup challenge in 2009-2010 by four teams: HTWK, B-human, rUNSWift, and Devils. This work adapts [46] calculation by taking the average of two-time measures for t1 and t2, for the steps satisfying the average distance d1=d2=3m, instead of exact measure as in [46] to calculate the average speed as follows:
(8)V1=d1/t1,(9)V2=d2/t2−t1,(10)V=d1+d2/t2.The calculated maximum speed shows that ANN accomplished 51.08% improved walking speed than Aldebaran NAO’s default straight-line speed, scoringV1=22.62, V2=40, and V=30. Future work using ANN or deep learning is expected to improve the speed velocity further by including NAO’s hand pattern and parameters during the walk. The main limitations of our study are limited dataset due not dataset available online and the privacy of the case study. Also, it requires larger data and would be more efficient for a greater number of parameters, 100, and more. A humanoid robot’s development requires an incredible combination of interdisciplinary work from engineering to mathematics, software, and machine learning. Furthermore, it is related to the design structure of the robot and the materials used to build it. The robot cannot walk on any surface, and the motor stiffness is an issue to consider. The current research limitation supports only walking in a straight line and on even surface, and data collection is limited only to the 12 selected parameters.


## 3.1. Data Preparation

The experiment starts by collecting all gaits joints’ parameters for the NAO robot generated by both legs and analyzes the walking and standing patterns. Altogether, there are 12 attributes listed in Table7 below; each row represents the standing or walking position of the robot. A new column was added to classify the data named “Position” based on the integer values extracted from gaits parameters. This column has two values assigned according to the remaining attribute’s specification, where “0” denotes standing while “1” denotes the robot’s waking state, respectively. The collected datasets are 5000 records altogether. The data has been shuffled randomly after the assignment of its position. The datasets are preprocessed through different techniques, such as outlier treatment and finding missing datasets to apply neural networks to predict their states and performance vector. To work further, 75% of the total datasets selected as training datasets to “Train” the model, while the remaining 25% associated with “Testing” the model. While selecting datasets for training and testing, the model was performed randomly using a “Validation” operator in RapidMiner [49] (see Table 7, representing RapidMiner values).Table 7
RapidMiner gait parameter metadata.
NameTypeStatisticRangeMissingPositionBinomialMod=12574, least=024260(2426), 1(2574)0RarIntegerAvg=−10.641+/−19.402[-44.000; 22.000]0RapIntegerAvg=−7.723+/−35.331[-68.000; 53.000]0RKpIntegerAvg=−58.660+/−36.803[-5.000; 12.000]0RhpIntegerAvg=−30.235+/−33.373[-88.000; 27.000]0RhypIntegerAvg=−11.801+/−30.985[-65.000; 42.000]0RHrIntegerAvg=−11.797+/−19.270[-45.000; 21.000]0LarIntegerAvg=11.193+/−19.473[-22.000; 44.000]0LapIntegerAvg=−8.681+/−34.768[-68.000; 52.000]0LkpIntegerAvg=57.728+/−36.911[-5.000; 121.000]0LhpIntegerAvg=−30.139+/−33.628[-88.000; 72.000]0LhypIntegerAvg=−12.507+/−31.111[-65.000; 42.000]0LHrIntegerAvg=12.228+/−19.228[-21.000; 45.000]0


## 3.2. Experiment Design, Results, and Discussion

Several experiments were applied to discover the walking pattern and to predict the accuracy by testing the model. For this, RapidMiner has taken for building, testing, and validating the model and finally extracts the accuracy of the model. A RapidMiner is an open-source tool specially designed for data mining and applying different AI and statistical methods [45]. In this research, the classification technique implemented to construct, predict, and measure the performance of the model. Therefore, the first data sliced into two sections, “Training” and “Testing,” using split validation operator, further discussed in each experiment section as follows:


## 3.3. Classification Using Naïve Bayes (Experiment 1)

Many Ml methods have been used in this study to provide accurate implementation due the capacity of theses to use in many applications and adapted to provide accurate solutions. The Naïve Bayes classifier is used in the first experiment as a learner to identify the independent variables characterization for building models. The trained model was then reattempted for testing the model. Screenshots are taken during model building and experiment designing shown in Figures10(a)–10(d). The results of all experiments are shown in Table 8. Altogether, 12 attributes were selected for learning the model for NAO’s walking pattern. 70% of the whole data sets used to train the model. It requires the mean and variance of all attributes necessary for classification to perform the task. Finally, all independent variables, including the dependent variable “Label” column, regulated together based on each attribute’s individual representation. The further developed model has to follow by testing and validation processes using unseen testing datasets, which consist of 30% of the entire data sets. The purpose is to measure the model’s accuracy metric and check the Naïve Bayes algorithm’s performance for NAO’s gait parameters. This model’s accuracy metric is calculated as 48.20%, shown in Table 9 from the system, which means the model predicted somewhere 48% correctly by using all independent attributes for deciding its states as walking or standing. The measured accuracy is not considered as optimal as the model predicted less than 50% correctly.Figure 10
(a) Screenshots of experiment design (b). Screenshots of experiment design. (c). Screenshots of experiment design (d). Screenshots of experiment design.
(a)(b)(c)(d)Table 8
Result summary for all experiments.
Experiment#List of attributesTechniques usedData set trainingData set testingPrediction accuracyHidden layersLearning rateTraining cycle112Naïve Bayes70%30%48.20%212Decision tree70%30%49.87%312ANN70%30%55.12%10.3500412ANN70%30%65.17%20.5500512ANN70%30%65.31%30.5500Table 9
Classification using Naïve Bayes.
Accuracy: 48.20%True 0True 1Class precisionPred.018220746.79%Pred.157054148.69%Class recall24.20%72.33


## 3.4. Classification Using Decision Tree (Experiment 2)

The accuracy metric measured in the previous experiment was not good enough, but not the best. Therefore, another experiment was designed to improve the results and accuracy metric of the model. In this test, we applied a decision tree, another algorithm of classification on the same datasets. As mentioned in Section4, a decision tree is a tree-like classification learning algorithm. Its top branch considers the primary classes (distinct values) of the datasets; it grows downwards according to the learning scheme or attributes of the independent variables. The training dataset was set to 70% randomly and considered unseen data for testing the model. From RapidMiner, the screenshot captured is shown in Figures 10(a)–10(d). The current tree model has improved slightly from the last result, and the accuracy metric recorded 49.87% or 50%, as in Table 10 copied from the system. It helped and improved the prediction level with more accuracy than the previous test.Table 10
Classification using Decision Tree.
Accuracy: 48.87%True 0True 1Class precisionPred. 0000.0%Pred. 175274848.87%Class recall0.0%100.00%As discussed, the data has been divided into two categories standing and walking states of the NAO robot based on 12 independent attributes associated with its gaits’ joint parameters. This work intends to construct a model that can predict NAO’s walking speed/velocity state more accurately. According to this research’s purpose, the result was not the best while using the most common classification methods, Naïve Bayes, and Decision Tree.


## 3.5. Artificial Neural Network (AI) (Experiments 3, 4, and 5)

The last segment of this work is building an ANN model for the NAO humanoid robot to learn the dataset generated by its gaits’ joint. The algorithm used for preparing the ANN is a feedforward technique trained using a backpropagation algorithm known as the multilayer perceptron. Figure11 represents a generic design for NAO’s walking using 12 parameters. Basically, this ANN follows a general structure of three layers: input, hidden, and output. The technique was applied three times with different combinations to get the optimal accuracy of the model. The primary purpose of building an ANN is to determine the difference between the previous two (naïve Bayes and decision tree) implementation and ANN. A first static neural network was designed with only one hidden layer with a 0.3 learning rate with 500 training cycles, as shown in Figure 12. The input layer consists of 12 attributes that relates to NAO’s gait parameters. Splitting of datasets into training and testing used 70% and 30%, respectively, to validate the model. The model’s result showed 55.12% accuracy, which proved that the prediction was more than 50% correctly the first time in this research (Hidden layer: 1; learning rate: 0.3; training cycle: 500. Hidden layer: 3; learning rate: 0.5; training cycle: 500. Hidden layer: 4; learning rate: 0.5; training cycle: 500 (experiments 3 to 5).Figure 11
Generic artificial neural network for NAO’s walking.Figure 12
Neural net learning rate 0.3; training cycle 500.The process repeats two more times with hidden layers with 3 and 4, respectively, while the learning rate also changed by 0.5. Moreover, both times, the accuracy metric measured after the implementation was around 65%, which was supposed to stand the highest and optimal accuracy metric of the learning model for NAO robot’s walking pattern during the whole experiment process. Therefore, the learning cycle was stopped at this point as there is no more improvement even by changes in the learning rate and the number of hidden layers, see Figures10(a)–10(d).Finally, the results show that the last model can predict new and unseen datasets as accurately as 65%. The summary and features of all the experiments are shown in Table8 below, which indicates that the ANN model scored the highest metrics accuracy.The Aldebaran library enables the NAO robot for a maximum straight-line speed of 9.52 cm/s. The best speed NAO records are 32 cm/s, 28 cm/s, 22 cm/s, and 44.47 cm/s [46] achieved during the RoboCup challenge in 2009-2010 by four teams: HTWK, B-human, rUNSWift, and Devils. This work adapts [46] calculation by taking the average of two-time measures for t1 and t2, for the steps satisfying the average distance d1=d2=3m, instead of exact measure as in [46] to calculate the average speed as follows:
(8)V1=d1/t1,(9)V2=d2/t2−t1,(10)V=d1+d2/t2.The calculated maximum speed shows that ANN accomplished 51.08% improved walking speed than Aldebaran NAO’s default straight-line speed, scoringV1=22.62, V2=40, and V=30. Future work using ANN or deep learning is expected to improve the speed velocity further by including NAO’s hand pattern and parameters during the walk. The main limitations of our study are limited dataset due not dataset available online and the privacy of the case study. Also, it requires larger data and would be more efficient for a greater number of parameters, 100, and more. A humanoid robot’s development requires an incredible combination of interdisciplinary work from engineering to mathematics, software, and machine learning. Furthermore, it is related to the design structure of the robot and the materials used to build it. The robot cannot walk on any surface, and the motor stiffness is an issue to consider. The current research limitation supports only walking in a straight line and on even surface, and data collection is limited only to the 12 selected parameters.


## 4. Conclusions

The research investigates the understanding and predicting of NOA humanoid gaits’ joint 12 parameters in two states (walking and standing). Therefore, the right and left legs contribute to generating numerous datasets for feeding the model as an input. Naïve Bayes, decision tree, and artificial neural net classification techniques were applied for learning and predicting the unseen observables. The accuracy metric was recorded for predicting new data generated from the NOA robot in the two different positions. Five experiments were designed where neural net training represents the maximum accuracy with 3 and 4 hidden layers for learning the whole learning process. The maximum accuracy metric rate of 65.31% was reached with only four hidden layers in 500 training cycles with a 0.5 learning rate for the best walking learning process. The optimal average velocity speed of 51.08% was achieved without stiffness. Thus, the tested hypothesis holds with the ANN model scoring the highest accuracy rate for predicting NAO’s robot walking state speed ofV1=22.62cm/s, V2=40cm/s, and V=30cm/s, taking both legs to gauge joint 12 parameter values. For future work, experimental techniques, both gaits, and hand movement behaviors, applyANN and deep learning techniques to measure NAO’s predictive walking pattern and improved speed model and stability performance.



---

*Source: 1496364-2021-09-22.xml*