{'fraction_non_alphanumeric': 0.028868684975161683, 'fraction_numerical': 0.007592089230480832, 'mean_word_length': 4.405268490374874, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design of Simple-Structured Fuzzy Logic Systems for Segway-Type Mobile Robot

Studies on the control of the inverted pendulum type system have been widely reported. This is because it is a typical complex nonlinear system and may be a good model for verifying the performance of a proposed control system. In this paper, we propose the design of some fuzzy logic control (FLC) systems for controlling a Segway-type mobile robot, which is an inverted pendulum type system. We ﬁrst derive a dynamic model of the Segway-type mobile robot and then analyze it in detail. Next, we propose the design of some FLC systems that have good performance for the control of any nonlinear system. Then, we design two conventional FLC systems for the position and balance control of the Segway-type mobile robot, and we demonstrate their usefulness through simulations. Next, we point out the possibility of simplifying the design process and reducing the computational complexity,, which results from the skew symmetric property of the fuzzy control rule tables. Finally, we design two other FLC systems for position and balance control of the Segway-type mobile robot. These systems have only one input variable in the FLC systems. Furthermore, we observe that they offer similar control performance to that of the conventional two-input FLC systems.


Introduction
An inverted pendulum type system is a typical complex nonlinear system and a good model for verifying the performance of a proposed control system. It inherently has a nonlinear nature. An inverted pendulum type mobile robot is a system that adds mobility to the utilization of a mechanical function to balance the inverted pendulum system [1]. Research related to the control of an inverted pendulum type system has been widely reported [2][3][4][5][6][7][8][9][10][11][12][13]. Furthermore, it is similar to the control scheme of a biped robot created based on the observation that people maintain balance using their two feet while moving to a destination.
The Segway-type mobile robot moves based on an inverted pendulum system. The robot can move forward, backward, and turn, and it is controlled only by the movement of the body. Unlike scooters, where two wheels are placed in series and are generally dependent, the Segway-type mobile robot is a vehicle where the two wheels are connected in parallel. Thus, the Segway-type mobile robot allows constructing a mobile platform that can travel smoothly to a small area by reducing the migration area. However, a mobile robot employing an inverted pendulum mechanism as its mobile platform requires an additional controller design to maintain the balance of the body. Such balancing is generally not steady under excessive disturbance.
In this paper, we propose the design of some fuzzy logic control (FLC) systems for position and balance control of a Segway-type mobile robot that has nonlinear properties. We first derive a dynamic model of a Segway-type mobile robot and then analyze it in detail. Then, we design two conventional FLC systems based on the analysis. These systems are for position and balance control of the Segway-type mobile robot. We present some simulation examples to confirm the performance of the proposed control systems. Further, we propose the possibility of reducing the computational complexity and simplifying the design of a conventional FLC system, based on the skew symmetry property of the control rule table for the FLC system. Based on the analysis of the conventional FLC system, we finally design two other FLC systems for position and balance control of the Segway-type mobile robot. There is only a single input variable in the newly proposed FLC systems. Furthermore, we will see that they offer similar control performances compared to those of conventional two-input FLC systems.
The remainder of the paper is organized as follows. In Section 2, we describe the derivation of a dynamic model of the Segway-type mobile robot. The design of two FLC systems for a Segway-type mobile robot is presented in Section 3. We also propose two simple-structured FLC systems that use only a single input variable. In Section 4, we show some results of simulation examples and their usefulness. Our concluding remarks are discussed in Section 5.

Dynamics of the Segway-Type Mobile Robot
A Segway-type mobile robot is composed of two wheels and a pole located between them. The angle of the pole is measured by using a gyro sensor, tilt sensor, or acceleration sensor, and it must be controlled to be held at 0. Here, we derive the dynamics of a Segway-type mobile robot, which is an inverted pendulum type of mobile robot. Its schematic views are shown in Figure  1.
The main parameters used in Figure 1 are presented in Table  1.
As can be seen from Figure 1, the Segway-type mobile robot can be divided into two parts. One part is the wheels and the other is the pole, which consists of a pole and driving motor to support the body over the wheel and to maintain balance.
We will first derive a few equations associated with the wheels in Figure 1(b). The following equations can be drawn The rotational angle between the wheels and the displacement of the robot has the following relationship.
From Eqs. (2) and (3), the horizontal reaction force of the wheels is derived by the displacement and driving torque as Eq. (5) can be obtained from Eqs. (1) and (4) as Next, we derive the dynamic equations of the pole. The force acting on a body comprising the pole is depicted in Figure 1(c). Then, the displacement of the center of gravity of the pole in the horizontal direction is Eq. (6) can be expressed by an acceleration form of Eq. (7) asẍ Eq. (7) can be expressed by a motion equation with respect to the axis of the center of gravity of the pole as The displacement of the center of gravity of the pole in the vertical direction is Eq. (10) can be expressed in the form of an acceleration equation asÿ Eq. (11) can be expressed by a motion equation with respect to the y-axis of the center of gravity of the pole.
The inertia moment of the center of gravity of the pole is The following equation is derived from Eqs. (9), (13), and (15).
That is, the dynamic model of the Segway-type mobile robot is expressed by Eqs. (14) and (16).

Design of Fuzzy Logic Control System
In the reference [14], a simple-structured FLC was presented. Two FLC systems are required for controlling the Segway-type mobile robot. These are distance FLC and balance FLC systems for position and balance control, respectively [15].
First, distance FLC is designed to control the position of the robot. It has two input variables: the error signal between the set position and the current position of the robot, and its change signal. It also has one output variable: the weight of the angle error of the pole.
Membership functions of the input and output variables for distance FLC are seen in Figures 2-4   The Z membership function for the output variable, torque, was widely set. The shape of membership functions PLO and NLO is sharper than that of the Z membership function. It can reduce the vibration of the output variable and make the output of the system converge to a steady state.
The control rule table for balance FLC is set as shown in Table 3.
Next, we analyze the control rule table for the general FLC system. We can see some properties from rule tables for the conventional FLC systems: they have a skew-symmetric property, and the strength of control actions is proportional to the dis-   tance from the zero action line. That is, most fuzzy control rule tables for the minimum phase processes have a skew-symmetric property, as seen in Tables 2 and 3.
From these properties, we can design a simple-structured FLC system. That is, these two-input rule tables can be changed to single-input tables. Then, the number of control rules is greatly reduced and fine control can be easily implemented. Now, we derive a control rule table with only a single input variable from the two-input rule tables of Table 2 or Table 3. We first induce a single-input rule table that can replace Table  2. For this, we introduce a variable, dsd, as follows:  where K 1 and K 2 are design parameters. Then, Table 2 will be replaced by Table 4.
In Table 4, ud is an output variable for distance FLC. Table 4 is more simplified than Table 2. It has only five control rules.
We next induce a single-input rule table that can replace Table 3. As with the preceding process, we introduce a variable, bsd, as follows: where K 3 and K 4 are design parameters. Then, Table 3 will be replaced by Table 5.
In Table 5, ub is an output variable for balance FLC. Table 5 is more simplified than Table 3. It has only five control rules.     The AND and OR operations for the FLC system are min and max, respectively. Mamdani reasoning and a defuzzification method for the center of gravity are used in this simulation. We set the angle of the pole at 1 rad and the target position of the robot at 10 m. Figures 8(a) and (b) are the simulation results for the angle of a pole. They are cases of a conventional FLC system and a single-input system, respectively. Figures 9(a) and (b) are simulation results of the velocity of the robot. They are cases of a conventional FLC system and a single-input system, respectively.
As we can see from the simulation results, the performance is almost the same. Therefore, the simplified system has many advantages.

Concluding Remarks
In this paper, we analyzed the dynamics of a Segway-type mobile robot that has a nonlinear property. Then, we designed two conventional FLC systems for controlling the position of the Segway-type mobile robot and the balance of the pole.
We first designed distance FLC for position control, which has two input variables of the error signal between the set position and the current position of the robot and its change signal. It also has an output variable of the weight of the angle error of the pole. Then, we designed balance FLC for controlling the balance of the pole. Its input variables are the angle of the pole and the output of distance FLC. Its output variable is torque.
We observed that the control rule tables for the two conven-tional-input FLC systems have a skew-symmetric property, and the strength of the control actions is proportional to the distance from the zero action line. From those properties, we could design another FLC system with greatly reduced control rules. The newly designed control systems have only a single input variable instead of the two input variables of the conventional FLC systems. However, the control performance was almost the same.