Adaptive Walking Control for a Quadruped Robot on Irregular Terrain Using the Complex-Valued CPG Network

: In this paper, we propose a CPG (central pattern generator) network control system using motor dynamics for the gait planning of a quadruped robot with a trot walking pattern to climb up and down a slope and turn back and follow the symmetry of route. The CPG unit model, which includes two DC motors model, has the ability to generate the periodic joint angle with complex-value parameters. Through plural feedback parameters, the CPG network can adjust the frequency and amplitude of an internal neuron model such as a robot meeting an irregular surface of a road. Using the stride length and frequency of robot joint angles, the distance of walking with a trot pattern can be calculated. In order to conﬁrm the validity of the proposed control system, a quadruped robot is produced to implement the adaptive walking system.


Introduction
The development of a quadruped robot has potential technology applications from the military field to the rescue field. Especially for rehabilitation in the medical field, it has advanced rapidly in terms of intelligent exoskeletons and bionic prostheses [1,2]. A legged robot has excellent ability to go up and down stairs compared with an electrical wheelchair. The most important characteristic of a quadruped robot is gait planning for an irregular road [3]. However, the effective dynamics model of a legged robot for movement control in an unknown environment is difficult to compute. This is not only because the efficient mechanical dynamics arithmetic for evaluation of the robot joint torque is difficult to compute, but also because an adaptive walking control system for a legged robot to climb up and down a slope is complex [4,5].
There are many excellent research conclusions on dynamics analysis for a legged robot, which have steadily contributed to achieving the simulation [6,7]. However, their computational efficiency is discussed in the research field of legged robots [8]. The first criticism is the lack of intelligence because of the excessively mathematical model [9,10]. The second is that the method of inverse kinematics will be complicated for a robot meeting a complex road [11]. This is because, when the robot turns a corner, it needs to be accelerated and decelerated by actuators depending on a dynamic calculation for a superfluous rigid structure, especially when walking on a road with an irregular surface.
Because of the rapid progress of the biomedical field, researchers have obtained insights from the central nervous system to solve these problems such as the central pattern generator (CPG) unit model [12,13]. To biologist, CPG units, which are emerged in the spinal cord of vertebrates, can generate complex dimensional signals for the periodic movements of muscle [14][15][16][17].
Through this academic ideology, CPG networks have become an important walking control method for controlling adaptive motion signals using neural methodology [18]. Many significant mathematical models have been proposed for the CPG model, which have Symmetry 2021, 13, 2090 2 of 12 been able to generate period signals for rhythmic joint motion [19]. However, following the development of the legged robot, the CPG control concept faces some challenges. Because the CPG unit model is calculated by a high-order differential equation to output period signals, it is not easy to solve the parameters' value to generate adaptive signals [20]. Another important aspect is that the quadruped robot is almost controlled by a crawl walking pattern for walking on the flat surface with high weight. Once the weight becomes less, a tort walking pattern can be used. It is impossible to control the robot with a different walking pattern using a unique CPG network model. On the other hand, the calculation of the distance is also lacking in the current research, because the CPG period signal cannot control the motor directly. However, it is necessary for the quadruped robot to turn its body to come back and follow the original route [21].
In this paper, we propose an adaptive walking control system for a quadruped robot to climb up and down a slope, as well as turn back and follow the original route with a tort pattern walking, using CPG networks based on complex-valued parameters. The novelty of CPG in this research is that includes the DC dynamics motor model of the quadruped robot to control the power directly as the robot walks on an irregular surface. The CPG network is not only the high-order differential equation to output period signals, but also an important part of the driver system for the robot joint based on the parameter of motor dynamics. Compared with other research, the most significant advantage of this concept is that the reconstruction of the CPG network is rapid using the parameters of the motor, even if the robots change the motor. When the quadruped robot detects the up or down slope through body angle, the proposed CPG control system can change the plural feedback parameters automatically. When the quadruped robot is moving on the irregular surface, the internal unit parameters can adjust the value with different plural feedback parameter values. Using the stride length and the number of steps, the walking distance can be calculated. In order to ensure the validity of the proposed control system, simulation experiments using the mathematical model of the quadruped robot are conducted on the upslope and floor ground. Figure 1 shows the wireframe model of the quadruped robot. There are three active joints controlled by a DC motor with every leg of the robot. This mechanical structure provides three degrees of freedom for walking motion. There are three active joints in each leg. The main function of the first joint is the adjusting of the body height. The second and third joints are mostly used to provide the primary power for the forward movement. The weight of proposed robot is 1.8 kg and the max height is 0.23 m. In this hierarchy, the dynamic equation of the Featherstone algorithm can be used to calculate the instructions for the robot joints. Featherstone's articulated-body algorithm is used for the articulated-body equations to describe the dynamics of the mobile robot. Using this method, the quadruped robot is calculated following the dynamics tree-structure system. Through this algorithm, the dynamics equations can calculate the mechanical dynamics model of the joints' torque  Featherstone's articulated-body algorithm is used for the articulated-body equations to describe the dynamics of the mobile robot. Using this method, the quadruped robot is calculated following the dynamics tree-structure system. Through this algorithm, the dynamics equations can calculate the mechanical dynamics model of the joints' torque with efficient movement, as shown in Equation (1):

Quadruped Robot Model
The joint force and torque of robot vector of handle j are represented by f j and τ j . The control force and ground friction force of each link are shown in vector . ξ j to each rigid link. The inertia matrix is I A j . The vector b j is the Carolos's force, external force, and joint torque of handle j.
Using Featherstone's dynamics equations, a quadruped robot can be defined as a rigid body system for the dynamic equations based on an assembly tree of a robot system. Featherstone's dynamics equations be calculated efficiently for a quadruped robot walking on an irregular surface.

CPG Unit Model
In this research, an adaptive walking control system for a quadruped robot to overcome an up and down slope with a tort walking pattern depending on CPG networks is proposed. We design a CPG model, which includes the inhibitory and excitatory neurons for replacing by DC motor, which can drive each of the robot joints. The DC motor dynamics equations are the core component of the CPG model in terms of generating the angle joint. Figure  Featherstone's articulated-body algorithm is used for the articulated-body equations to describe the dynamics of the mobile robot. Using this method, the quadruped robot is calculated following the dynamics tree-structure system. Through this algorithm, the dynamics equations can calculate the mechanical dynamics model of the joints' torque with efficient movement, as shown in Equation (1): The joint force and torque of robot vector of handle j are represented by j f and Using Featherstone's dynamics equations, a quadruped robot can be defined as a rigid body system for the dynamic equations based on an assembly tree of a robot system. Featherstone's dynamics equations be calculated efficiently for a quadruped robot walking on an irregular surface.

CPG Unit Model
In this research, an adaptive walking control system for a quadruped robot to overcome an up and down slope with a tort walking pattern depending on CPG networks is proposed. We design a CPG model, which includes the inhibitory and excitatory neurons for replacing by DC motor, which can drive each of the robot joints. The DC motor dynamics equations are the core component of the CPG model in terms of generating the angle joint. Figure 2 shows the block diagram of the proposed CPG model. The equations of the CPG unit are shown in Equations (2)-(4): There are excitatory and inhibitory units in this CPG model, which are connected by coupling parameters. The internal states of these units are u e and u i presented for generating a series of rhythmic signals.
In the equations, the DC motor parameters show that the gain constant and time constant are presented K m and τ m , respectively; K g is the gear ratio; and K a is the gain. The intrinsic excitatory coupling parameters and the inhibitory and excitatory coupling factors are controlled by parameters a, b, and c, respectively. Through these DC motor parameters, we can set the value of the CPG unit model to generate the period signal. In this research, the values are shown in Table 1. In this manner, the CPG unit can obtain a series of accurate output signals, which can help the quadruped robot to record the walking distance through stride length and the number of steps. Feed e and Feed i are plural feedback parameters in the CPG unit model. These parameters are important for the response to information such as the signal from CPG nerve cells for road conditions that include not only a flat surface, but also an up and down slope. Using complex-value information, the CPG unit can adjust the range of the robot joint. Feed e and Feed i are feedback parameters of the CPG model; the values are shown in Table 2. The gyroscope sensor can feedback the body angle when walking on the complex surface. While the quadruped robot is walking on the irregularly surfaced road, the CPG unit parameters can change the value set using feedback environment information. By adjusting these mutual parameters, the periodic signals of the CPG unit can be adjusted to respond to the environment as the information changes. The wave shape of the CPG unit can change the crest and trough of the patterned cycle. Based on the characteristic of stable limit cycle, the result can prove the effectiveness of the CPG control strategy, as shown in     As shown in Figure 3, the output of CPG with an exciting and inhibitory unit can generate the signal periodically. Figure 4 shows the time constant of the limit cycle. For the oscillations to approach stability over time, the value of constant parameters can be adjusted following the different size of the cycle. Using the motor dynamics parameters, the CPG unit can generate the periodic signals in a stable manner.   As shown in Figure 3, the output of CPG with an exciting and inhibitory unit can generate the signal periodically. Figure 4 shows the time constant of the limit cycle. For the oscillations to approach stability over time, the value of constant parameters can be adjusted following the different size of the cycle. Using the motor dynamics parameters, the CPG unit can generate the periodic signals in a stable manner.

CPG Network
Using this biological neural system concept, each joint of the quadruped robot can be driven by a generator with the rhythm of the central pattern model (CPG). These rhythms of joint signal can generate the effective periodic motion for each robot joint. The robot body roll angle is proposed for climbing up and down the slope adaptively. These plural feedback parameters of CPG units can adjust the value for controlling the quadruped robot to move stably on irregular terrain. For generating the periodic tort walking pattern, cooperative oscillation with each robot joint is required. Four CPG unit models are connected to each other using mutual parameters following the gait planning, as depicted in Figure 5.

CPG Network
Using this biological neural system concept, each joint of the quadruped robot can be driven by a generator with the rhythm of the central pattern model (CPG). These rhythms of joint signal can generate the effective periodic motion for each robot joint. The robot body roll angle is proposed for climbing up and down the slope adaptively. These plural feedback parameters of CPG units can adjust the value for controlling the quadruped robot to move stably on irregular terrain. For generating the periodic tort walking pattern, cooperative oscillation with each robot joint is required. Four CPG unit models are connected to each other using mutual parameters following the gait planning, as depicted in Figure 5. Through coupling parameters ij k with the coupling parameters i and j ( i  Through coupling parameters k ij with the coupling parameters i and j (i,j = 1-4), the GPG units are connected to each other, in order to control the four legs of the robot. FL, BL, FR, and BR denote the front-left leg, hind-left leg, front-right leg, and hind-right leg, respectively. In the CPG networks, the CPG unit can receive internal and external signals, which can automatically adjust the complex value, based on the condition of the road surface. The equations of the dynamic CPG network are follows: For overcoming the complex surface of the road, the CPG network model can generate a series of high cycles depend on the characteristic complex-value feedback parameter, for adjusting the range of joints to control the body angle in a stable range. Once the slope angle exceeds the stable range of body roll angle, the feedback signals will stimulate the CPG networks to adjust the parameters for keeping the body angle stable.
In the series of experiments, using the gyroscope sensor signal and the distance data from the CPG stride length and the number of steps, the robot can recognize the complex condition of the road surface from the flat road to the up and down slope. Through this control method, the quadruped robot can overcome the irregular condition road and generate periodic angles adaptively.
While walking on the complex road surface, the CPG network model is mounted in each leg to generate periodic gait signals for the quadruped robot with a trot walking pattern, as depicted in Figure 6. They are connected to each of the CPG units by these coupling parameters. FL, BL, FR, and BR denote the front-left leg, hind-left leg, front-right leg, and hind-right leg, respectively.  Following the trot walking pattern, the joint angles are defined as the restriction of the CPG unit to output the cyclic walking gait for movement of the robot. The wire frame of the topology for trot gait is shown in Figure 6.
In Figure 6, we proposed the four legs as follows: hind-left → front-left → hind-right leg → front-right leg. Four CPG units were constructed in this network to control the different joint angles with the mutual parameters ij k .Using this method, the CPG network can connect to every unit to generate the adaptive joint angle. The coupling parameter ij k , as shown in the table, can adjust adaptively the pattern of the CPG network to control the joint angle for the trot motion based on the parameters of motor dynamics.
The coupling parameters of CPG networks are shown in Table 3. The periodic signals of the CPG network to control each leg of the quadruped robot are shown in Figures  7-10.  Following the trot walking pattern, the joint angles are defined as the restriction of the CPG unit to output the cyclic walking gait for movement of the robot. The wire frame of the topology for trot gait is shown in Figure 6.
In Figure 6, we proposed the four legs as follows: hind-left → front-left → hind-right leg → front-right leg. Four CPG units were constructed in this network to control the different joint angles with the mutual parameters k ij . Using this method, the CPG network can connect to every unit to generate the adaptive joint angle. The coupling parameter k ij , as shown in the table, can adjust adaptively the pattern of the CPG network to control the joint angle for the trot motion based on the parameters of motor dynamics.
The coupling parameters of CPG networks are shown in Table 3. The periodic signals of the CPG network to control each leg of the quadruped robot are shown in Figures 7-10. work to control the joint angle for the trot motion based on the parameters of motor dynamics. The coupling parameters of CPG networks are shown in Table 3. The periodic signals of the CPG network to control each leg of the quadruped robot are shown in Figures  7-10.    In Figures 7 and 8    In Figures 7 and 8    In Figures 7 and 8  In Figures 7 and 8, u e and u i have the ability to generate rhythmic signals. The units CPG1 and CPG3 have similar amplitude, while CPG2 and CPG4 are symmetrical patterns with opposite directions of rotation. They are classic joint angles resulting for the trot gait of the quadruped robot. Figures 9 and 10 show the result of the limit cycle with u e and u i . The trajectories are a regular cycle around the core. Based on adjusting the parameters of k ij , the CPG network can generate the trot pattern gait stably for the control of robot walking with motor dynamics. Furthermore, the distance of every step while the robot is walking can also be calculated following the regular signals.

Simulation Experiment
In this simulation experiment, the complex surface includes an up and down slope, as shown in Figure 11; the angle of the up and down slope is 15 • . The quadruped robot does not know such environment information. The marked points A, B, C, and D denote the boundary of the up and down slope. If the robot keeps the body angle in a stable range, the joint angles should be able to adjust based on CPG network parameters as it arrives at these points. Using the stride length and the number of steps, the walking distance can be calculated. Upon arriving at point D, the robot will turn back and walk through the complex surface with symmetry of route. The sensor of body angle can feed back this information to stimulate the CPG network to adjust the joint angle gait. Using the parameters of CPG networks, the robot can generate different joint angles, not only to climb up and down a slope, but also to turn a corner.
Symmetry 2021, 13, x FOR PEER REVIEW 9 of 13 through the complex surface with symmetry of route. The sensor of body angle can feed back this information to stimulate the CPG network to adjust the joint angle gait. Using the parameters of CPG networks, the robot can generate different joint angles, not only to climb up and down a slope, but also to turn a corner. Through the experimental results, our research team has set three groups of internal parameters, which are shown in Table 4, to adjust the result of the CPG network for different road conditions. Based on the experiment results, the walking control system can evaluate the CPG network control system using Featherstone's dynamics arithmetic. The whole processes of this experiment include three steps: Step1→Step2→Step3. Step1 is when the robot goes through the marked points from A to D using the CPG network control with different gait planning for flat and up and down slope. Step2 is when the robot turns the body angle about the Z axis to come back and follow the symmetry of the route, until arriving at point D again. And Step3 is coming back from D through to A. Figures 12-15 show each of the joint angles while this robot moves over the complex surface. The CPG network can generate rhythmic signals at the up and down slope. In Step1, the trajectory of each joint angle starts at point A with CPG network control, under the adjustment of complex-value parameters. In Step 2, the joint angle of the front-right leg and hind-right leg adjust the period signal with CPG network parameters, and the joint angle of the hind-left leg and front-left leg maintain the joint oscillators Through the experimental results, our research team has set three groups of internal parameters, which are shown in Table 4, to adjust the result of the CPG network for different road conditions. Based on the experiment results, the walking control system can evaluate the CPG network control system using Featherstone's dynamics arithmetic. The whole processes of this experiment include three steps: Step1→Step2→Step3. Step1 is when the robot goes through the marked points from A to D using the CPG network control with different gait planning for flat and up and down slope. Step2 is when the robot turns the body angle about the Z axis to come back and follow the symmetry of the route, until arriving at point D again. And Step3 is coming back from D through to A. Figures 12-15 show each of the joint angles while this robot moves over the complex surface. The CPG network can generate rhythmic signals at the up and down slope. In Step1, the trajectory of each joint angle starts at point A with CPG network control, under the adjustment of complex-value parameters. In Step 2, the joint angle of the front-right leg and hind-right leg adjust the period signal with CPG network parameters, and the joint angle of the hind-left leg and front-left leg maintain the joint oscillators signal. In this way, the robot can turn a corner to come back. In Step3, the robot can generate the joint angle to move through the marked points D, C, B, and A.    By adjusting the internal parameters of the CPG network with the plural feedback information, the quadruped robot can climb the up and down slope stably. By calculating the distance, the robot can turn the body around using complex value control. Figures 16-18 show the position of the robot body on the X, Y, and Z axis during the whole process. They can also evaluate the characteristics of the robot walking based on the CPG network.   As shown in Figure 16, the robot body angles are stable depending on the adjustment of the complex-value of the feedback parameter. The robot joint angles can be changed to move stably on the up and down slope with a trot walking pattern.
As shown in Figures 17 and 18, the robot body is in the stable range during Step1, using the CPG network parameters. To achieve the mission of Step 2, as the robot arrives at marked point D, the walking distance is calculated. Each joint of the front-right leg and hind-right leg change the wave in order to turn back. By adjusting the parameters, the robot moves back during Step3. Following the same way, the CPG control system adjusts the complex-value parameters automatically to walk stably from point D and A. Based on the calculation of distance, with the stimulation of the signal, the CPG control system can generate the stable trot walking pattern for the quadruped robot under this complex surface condition. These experiment results also demonstrate the effectiveness of feedback parameters with a complex number.

Conclusions
In this research, the CPG network displays the ability to overcome the up and down slope, as well as to turn back and follow the original route, through calculating the distance of the tort pattern walking using CPG networks with complex-values. Through the stimulation of plural feedback information, the CPG network can generate the high cycle signal to control the robot angle for the up and down slope. The superfluous calculation Step 1 Step 2 Step 3 Step 1 Step 2 Step 3  As shown in Figure 16, the robot body angles are stable depending on the adjustment of the complex-value of the feedback parameter. The robot joint angles can be changed to move stably on the up and down slope with a trot walking pattern.
As shown in Figures 17 and 18, the robot body is in the stable range during Step1, using the CPG network parameters. To achieve the mission of Step 2, as the robot arrives at marked point D, the walking distance is calculated. Each joint of the front-right leg and hind-right leg change the wave in order to turn back. By adjusting the parameters, the robot moves back during Step3. Following the same way, the CPG control system adjusts the complex-value parameters automatically to walk stably from point D and A. Based on the calculation of distance, with the stimulation of the signal, the CPG control system can generate the stable trot walking pattern for the quadruped robot under this complex surface condition. These experiment results also demonstrate the effectiveness of feedback parameters with a complex number.

Conclusions
In this research, the CPG network displays the ability to overcome the up and down slope, as well as to turn back and follow the original route, through calculating the distance of the tort pattern walking using CPG networks with complex-values. Through the stimulation of plural feedback information, the CPG network can generate the high cycle signal to control the robot angle for the up and down slope. The superfluous calculation of distance, using the stride length and the frequency of joint angle, is necessary when the robot turns back along the original route including the irregular terrain. In order to confirm that the proposed CPG network with complex-values has the ability to generate the tort gait for a quadruped robot moving over an up and down slope, our research designed a complex surface using Featherstone's dynamics equations. With gyroscope signals, the robot can recognize the body angle. The CPG parameters can adjust the value automatically to change the period and amplitude of oscillation with the trot waking pattern on the complex surface.
Through adaptability of these groups of CPG parameters, the periodic symmetry signals of the CPG unit will vary intensely to control the robot to move through the irregular road and turn back and follow the original route with asymmetry. Using the plural feedback parameters information, CPG networks with symmetry can adjust the angle range of joints for the robot body to respond in the stable region when climbing up and down an asymmetrical slope. The signals of the CPG network can cause the wave to vary in the period of the patterned cycle to calculate the distance of robot walking in the symmetry of the route. To develop the thesis of the neural system, this CPG network has the ability to reconstruct the CPG network rapidly using the parameters of the CPG unit, even if the quadruped robot changes the motor. The experiment confirms the validity of the proposed CPG control system. The quadruped robot is produced to implement the adaptive walking system. Using this concept, multi-legged robots can be controlled by a neural model system depending on the periodic generation of symmetry signals with feedback of the information of the environment.