A Study on Bipedal and Mobile Robot Behavior Through Modeling and Simulation

The purpose of this work is to study and analyze mobile robot behavior. In performing this, a framework is adopted and developed for mobile and bipedal robot. The robots are design, build, and run as proceed from the development of mechanical structure, electronics and control integration, and control software application. The behavior of those robots are difficult to be observed and analyzed qualitatively. To evaluate the design and behavior quality, modeling and simulation of robot structure and its task capability is performed. The stepwise procedure to robot behavior study is explained. Behavior cases study are experimented to bipedal robots, transporter robot and Autonomous Guided Vehicle (AGV) developed at our institution. The experimentation are conducted on those robots by adjusting their dynamic properties and/or surrounding environment. Validation is performed by comparing the simulation result and the real robot execution. The simulation gives a more idealistic behavior execution rather than realistic one. Adjustments are performed to fine tuning simulation's parameters to provide a more realistic performance.

Many aspects of robots have been studied independently. Reference [12] studied the biologically motivated push strategies for 3D bipedal robot. Reference [13] studied the trajectory of joint space for the optimal hip-mass of the robot. Reference [14] studied the robot characteristics in performing walking, rolling, and standing. Reference [15] studied the aspect of adaptive control stability. However, there are lack of coherent assessments on the various dynamic characteristics of the mobile robots.
Building and developing a robot to fulfill a specific function require careful design and analysis. In the preliminary stages, it is necessary to build a prototype in order to evaluate the design. On these phases, simulation is capable to provide a virtual robot prototype, which can be used to study and analyze the robot behavior [16].
The principles for robot modeling and simulation have been advised by Ref. [17]. The sample framework has been proposed by Ref. [18]. This framework demonstrates the use of the simulation to model and analyze mobile robot behavior. In particular, the software called Virtual Robot Experimentation Platform (V-REP) is capable to simulate the robots of types: bipedal robot, human-follower transporter robot, and Autonomous Guided Vehicle (AGV) robot. In general, the robot simulation process follows these steps depicted in Fig. 1.
This study focuses on the following dynamic characteristics of the mobile robots: walking behavior, exploration behavior, human-following behavior, aversive behavior, and robot stability.

II. METHODS
The robot dynamic characteristics will be studied via a simulation software. The robot and its obstacles are created within Virtual Robotic Experimentation Platform (V-REP). Firstly, the robot mechanical structure is produced with a computer-aided design (CAD) software. Secondly, we specify the robot dynamic Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015. characteristics. Finally, we set the types of the robot joints and the robot operations.
The created robot mechanical structure in the CAD software will be imported into the V-REP. The robot geometry will be scaled to fit to its virtual environment. The robot will also be decompose into different parts according to the robot operations.
In V-REP, pure shapes, such as, cubes, cylinders, or spheres, are stable and have good dynamic response. Pure shapes can simulate movement faster and more accurate. In the other side, random shapes are capable to model any geometrical forms, but they tend to be slow and unstable. A comparison of a pure shape and random shape objects is shown in Fig. 2. For these reasons, the current model utilizes the pure shapes.
The robot joint functions as actuator. In the current model, all joints are those of the revolute joint-type and are controlled via either inverse kinematics or torque/force modes. The joint controlled via the inverse kinematics mode is passive and its operations are determined by the inverse kinematics module [20]. Meanwhile, the joint with torque/force mode is active and can act either as motor or free-wheel joint. The torque of the motor can be determined through the joint dynamic parameters.
This study focuses on five robot behavior involv-! " # #  ing robots BR SS [21,22] BR-4 [23,24], Transporter MT [25,26], and AGV TP [27,28]. BR-4 will be used in the study of the stability and walking behavior, Transporter MT in the study of the exploration and human-following behavior, and AGV TP in the study of the exploration and aversive behavior.
In the study of the stability behavior, no algorithm will be used to stabilize the robot. The robot stability will be controlled via the distribution of the center of the mass of robot components. For the bipedal robot, the heaviest part is the robot hip. V-REP allows the user to adjust the mass of the robot component as well as changing the position of the center of the mass. The motor torque will also contribute to the robot stability.
Position control has to be applied to the robot joints to simulate the robot walking motion. For BS SS robot, the existing kinematic of the servo position of Ref. [21] will be used as the input. The walking motion will be evaluated qualitatively and quantitatively. Qualitative observation will be performed on the robot hip when the robot is positioned statically, see Fig. 3.
For the case of BR-4 robot, the walking behavior will be studied by using V-REP inverse kinematic module where an object, called dummy, must be used to define the end-effector of the robot and the desired target. To perform the walking motion of the bipedal robot, the dummies of the left and right leg can be positioned alternatively one after the other. The leg joints will automatically create a configuration that will suit the target dummy positions. The step height and size will be varied to obtain the most stable walking motion.
The robot exploration behavior of the transporter and AGV robots will be simulated by giving the robot driving joints a desired robot speed. For a given time, the robot initial and final positions will be measured. A V-REP function will be used to get the robot position. The detailed method to study the explorational behavior is shown in Fig. 4.
The robot human following behavior is derived following the scene depicted in Fig. 5 where the H Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015. circle denotes the person and the prism denotes the robot. The prism vertex is the robot head direction.
The distances x 1 and y 1 are the relative position of the person with respect to the robot. D is the distance between the centers of the two objects.
The algorithm of the human following behavior begins by acquiring the values of x 1 , y 1 , and β. The distance D is calculated by In addition, the corresponding angle α are calculated by: for y 1 negative. However, when y 1 is positive, the formulas is If α and β are on the same side of the reference line, then the rotation angle to be performed by the robot is the absolute difference of the two angles α and β. Depending on α and β, the robot will either rotate the left or to the right.
Another feasible configuration is for α and β at different side of the reference line. The algorithm will use the absolute values of α and β and will add the two. If the resulting angle γ is greater than 2π, then the rotation angle to be performed will be 2π − γ. The rotation direction depends only on x 1 , α, and β.
When the initial target position A is obtained, the robot rotates itself and heads towards the target A. The robot wheels will move oppositely with the robot centerline as the pivot. The robot rotating speed ω is calculated by where v l and v r are the tangential speeds of the left and right wheel of the robot. d denotes the distance between the wheels. When the robot has reached the desired orientation, the robot approaches the target at a constant speed while maintaining its relative distance beyond a threshold. The threshold r is user-defined and should be provided by considering the robot geometry. Once the robot entered the threshold, the robot will acquire the new target position B, which is the new position of the person.
The aversive behavior of AGV TP will utilize the V-REP functions to acquire the relative and absolute positions with respect to interacting objects. The behavior is derived on the basis of the interaction depicted in Fig. 6. In the figure, the green box represents AGV TP which possesses the aversive behavior. The red box symbolizes the moving obstacles.
AGV TP moves in a specified direction at the speed v 1 . The moving obstacle moves towards AGV TP from the left at the speed of v 2 . AGV TP and the obstacle is separated by the distances of x 1 and y 1 in the xand y-directions, respectively. The distances x 2 , y 2 , and Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015. y 3 denote the thresholds that will be used to decide whether the robot has safe distance to move forward without colliding the obstacle. These thresholds, as well as the speeds v 1 and v 2 are user-defined.
At the beginning of the simulation, the obstacle and robot are set to move at a constant velocity. Then, the robot will evaluate whether it has reached the critical region. The variables t 1 and t 2 denote the time for the robot and obstacle to pass the critical region and they can be calculated by If t 1 is greater than or equal to t 2 , the robot will collide with the obstacle. Thus, the robot has to wait the obstacle passes the region. If t 1 is smaller t 2 , the robot should have time to pass the critical region without colliding the obstacle and the robot should maintain its speed [29].   To execute walking motion into BR-4 robot, an inverse kinematics (IK) module is used for each leg. The left leg is supposed to move first followed by the right leg. However, with this approach, the robot jumps    instead of walks around as shown in Fig. 10.

A. Simulation based Analysis
During the second testing of the robot, a delay is introduced between the execution of the left leg and the right leg (see Fig. 11). However, the robot executes only the left leg movement without moving the right leg; hence, the robot loses its stability and fell. The problem persists when the IK calculation is performed continuously for each leg and at the same time, the robot is expected to walk with the alternative legs.
The robot exploration behavior is measured by the variation of the left and right wheel speeds, the coefficient of friction between the wheels and the floor, and the caster wheel's mass. The experiments are performed with the assumption that the motor can introduce the high level of acceleration. The simulation time is fixed at 5 s. The first experiment is conducted by keeping the velocities of the wheels constant at 20 RPM and the coefficient of friction at 1.0. The caster wheel's mass is varied to see how it affects the robot straight-line motion. The result are plotted in Figs. 12 and 13. Those results show that the highest variations in the distance and the deviation occur at the mass of 0.7 kg. In general, increasing the mass reduces the traveled distance but increases the variation. This phenomenon is likely due to the fact that the caster wheel's inertia is greater as the mass increases.
In the next experiment, the caster wheel's mass and the velocities are fixed constant at 0.1 kg and 20 RPM, respectively, but the coefficient of friction between the wheels and the floor is varied. The results are shown in Fig. 14 and 15. This experiment indicates that the traveled distance decreases with increasing friction. On the other hand, the deviation fluctuates between 5 mm and 40 mm when the friction coefficient increases gradually from 0.2 to 1.0.
For the AGV robot, the experiment is carried out by maintaining the platform's mass constant while varying the pulley's mass. During the experiment, the curve motion of AGV TP is observed and the diameter of the circle path made by the robot is measured. The measured data are then compared to the calculated diameter value. As illustrated in Fig. 16, the diameter of the circle for different velocity v 1 and v 2 is given as: The errors are calculated and tabulated along with the measured values. Figure 17 shows the graph of the error variation based on the changing value of pulley mass.
From Fig. 17, it can be seen that the smaller masses of pulley (2-6 kg) resulted in relatively small errors compared to the larger ones (8-10 kg). Figure 18 shows the path of AGV TP of the given pulley's mass. The yellow line is the path made with pulley's mass of 2 kg while the red line is the path made with pulley's mass of 10 kg. The large inertia of the pulley resists the motor torque and as a result, the robot is unable Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015. to perform the desired circular motion perfectly as specified through the path planner.
Another simulation experiment is performed by varying platform's mass instead of pulley's mass. Fig. 19 shows influence of varying platform's mass to path error. The largest error is made when the platform mass is around 80 kg. It can be deduced that larger error are made with higher velocities, due to larger inertia of the platform which resists the motor torque. Two user-defined paths are drawn and a human model from V-REP library is employed to follow the path. Then, the transporter deploys a human-following algorithm to follow the person. To follow the person, two path shapes are prepared. The first path shape is like an eight number. There are several parameters which are varied in order to see the robot path execution. These are the person walking speed, the speed at which the robot rotates, the speed at which the robot approaches the person, the threshold distance between the person and the robot, and the initial positions of the robot. The results of the experiments are shown on Fig. 20.
The robot ran off its track because the human walk speed is very slow as shown in Fig. 20A. As a result,  the robot collided with the person and bounced off the track. Figure 20B shows the smoothest result among all tracked human paths. This may be caused by the threshold distance which does not allow the robot to come too close and thus not the slightest collision response is generated. It can be deduced that the for a good path pattern, a slow walking speed of the human is necessary but it has to be accompanied with large threshold distance so that no crash occurs. Figure 20D suggests that the human walk speed is very fast in comparison to the robot's execution. Hence, the robot's path is broken and not smooth. Towards the end of the track, the robot is unable to approach the person last position and it went beyond the track.
The second path shape is a sinusoidal wave. Different initial configurations are made and the results are shown at Fig. 21. It shows the pattern of robot following human at the front.
The robot aversive or protective behavior is studied Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015.   by adjusting three parameters: the detection distance y 2 (see Fig. 6), the accelerations of the motors, and the initial configurations of the robot and obstacle. The robot velocity v 1 and obstacle velocity v 2 are maintained constant at 1.0 m/s. The initial configurations are shown in Fig. 22. The results of this case are summarized in Table II. The data show that the robot aversive behavior strongly depends on the acceleration of the motors and the robot initial configuration.

B. Validation with Real Robot
The walking behavior of the bipedal robot is compared to the actual robot with the second model of the simulation. The comparison is focused on the movement of the robot hip and is made qualitatively. In  the case of the actual robot, the robot hip is maintained on a fixed position by means of cables. The result is shown in Fig. 23. The simulated robot response has previously shown in Fig. 8. By comparing the two figures, it suggests that the walking behavior are rather similar. The simulated robot model is also compared the actual robot for the exploration behavior. In this case, the both robots are compared in their ability to move across a straight line. The results are shown in Figs. 24 and 25. Those figures indicate that the traveled distances Cite this article as: Nirmala, P. I. Tanaya, and M. Sinaga, "A study on bipedal and mobile robot behavior through modeling and simulation," CommIT Journal, vol. 9, no. 1, pp. 1-10, 2015.  by the two robots are about the same in trend and in magnitude. However, the actual robot movement has slightly larger variation. The actual robot movement is clearly affected by the roughness of the floor, which changes the direction of the caster wheel easily.
As clearly shown in Table III, the actual robot deviates more the actual trajectory with a magnitude larger than that of the simulated robot. The simulated robot operates in an ideal condition where the left and right pulleys are identical and the driving motors are synchronized precisely. However, for the case of the actual robot, the pulleys are clearly not identical and the motors are not precisely synchronized.
The human-following behavior has been evaluated in Ref. [26] and their results are compared to the current simulation results. This comparison is shown in Fig. 26. In the actual robot, the robot trace is produced using a marker that placed the center of the robot platform. The marker leaves the robot trace on the lab floor where the experiment is performed. The results in Fig. 26 conclude that the two robots behave similarly.

IV. CONCLUSIONS
The behavior study of the bipedal and mobile robot are necessary for a preliminary study and can be done through simulation. The mechanical model with joint and link connection should be properly arranged to function similar to that of the real physical robot configuration. The modeling and simulation application tools such as V-REP are crucial. The robot behavior is affected by its own properties, the given task and its surrounding environment. There are small discrepancy in the robot responses between the actual and the simulated robots. This gap is important and can be used as information for configuring the robot control system.