## Chao Wang , Xiao Jianliang* and Cheng Zhang## |

Parameter | Description | Value |
---|---|---|

[TeX:] $$M_W$$ | Mass of wheel | 0.05 kg |

[TeX:] $$M_B$$ | Mass of body | 1.125 kg |

I | Torque of the wheel | [TeX:] $$4.77 \times 10^{-5} \mathrm{~kg} \cdot \mathrm{m}^2$$ |

J | Inertia of the body rotating about the motor axis | [TeX:] $$5.19 \times 10^{-3} \mathrm{~kg} \cdot \mathrm{m}^2$$ |

K | Inertia of the body rotating about the pendulum | [TeX:] $$6.3 \times 10^{-3} \mathrm{~kg} \cdot \mathrm{m}^2$$ |

r | wheel radius | 0.035 m |

l | Center distance of the robot body and the motor axis | 0.053 m |

d | Wheel axle distance | 0.24 m |

The overall structure of FNN control system is shown in Fig. 3.

The TWSBR control system has three subsystems: upright control, turning control and displacement control. The three subsystems are connected through the “static coupling” matrix. According to the separation principle of ADRC design, ADRCs are proposed for the upright and displacement subsystem respectively. In addition, the transition process is implemented by a tracking differentiator (TD), the ESO and error feedback control law are designed. Since the disturbance model is not included in the turning subsystem, a simple PD control approach is presented for the system. Based on the traditional ADRC of upright subsystem and displacement subsystem, two FNNs with the same structure are introduced respectively. The error of angle and angle error rate of change, the error of displacement and displacement error rate of change are taken as the inputs of the two networks, and the outputs of the two networks are used to regulate the parameters of the nonlinear PD control rate, so as to enhance the disturbance rejection ability of the system.

From the above expression, it can be concluded that the system is a multiple-input and multiple-out (MIMO) coupled system. In order to use decoupling control for a multivariable system, the system is expressed in the following form:

where,

[TeX:] $$\begin{aligned} &f_1\left(x_1, x_2, x_6, \alpha\right)=\frac{B_1+B_2-B_3}{A}\\ &f_2=0\\ &f_3\left(x_1, x_2, x_6, \alpha\right)=\frac{C_1-C_2-C_3-C_4}{A}\\ &b_{11}\left(x_1, \alpha\right)=b_{12}\left(x_1, \alpha\right)=\frac{-\left[a_1+a_4 \cos \left(x_1+\alpha+\theta_{\varepsilon}\right)\right]}{a_1 a_2-a_4^2 \cos ^2\left(x_1+\theta_{\varepsilon}+\alpha\right)}\\ &b_{21}=-b_{22}=\frac{d r}{a_3}\\ &b_{31}\left(x_1, \alpha\right)=b_{32}\left(x_1, \alpha\right)=\frac{\left[a_2 r+a_4 r \cos \left(x_1+\alpha+\theta_{\varepsilon}\right)\right]}{a_1 a_2-a_4^2 \cos ^2\left(x_1+\theta_{\varepsilon}+\alpha\right)} . \end{aligned}$$

According to expression (2), the amplification coefficient matrix of the control force is

Virtual control variables [TeX:] $$U_1, U_2, U_3$$ are introduced, and the input-output relationship of each channel is

In this way, the relationship between the virtual control signal of each channel and the controlled output is single-input and single-output (SISO). Each channel’s output and the intermediate control signal are perfectly decoupled, and the controller of each subsystem should be presented on the basis of the approach of the SISO system.

The real control signal can be expressed as follows:

Select the [TeX:] $$x_1$$ in sight of the equilibrium point, [TeX:] $$x_1=0, \alpha=0$$ can be selected to calculate the approximate value of B. Then calculate the inverse of B, since B is irreversible in this system, the pseudo-inverse matrix [TeX:] $$X_B$$ is calculated for B.

After the system is decoupled, the expression of the upright subsystem is

The expected angle value of the subsystem is 0, so it is not necessary to have the tracking differentiator. Only the nonlinear control rate and ESO need to be designed, and then the dynamic compensation linearization is carried out. The ESO of the upright subsystem is

where,

[TeX:] $$f a l(e, \gamma, \delta)=\left\{\begin{array}{c} |e|^\gamma \operatorname{sign}(e),|e|>\delta \\ e / \delta^{\gamma-1},|e| \leq \delta \end{array}\right.$$

[TeX:] $$z_{11}$$ is the estimation of the system output, [TeX:] $$z_{12}$$ is the estimation of system state [TeX:] $$x_{1=} \quad Z_{13}$$ is the estimation of system state [TeX:] $$x_2.$$

The nonlinear PD control rate of the upright subsystem is

where [TeX:] $$\beta_1, \beta_2$$ are the parameters of nonlinear PD control rate.

Because it is necessary to design the FNN to correct [TeX:] $$\beta_1, \beta_2$$ in real time according to the inclination error signal and inclination velocity error signal, the correction parameters [TeX:] $$\Delta \beta_1, \Delta \beta_2$$ are introduced. The values are directly applied to the original control rate parameter to modify it. Therefore, the expression (8) is written as follows:

The compensation of the disturbance for the upright subsystem is

When the dynamic system is decoupled, the expression of the turning subsystem is

Since the turning subsystem is a plain integrator series system, the control system of upright and displacement has little negative effect on the turning subsystem, the simple PD approach is adopted for the turning subsystem.

where [TeX:] $$\varphi_r$$ is the desirable turning angle and [TeX:] $$\varphi$$ is the real turning angle.

Since the system is decoupled, the displacement subsystem can be expressed as

The subsystem of displacement and the subsystem of upright interact with each other. In order to avoid overshoot of the subsystem of displacement and the effect of the upright control, the transition process is arranged. The other designs are similar to the upright subsystem. The TD used to realize the transition process is

where, the solution [TeX:] $$v_1$$ of the equation can approach [TeX:] $$y_3$$ in any finite time, [TeX:] $$v_2$$ is the differential signal of [TeX:] $$v_1.$$

The ESO of the displacement subsystem is

where,

[TeX:] $$Z_{31}$$ is the estimation of the system output, [TeX:] $$Z_{32}$$ is the estimation of system state [TeX:] $$x_{5,} \quad Z_{33}$$ is the estimation of system state [TeX:] $$x_6.$$

The nonlinear PD control rate of the displacement subsystem is

where,[TeX:] $$\beta_3 \text { and } \beta_4$$ are the parameters of nonlinear PD control rate, [TeX:] $$\Delta \beta_3 \text { and } \Delta \beta_4$$ are the correction parameters.

The disturbance compensation of displacement subsystem is

The structure of FNN is shown in Fig. 4. The entire network has two inputs and two outputs, there are five layers in total. For the upright and displacement subsystem, the network is applied to adjust the parameters of the control rate respectively.

The first layer is the input layer which has two nodes. The inputs of the layer are the error and the error rate of the change. Its function is to pass the input to the next layer node.

The second layer is the membership layer which has six nodes, and each input corresponding to the first layer has three fuzzy sets {"negative", "zero", "positive"}. Gaussian functions are adopted as membership functions, then

where [TeX:] $$i=1,2 ; j=1,2,3 ; A_i^j\left(x_i\right)$$ indicates that the i-th input corresponds to the j-th linguistic variable value.

The third layer is the inference layer, which has nine nodes, each node represents a fuzzy rule, and the applicability of each rule is calculated as

where, [TeX:] $$j_1=1,2,3 ; j_2=1,2,3 ; l=1,2, \ldots, 9.$$

The fourth layer is the normalized layer, which also has nine nodes, and the normalized calculation result is

where [TeX:] $$l=1,2, \ldots, 9.$$

The fifth layer is the output layer, which has two nodes for de-fuzzification calculation. The outputs of the layer are correction offsets of control parameters.

where, [TeX:] $$k=1,2 ; \omega_{k l}$$ is the weight of the network, [TeX:] $$y_k$$ is the output of the network, [TeX:] $$\Delta \beta_1=y_1, \Delta \beta_2=y_2.$$

The fuzzy segmentation number in this design has been determined, and the parameters to be trained include the connection weight [TeX:] $$\omega_{k l}$$ of the fifth layer, and the center value parameters [TeX:] $$a_{i j} \text { and } b_{i j}$$ of the second layer.

Let the desired output of the system be [TeX:] $$\hat{y}_k,$$ the training objective functions are

The iterative formulas for adjusting parameters are

where, [TeX:] $$k=1,2 ; l=1,2, \ldots, 9.$$

where, [TeX:] $$i=1,2,3 ; j=1,2,3.$$

where, [TeX:] $$\eta_1, \eta_2, \eta_3$$ are the learning rates.

In order to examinate the control effect, ADRC, FADRC, and FNNADRC are used to control the TWSBR under different road surfaces, and the simulation results are analysed and compared. The parameters of ADRC are determined by the trial and error method, and then corrected by FNN when the system is running. The parameters of FNN are adjusted by error back-propagation. According to the stress analysis, the maximum [TeX:] $$x_1$$ of TWSBR is [TeX:] $$\arctan \mu, \text { where } \mu$$ is ground friction coefficient [7], therefore, the initial value of inclination should be less than this value. There is no restriction on the initial values of steering angle and displacement. Based on the above instructions, set the initial states [TeX:] $$x_1=\pi / 20, x_3=\pi / 4, x_5=0,$$ desired states [TeX:] $$x_1=0, x_3=0, x_5=0.5.$$

In case of flat road surface [TeX:] $$\alpha=0,$$ ADRC, FADRC and FNNADRC are used for control simulation respectively. The upright inclination, turning angle and displacement control effects are shown in Figs. 5–7. Fig. 5 shows that the upright curves of ADRC and FADRC oscillate greatly. The error between the real dip angle and the expected value is large, while the error between the dip curve of FNNADRC and the target value is the small. There is no disturbance in the turning subsystem of TWSBR dynamic model, so the little error between the real and the expected value of turning angle in Fig. 6 is showed. Therefore, the error between the real and the expected value of the turning angle under any road condition is relatively small, and the control result is similar to Fig. 6, which will not be described later. Fig. 7 shows that the error of FNNADRC between the displacement curve and the target value is small, and it is better than that of ADRC and FADRC. In conclusion, the control effect of FNNADRC is more satisfactory than the other two methods on flat road surface.

In case of slope road surface [TeX:] $$\alpha=0.174 \mathrm{rad},$$ ADRC, FADRC and FNNADRC are used for control simulation respectively. The control effects of upright inclination and displacement are displayed in Figs. 8 and 9. Fig. 8 exhibits that the upright curve oscillation amplitude of ADRC and FADRC is large, while the error between the inclination curve of FNNADRC and the target value is small. Fig. 8 shows that the dip and displacement curves of FNNADRC are smoother and have less errors. To sum up, FNNADRC has the best comprehensive control effect under the slope.

Under the condition of undulating road surface [TeX:] $$\alpha=\sin x_1,$$ ADRC, FADRC and FNNADRC are used for control simulation respectively. The upright inclination and displacement control effects are exhibited in Figs. 10 and 11. Fig. 10 shows that the upright curve oscillation amplitude of ADRC and FADRC is large, while the error between the inclination curve of FNNADRC and the target value is more acceptable. Fig. 11 shows that the displacement curves of ADRC and FADRC have large oscillation amplitude, while the error between the displacement curve of FNNADRC and the target value is more in line with the requirements. In summary, FNNADRC has the best comprehensive control effect under undulating road surface.

In this research, the disturbance rejection problem of the TWSBR in complex environments is studied. According to the dynamics model of the TWSBR system on undulating pavement, the FNNADRC is designed. The nonlinear system is decoupled into three subsystems. Then, considering the characteristics of the subsystems, an ADRC is designed to ensure the stability of the subsystems. And the controller parameters are corrected by the self-learning function of the FNN. Under flat road surface, slope road surface and undulating road surface, the control methods of ADRC, FADRC and FNNADRC are simulated and compared respectively to examinate the disturbance rejection capability of FNNADRC. The results of the simulation display that FNNADRC has improved anti-interference capability compared with the other two methods.

- 1 R. P . M. Chan, K. A. Stol, and C. R. Halkyard, "Review of modelling and control of two-wheeled robots,"
*Annual Reviews in Control*, vol. 37, no. 1, pp. 89-103, 2013.doi:[[[10.1016/j.arcontrol.2013.03.004]]] - 2 B. Mahler and J. Haase, "Mathematical model and control strategy of a two-wheeled self-balancing robot," in
*Proceedings of the 39th Annual Conference of the IEEE Industrial Electronics Society*, Vienna, Austria, 2013, pp. 4198-4203.doi:[[[10.1109/IECON.2013.6699809]]] - 3 M. A. Imtiaz, M. Naveed, N. Bibi, S. Aziz, and S. Z. H. Naqvi, "Control system design, analysis & implementation of two wheeled self balancing robot (TWSBR)," in
*Proceedings of 2018 IEEE 9th Annual Information Technology*, Electronics and Mobile Communication Conference (IEMCON), V ancouver, Canada, 2018, pp. 431-437.doi:[[[10.1109/IEMCON.2018.8614858]]] - 4 C. C. Tsai, H. C. Huang, and S. C. Lin, "Adaptive neural network control of a self-balancing two-wheeled scooter,"
*IEEE Transactions on Industrial Electronics*, vol. 57, no. 4, pp. 1420-1428, 2010.doi:[[[10.1109/TIE.2009.2039452]]] - 5 Z. Kausar, K. Stol, and N. Patel, "The effect of terrain inclination on performance and the stability region of two-wheeled mobile robots,"
*International Journal of Advanced Robotic Systems*, vol. 9, no. 5, article no. 218, 2012. https://doi.org/10.5772/52894doi:[[[10.5772/52894]]] - 6 M. I. Ali and M. M. Hossen, "A two-wheeled self-balanced robot with dynamics model," in Proceedings of 2017 4th International Conference on Advances in Electrical Engineering (ICAEE), Dhaka, Bangladesh, 2017, pp. 271-275.doi:[[[10.1109/ICAEE.2017.8255365]]]
- 7 Z. Kausar, K. Stol, and N. Patel, "Performance enhancement of a statically unstable two wheeled mobile robot traversing on an uneven surface," in
*Proceedings of 2010 IEEE Conference on Robotics*, Automation and Mechatronics, Singapore, 2010, pp. 156-162.doi:[[[10.1109/ramech.2010.5513197]]] - 8 J. Wu, W. Zhang, and S. Wang, "A two-wheeled self-balancing robot with the fuzzy PD control method,"
*Mathematical Problems in Engineering*, vol. 2012, article no. 469491, 2012. https://doi.org/10.1155/2012/469491doi:[[[10.1155//469491]]] - 9 J. Hu and G. F. Yan, "Analysis of two-wheeled self-balancing mobile robots based on ADRC," Journal of Mechanical & Electrical Engineering, vol. 31, no. 2, pp. 159-164, 2014.custom:[[[-]]]
- 10 L. Jiang, H. Qiu, Z. Wu, and J. He, "Active disturbance rejection control based on adaptive differential evolution for two-wheeled self-balancing robot," in
*Proceedings of 2016 Chinese Control and Decision Conference (CCDC)*, Yinchuan, China, 2016, pp. 6761-6766.doi:[[[10.1109/ccdc.2016.7532214]]] - 11 A. Unluturk and O. Aydogdu, "Adaptive control of two-wheeled mobile balance robot capable to adapt different surfaces using a novel artificial neural network–based real-time switching dynamic controller,"
*International Journal of Advanced Robotic Systems*, vol. 14, no. 2, article no. 1729881417700893, 2017. https://doi.org/10.1177/1729881417700893doi:[[[10.1177/1729881417700893]]] - 12 D. Liang, N. Sun, Y . Wu, and Y . Fang, "Dynamic modeling and control of inverted pendulum robots moving on undulating pavements," in
*Proceedings of 2017 Seventh International Conference on Information Science and Technology (ICIST)*, Da Nang, Vietnam, 2017, pp. 115-120.doi:[[[10.1109/ICIST.2017.7926503]]] - 13 K. G. Tran, N. H. Nguyen, and P . D. Nguyen, "Observer-based controllers for two-wheeled inverted robots with unknown input disturbance and model uncertainty," Journal of Control Science and Engineering, vol. 2020, article no. 7205737, 2020. https://doi.org/10.1155/2020/7205737doi:[[[10.1155/2020/737]]]
- 14 E. H. Karam, R. S. Habeeb, and N. Mjeed, "A new approach in design of sliding mode controller by optimization state feedback for two wheeled self balancing robot,"
*International Journal of Open Information Technologies*, vol. 8, no. 10, pp. 39-44, 2020.custom:[[[-]]] - 15 M. R. Fikri, D. W. Djamari, and S. M. Levy, "H-infinity controller design of two-wheeled mobile robot under disturbance," in
*Proceedings of 2021 International Seminar on Intelligent Technology and Its Applications (ISITIA)*, Surabaya, Indonesia, 2021, pp. 147-152.doi:[[[10.1109/ISITIA52817.2021.9502218]]] - 16 Y. Wang,
*Robot Intelligent Control Engineering*. Beijing, China: Science Press, 2004.custom:[[[-]]]