Robust and Intelligent Control of a Typical Underactuated Robot: Mobile Wheeled Inverted Pendulum 9811971560, 9789811971563

This book presents the achievements of the author's team in the research of a special underactuated system called m

256 108 4MB

English Pages 122 [123] Year 2023

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Preface
Contents
Symbols
1 Introduction
1.1 An Overview of MWIP Robots
1.2 Control Methods of the MWIP System
1.3 Outline of Book
References
2 Modeling of Mobile Wheeled Inverted Pendulums
2.1 Introduction
2.2 Two-Dimensional Dynamic Model
2.3 Three-Dimensional Dynamic Model
2.4 Dynamic Model with Uncertainties
2.5 Physical Design of the MWIP Robot
2.5.1 Sensing System of the MWIP
2.5.2 Servo Motor Control System of the MWIP
2.6 Conclusion
3 Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems
3.1 Introduction
3.2 First-Order Disturbance Observer
3.3 Second-Order Disturbance Observer
3.4 High-Order Disturbance Observer
3.5 High-Order Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems
3.6 Simulation Studies
3.6.1 Disturbance Observers
3.6.2 High-Order Disturbance Observer-Based Sliding Mode Control
3.7 Conclusion
References
4 Sliding Mode Variable Structure-Based Chattering Avoidance Control for Mobile Wheeled Inverted Pendulums
4.1 Introduction
4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems
4.3 Terminal Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems
4.3.1 TSMC Controller Design
4.3.2 Analysis of Velocity Convergence
4.4 Simulation Studies
4.4.1 Adaptive Super-Twisting Control
4.4.2 Terminal Sliding Mode Control
4.5 Conclusion
References
5 Interval Type-2 Fuzzy Logic Control of Mobile Wheeled Inverted Pendulums
5.1 Introduction
5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile Two-Wheeled Inverted Pendulum
5.3 IT2 FLSs for Controlling the Balance, Position, and Direction of the MWIP
5.3.1 Balance Control
5.3.2 Position and Direction Control
5.4 Simulation Studies
5.5 Discussions
5.5.1 Robustness of the IT2 FLS
5.5.2 Stability of the IT2 FLS
5.6 Conclusion
References
6 Experiments of Controlling Real Mobile Wheeled Inverted Pendulums
6.1 Experimental Setup
6.2 Experimental Results
6.2.1 Experimental Results of High-Order Disturbance Observer-Based Sliding Mode Control
6.2.2 Experimental Results of Adaptive Super-Twisting Control
6.2.3 Experimental Results of Interval Type-2 Fuzzy Logic Control
6.3 Conclusion
7 Conclusion
Recommend Papers

Robust and Intelligent Control of a Typical Underactuated Robot: Mobile Wheeled Inverted Pendulum
 9811971560, 9789811971563

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Research on Intelligent Manufacturing

Jian Huang · Mengshi Zhang · Toshio Fukuda

Robust and Intelligent Control of a Typical Underactuated Robot Mobile Wheeled Inverted Pendulum

Research on Intelligent Manufacturing Editors-in-Chief Han Ding, Huazhong University of Science and Technology, Wuhan, Hubei, China Ronglei Sun, Huazhong University of Science and Technology, Wuhan, Hubei, China Series Editors Kok-Meng Lee, Georgia Institute of Technology, Atlanta, GA, USA Cheng’en Wang, School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai, China Yongchun Fang, College of Computer and Control Engineering, Nankai University, Tianjin, China Yusheng Shi, School of Materials Science and Engineering, Huazhong University of Science and Technology, Wuhan, Hubei, China Hong Qiao, Institute of Automation, Chinese Academy of Sciences, Beijing, China Shudong Sun, School of Mechanical Engineering, Northwestern Polytechnical University, Xi’an, Shaanxi, China Zhijiang Du, State Key Laboratory of Robotics and System, Harbin Institute of Technology, Harbin, Heilongjiang, China Dinghua Zhang, School of Mechanical Engineering, Northwestern Polytechnical University, Xi’an, Shaanxi, China Xianming Zhang, School of Mechanical and Automotive Engineering, South China University of Technology, Guangzhou, Guangdong, China Dapeng Fan, College of Mechatronic Engineering and Automation, National University of Defense Technology, Changsha, Hunan, China Xinjian Gu, School of Mechanical Engineering, Zhejiang University, Hangzhou, Zhejiang, China Bo Tao, School of Mechanical Science and Engineering, Huazhong University of Science and Technology, Wuhan, Hubei, China Jianda Han, College of Artificial Intelligence, Nankai University, Tianjin, China Yongcheng Lin, College of Mechanical and Electrical Engineering, Central South University, Changsha, Hunan, China Zhenhua Xiong, School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai, China

Research on Intelligent Manufacturing (RIM) publishes the latest developments and applications of research in intelligent manufacturing—rapidly, informally and in high quality. It combines theory and practice to analyse related cases in fields including but not limited to: Intelligent design theory and technologies Intelligent manufacturing equipment and technologies Intelligent sensing and control technologies Intelligent manufacturing systems and services This book series aims to address hot technological spots and solve challenging problems in the field of intelligent manufacturing. It brings together scientists and engineers working in all related branches from both East and West, under the support of national strategies like Industry 4.0 and Made in China 2025. With its wide coverage in all related branches, such as Industrial Internet of Things (IoT), Cloud Computing, 3D Printing and Virtual Reality Technology, we hope this book series can provide the researchers with a scientific platform to exchange and share the latest findings, ideas, and advances, and to chart the frontiers of intelligent manufacturing. The series’ scope includes monographs, professional books and graduate textbooks, edited volumes, and reference works intended to support education in related areas at the graduate and post-graduate levels.

Jian Huang · Mengshi Zhang · Toshio Fukuda

Robust and Intelligent Control of a Typical Underactuated Robot Mobile Wheeled Inverted Pendulum

Jian Huang Huazhong University of Science and Technology Wuhan, Hubei, China

Mengshi Zhang Huazhong University of Science and Technology Wuhan, Hubei, China

Toshio Fukuda Nagoya University Nagoya, Aichi, Japan

ISSN 2523-3386 ISSN 2523-3394 (electronic) Research on Intelligent Manufacturing ISBN 978-981-19-7156-3 ISBN 978-981-19-7157-0 (eBook) https://doi.org/10.1007/978-981-19-7157-0 Jointly published with Huazhong University of Science and Technology Press The print edition is not for sale in China (Mainland). Customers from China (Mainland) please order the print book from: Huazhong University of Science and Technology Press. © Huazhong University of Science and Technology Press 2023 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publishers, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publishers nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publishers remain neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd. The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore

Preface

Cities all over the world are gradually implementing plans to ban gasoline and dieselpowered vehicles within the next decade or so. To achieve this goal, the concept of last mile is one of the key problems that should be addressed in various measures taken by administrators. The last mile is that distance traveled between the termination of public transport and one’s destination. For example, your office might be as far as a mile away from the nearest bus stop. Even taking the bus to and from work, you have to conquer the final mile with portable urban transportation if you don’t want to walk. The mobile wheeled inverted pendulum (MWIP) is a typical underactuated robotic system, which is widely used in modern urban transportation vehicles aiming at solving the last mile problem. This kind of urban transportation vehicle includes the Segway PT, Toyota Winglet, Honda U3-X, and so on. In the real-world application scenarios, the MWIP suffers from many internal/external uncertainties, e.g., different road conditions, the random user, or wind load. Besides, the system identification of MWIP parameters is also difficult due to the complex structure and multiple degreesof-freedom (DOFs). The conventional model-based control method is thus hard to fulfill the high-performance control tasks of MWIP. Therefore, the advanced robust and intelligent control of MWIP is vital, and this motivates us to write the current monograph. Since the dynamic model of MWIP is the prerequisite for its control design, this book firstly introduces the modeling procedure of MWIP, in both two-dimensional and three-dimensional cases. Second, to deal with the internal/external uncertainties, we lumped the uncertainties into a single disturbance term and designed a novel highorder disturbance observer (HODO) to online estimate this disturbance term. With the compensation of disturbance, a new high-order disturbance observer-based sliding mode control (HODOSMC) strategy is proposed. Third, considering the chattering problem in sliding mode control (SMC), this book introduces two approaches for the MWIP. One is the adaptive super-twisting algorithm, which is a second-order SMC strategy and able to efficiently alleviate the chattering phenomenon. The other is the terminal sliding mode control (TSMC), which can ensure that all variables converge to the expected value in a limited time. Next, to better model and cope v

vi

Preface

with uncertainties, the interval type-2 fuzzy sets (IT2 FSs) are introduced to design a new fuzzy controller for the MWIP system. The proposed controller can control its balance, position, and direction simultaneously. Finally, all the proposed control approaches are implemented in a physical MWIP platform. Various experiments are conducted, and the results demonstrate that these approaches are effective to solve the uncertainty problems in controlling MWIP. This book mainly presents theoretical explorations for controlling MWIP systems. Readers can systematically study the MWIP system, including its modeling, controller design, stability analysis, numerical simulation, and experimental platform construction. The book is primarily intended for researchers and engineers in the robotics and control community. It can also serve as complementary reading for nonlinear system theory and underactuated robotic control techniques at the postgraduate level. Wuhan, China Wuhan, China Nagoya, Japan

Jian Huang Mengshi Zhang Toshio Fukuda

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 An Overview of MWIP Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Control Methods of the MWIP System . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Outline of Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 1 7 9 10

2 Modeling of Mobile Wheeled Inverted Pendulums . . . . . . . . . . . . . . . . . 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Two-Dimensional Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Three-Dimensional Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Dynamic Model with Uncertainties . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Physical Design of the MWIP Robot . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Sensing System of the MWIP . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 Servo Motor Control System of the MWIP . . . . . . . . . . . . . . . 2.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13 13 13 15 20 23 23 26 28

3 Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 First-Order Disturbance Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Second-Order Disturbance Observer . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 High-Order Disturbance Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 High-Order Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems . . . . . . . . . 3.6 Simulation Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.1 Disturbance Observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6.2 High-Order Disturbance Observer-Based Sliding Mode Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31 31 32 33 36 41 45 45 48 49 50

vii

viii

Contents

4 Sliding Mode Variable Structure-Based Chattering Avoidance Control for Mobile Wheeled Inverted Pendulums . . . . . . . . . . . . . . . . . . 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Terminal Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 TSMC Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Analysis of Velocity Convergence . . . . . . . . . . . . . . . . . . . . . . 4.4 Simulation Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 Adaptive Super-Twisting Control . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Terminal Sliding Mode Control . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Interval Type-2 Fuzzy Logic Control of Mobile Wheeled Inverted Pendulums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile Two-Wheeled Inverted Pendulum . . . . . . . . . . . . . . . . . . 5.3 IT2 FLSs for Controlling the Balance, Position, and Direction of the MWIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 Balance Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.2 Position and Direction Control . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Simulation Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.1 Robustness of the IT2 FLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.2 Stability of the IT2 FLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53 53 55 61 61 63 65 65 67 76 77 79 79 80 84 84 88 90 91 91 92 92 93

6 Experiments of Controlling Real Mobile Wheeled Inverted Pendulums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6.2.1 Experimental Results of High-Order Disturbance Observer-Based Sliding Mode Control . . . . . . . . . . . . . . . . . . 99 6.2.2 Experimental Results of Adaptive Super-Twisting Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.2.3 Experimental Results of Interval Type-2 Fuzzy Logic Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Symbols

ψl ψr α θ mb mw Iby Ibz Iwa Iwd l r 2b Db Dw ur ul τext τd∗ (xb , yb ) (xw , yw ) q2D (x1 , y1 , z 1 ) qf q3D Tb Tw Rb Rw U D

Rotation angle of the left wheel Rotation angle of the right wheel Yaw angle of the MWIP system Inclination angle of the body Mass of the body Mass of a wheel Moment of inertia of the body about Y-axis Moment of inertia of the body about Z-axis Moment of inertia of a wheel about Y-axis Moment of inertia of a wheel about Z-axis Length between the wheel axle and the center of gravity of the body Radius of the wheel Distance between two wheels Viscous resistance in the driving system Viscous resistance of the ground Rotation torque of the left motor Rotation torque of the right motor External disturbances Lumped model uncertainties and external disturbances Position of the MWIP body in two-dimensional model Position of the MWIP wheel in two-dimensional model Configurational vector of two-dimensional model Position of the MWIP body in three-dimensional model Full state vector of three-dimensional model Configurational vector of three-dimensional model Translational kinetic energy of the MWIP body Translational kinetic energy of the MWIP wheels Rotational kinetic energy of the MWIP body Rotational kinetic energy of the MWIP wheels Potential energy of the MWIP system Dissipated energy of the MWIP system ix

x

L τd τ id





e Li d¯i S1 S2 K1 K2 λi

Symbols

Lagrange function Estimation of the lumped disturbances Estimation of the lumped disturbances of the i-th-order disturbance observer Estimation error of the disturbance observer Gain matrices of the high-order disturbance observer Bound of the estimation error The first sliding surface The second sliding surface Switching coefficient of the first sliding surface Switching coefficient of the second sliding surface Parameters of the sliding surface

Chapter 1

Introduction

1.1 An Overview of MWIP Robots As early as 1987, Kazuo Yamafuji, professor of the University of Electro Communications, began to study the two-wheeled balance control technology, which is considered as the ideological origin of two-wheeled self-balancing robot [1]. As shown in Fig. 1.1, the small lever on the wheel acted as a sensor to detect the inclination of the car body, and the rectangular control motor drives the inverted pendulum to maintain the overall balance of the robot itself. However, due to the low technology of computer and sensor at that time, this technology did not receive much attention. Grasser et al. [2] of the Swiss Federal University of Technology have developed a two-wheeled self-balancing car named as JOE, as shown in Fig. 1.2. This selfbalancing car can realize zero radius and U-shaped rotation; furthermore, remote control of the movement speed and direction also has been achieved. American scientist David P. Anderson developed a two-wheeled self-balancing vehicle model nBOT based on inverted pendulum, as shown in Fig. 1.3 [3]. By measuring the tilt angle and angular speed of the inverted pendulum and the position and speed of the chassis, the controller outputs the torque which is directly proportional to the motor voltage, so as to realize the self-balance and movement of the car. nBOT can not only realize zero radius rotation, move indoors and outdoors, but also choose the route to bypass the obstacles and continue to move after encountering obstacles. In 2001, Segway company of the USA invented a new type of convenient twowheeled vehicle Segway [4]. After several improvements, Segway Pt has become a practical, mature, and self-balancing modern transportation technology product, as shown in Fig. 1.4. Segway users can start, accelerate, decelerate, and stop the vehicle by regulating the position of the gravity center. Under the condition of keeping balance, the users can drive conveniently on various roads. Its appearance fully demonstrates the flexibility and practicability of two-wheeled self-balancing mobile robot and arouses people’s attention to the future traffic.

© Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_1

1

2 Fig. 1.1 Self-balancing robot

Fig. 1.2 Self-balancing robot: JOE

1 Introduction

1.1 An Overview of MWIP Robots

3

Fig. 1.3 Self-balancing vehicle: nBOT

Figure 1.5 shows another self-balancing robot Legway, which is designed by LEGO company of Denmark [5]. It is compact in structure and flexible in control. The modular structure is adopted in the design, so that it is convenient to install and disassemble. Legway can not only move on the flat ground, but also realize climbing by adjusting its own balance point. In the design of Legway, the differential drive mode of motor is introduced. In Fig. 1.6, the “FLATHRU” developed by Sanyo of Japan can move the center of gravity forward or backward by extending the upper body forward or backward. At the same time, according to the wheel speed, the upper body tilt angle is changed to keep the balance skillfully. Even if the ground is slightly uneven, it can move normally without falling down. The maximum walking speed can reach 30 cm/s, and the weight is around 10 kg. In addition to commercial companies, the mobile wheeled inverted pendulum, as a typical underactuated system, has been widely studied by researchers in universities to verify their algorithms. For example, the two-wheeled autonomous mobile robot-RMP was studied in University of Michigan [6], as shown in Fig. 1.7. Fukuda of Nagoya University invented a narrow vehicle called the UW-Car that includes an MWIP base and a movable seat driven by a linear motor along the straight direction of motion, as shown in Fig. 1.8 [7]. A cane-type single-wheeled inverted pendulum robot (IP-cane) for the elderly walking aid, shown in Fig. 1.9, is investigated at Meijo University [8]. Experiments confirmed that the robot could reduce the trunk sway by 20% compared to volunteers without the robot. The two-wheeled self-balancing robot developed in University of Science and Technology of China is similar to JOE. The robust variance control algorithm is adopted to ensure the steady-state

4

1 Introduction

Fig. 1.4 Two-wheeled vehicle: segway

performance of the system [9]. And a two-wheeled self-balancing robot [10, 11] has been developed by National Central University of Taiwan. This robot can realize remote control, forward and backward, which is shown in Fig. 1.10. Xidian University designed a two-wheeled self-balancing mobile robot [12], which is composed of two parallel driving wheels and a balancing adjustment mechanism. Hierarchical fuzzy controller is used to control the robot in a large range of inclination angle, so as to realize the self-balance of the system. Figure 1.11 presents the two-wheeled robot controlled by single chip microcomputer in Harbin Engineering University [13]. The PWM technology was adopted to dynamically control the speed of two wheels of the car, and the developers used the reflective infrared distance sensor to measure the tilt angle of vehicle body, so as to realize the balance control and data exchange of the two-wheeled self-balancing robot. In Beijing Institute of Technology, the MWIP system is studied to achieve a variety of tasks, such as zero radius turning in narrow space, climbing, passing through obstacles, running forward and backward, and so on [14, 15].

1.1 An Overview of MWIP Robots Fig. 1.5 Self-balancing robot: legway

Fig. 1.6 FLATHRU developed by Sanyo of Japan

5

6 Fig. 1.7 Two-wheeled autonomous mobile robot: RMP

Fig. 1.8 Mechanism of a UW-Car

1 Introduction

1.2 Control Methods of the MWIP System

7

Fig. 1.9 System structure of IP-cane

Fig. 1.10 Two-wheeled robot developed by National Central University of Taiwan

1.2 Control Methods of the MWIP System MWIP is a typical nonlinear underactuated and essentially unstable system with three degrees of freedom but two control inputs. Whether in theory or in practice, the research on it has been widely concerned by scholars in the worldwide. Because the kinematic model of the system cannot fully describe the motion state of the system [16], only by studying the dynamics of the system can we better realize the balance control, speed control and trajectory tracking tasks. The common dynamic modeling methods mainly include Lagrange method [17, 18] and Newton Euler method [19]. The mobile wheeled inverted pendulum can be controlled similar to the inverted

8

1 Introduction

Fig. 1.11 Two-wheeled robot of Harbin Engineering University

pendulum system. Inverted pendulum is a classical benchmark control platform, and there are many related control methods have been applied on it. The related control works are summarized as follows: (1) Linear control method [17, 20]: First, the Lagrange equation is used to establish the dynamic model of the inverted pendulum. Then its linear model is deduced by state space theory and feedback linearization. Generally, the state space model is obtained by linearizing the nonlinear dynamics around the equilibrium of the MWIP system. Based on the approximated linear model, linear controllers can be applied to control the performance of the MWIP system, such as feedback linearization control, linear quadratic regulator (LQR), etc. (2) Robust control method [21, 22]: Due to the variation of working environment, external disturbance, model error as well as the characteristics of underactuated and nonlinear instability, robust control method is widely used on the MWIP system. The previous procedure is the same as that of linear control method. Firstly, the dynamic model is established, which is usually written in the form of differential equations. Then, the methods such as H ∞ state feedback and sliding mode control (SMC) can be adopted to realize the robust control of MWIP system.

1.3 Outline of Book

9

(3) Intelligent control method [23–25]: In view of the complexity and the uncertainty of the MWIP system, intelligent control method can present its own superiority. It has been proved that the neural network can approximate the complex nonlinearity effectively. The network is able to learn and adapt to the system with severe uncertainty and is characterized with strong robustness and fault tolerance. Fuzzy controller, adaptive controller, and so on are common intelligent controllers used by researchers. In some circumstances, a combination of several intelligent algorithms can also be developed, such as fuzzy adaptive controller, fuzzy neural network controller, etc. (4) Combination of intelligent control and optimization algorithm [26, 27]: An intelligent control algorithm often contains a number of parameters, and the control performance depends on a set of appropriate parameters. Therefore, an intelligent control algorithm is usually combined with optimization algorithms, such as Particle Swarm Optimization (PSO), Genetic Algorithm (GA), to optimize control parameters for achieving satisfactory control effect. For example, in the combination of GA and neural network, the neural network controller is designed first, and then the weights of neural network are trained by GA. This controller not only has the extensive mapping ability of neural network, but also has the fast convergence and enhanced learning performance of genetic algorithm.

1.3 Outline of Book This book contains seven chapters which exploit several independent yet related topics in detail. This chapter concisely reviews the development and current situation of MWIP system, as well as the commonly used control algorithms, which provide a sound base for this book. Chapter 2 describes the nominal dynamic modeling process of the MWIP system in the two- and three-dimensional space. However, in the physical world, modeling errors and external disturbances cannot be avoided. Therefore, this chapter also gives a dynamic model including disturbances. Furthermore, in the last section of Chap. 2, the design process of physical platform is presented, which can provide great convenience for the readers to build their own MWIP system. In Chap. 3, a variety of disturbance observers (DO) with different orders are designed for underactuated MWIP system. Furthermore, we present the combination method of SMC and DO, which has the capacity of reducing the chattering phenomenon of traditional SMC method. The stability of the whole closed-loop system is proved through Lyapunov theorem. Finally, simulation results are given to validate the superiority of this control strategy. In Chap. 4, two sliding mode-based control approaches have been investigated. The first one is a kind of second-order sliding mode control called super twisting control. The second one is terminal sliding mode control. Both the above two methods

10

1 Introduction

can effectively alleviate the chattering problem caused by the traditional sliding mode control. Chapter 5 mainly introduces the interval type-2 fuzzy logic control of the MWIP system. At first, interval type-2 fuzzy logic systems (IT2 FLSs) describes the dynamics of the MWIP using a TakagiCSugeno model, the second IT2 FLS controls the balance of the MWIP using also a TakagiCSugeno model, and the third and fourth IT2 FLSs control its position and direction, respectively, using a Mamdani model. A linear matrix inequality-based design approach is also proposed to guarantee the stability of the balance controller. The proposed approach is verified by simulations. In Chap. 6, we present experimental results on a real-world MWIP platform by employing all the proposed methods in the previous chapters. Finally, Chap. 7 concludes the whole book.

References 1. Yamafuji, K., Miyakawa, Y., & Kawamura, T. (1985). Synchronous steering control of a parallel bicycle. Transactions of the Japan Society of Mechanical Engineers, 55(513), 1229–1234. 2. Grasser, F., Arrigo, A. D., Colombi, S., et al. (2002). JOE: A mobile inverted pendulum. IEEE Transactions on Industrial Electronics, 49(1), 107–114. 3. Salerno, A., & Angeles, J. (2007). A new family of two-wheeled mobile robots: Modeling and controlability. IEEE Trans on Robotics, 23(1), 169–173. 4. Arling, A. W., Chang, S. T., & Field, J. D., et al. (2006). Personal transporter. United States Design Patent. US D528468S, 19 Sep, 2006. 5. Ghani, N., Naim, F., & Yon, T. (2011). Two wheels balancing robot with line following capability. World Academy of Science, Engineering and Technology, 55(7), 1401–1405. 6. Ojeda, L., Raju, M., Borenstein, J. (2004). Flexnav: A fuzzy logic expert dead-reckoning system for the segway RMP. In Proceedings of the SPIE defense and security symposium, unamanned ground vehicle technology VI(OR54) (pp. 12–16). 7. Fukuda, T., Huang, J., Matsuno, T., & Sekiyama, K. (2014). Modeling and control of a new narrow vehicle. In Advances in Intelligent Vehicles (pp. 1–43). Academic Press. 8. Kato, M., Ichikawa, A., Kondo, I., & Fukuda, T. (2018). Stabilization of walking with walkingaid cane robot applying light touch effect. In International symposium on micro-nano mechatronics and human science (MHS) (pp. 1–4). 9. Chen, X., Wei, H., & Zhang, Y. (2006). Modeling of dual-wheel cart-inverted pendulum and robust variance control. Computer Simulation3. 10. Wang, W., & Huang, C. (2009). Model-based fuzzy control application to a self-balancing two-wheeled inverted pendulum. In 2009 IEEE control applications, (CCA) intelligent control, (ISIC) (pp. 1158–1163). 11. Huang, C., Wang, W., & Chiu, C. (2011). Design and implementation of fuzzy control on a two-wheel inverted pendulum. IEEE Transactions on Industrial Electronics,58(7), 2988–3001. July. 12. Ding, X., Zhang, P., Yang, X., & Xu, Y. (2005). The application of hierarchical fuzzy control for two-wheel mobile inverted pendulum. Electric Machines and Control, 9(4), 372. 13. Sun, H., Zhou, H., & Li, X. et al. (2009). Design of two-wheel self-balanced electric vehicle based on MEMS. In 2009 4th IEEE international conference on nano/micro engineered and molecular systems(pp. 143–146). 14. Li, J., Gao, X., & Huang, Q., et al. (2007). Mechanical design and dynamic modeling of a two-wheeled inverted pendulum mobile robot. In 2007 IEEE international conference on automation and logistics (pp. 1614–1619).

References

11

15. Li, C., Gao, X., Huang, Q., et al. (2011). A coaxial couple wheeled robot with T-S fuzzy equilibrium control. Industrial Robot, 8(3), 292–300. 16. Salerno, A., & Angeles, J. (2003). On the nonlinear controllability of a quasiholonomic mobile robot. In IEEE 2003 international conference robotics and automation (ICRA 2003) (pp. 3379– 3384). 17. Pathak, K., Franch, J., & Agrawal, S. (2005). Velocity and position control of a wheeled inverted pendulum by partial feedback linearization. IEEE Transactions on Robotics, 21(3), 505–513. 18. Marino, R. (1986). On the largest feedback linearizable subsystem. Systems and Control Letters, 6, 345–351. 19. Dasgupta, B., & Choudhury, P. (1999). A general strategy based on the Newton-Euler approach for the dynamic formulation of parallel manipulators. Mechanism and machine theory, 34(6), 801–824. 20. Gans, N., & Hutchinson, S. (2006). Visual servo velocity and pose control of a wheeled inverted pendulum through partial-feedback linearization. In IEEE/RSJ international conference on intelligent robots and systems (pp. 3823–3828). 21. Vander, L., & Lambrcchts, P. (1993). H-∞ control of an experimental inverted pendulum with dry friction. IEEE control system magazine, 14(4), 44–50. 22. Ashrafiuon, H., & Erwin, R. (2004). Sliding control approach to underactuated multibody systems. In Proceedings American control conference (pp. 1283–1288). 23. Huang, J., Ri, M., Wu, D., et al. (2017). Interval type-2 fuzzy logic modeling and control of a mobile two-wheeled inverted pendulum. IEEE Transactions on Fuzzy Systems, 26(4), 2030–2038. 24. Yang, C., Li, Z., Cui, R., et al. (2014). Neural network-based motion control of an underactuated wheeled inverted pendulum model. IEEE Transactions on Neural Networks and Learning Systems, 25(11), 2004–2016. 25. Li, Z., & Yang, C. (2011). Neural-adaptive output feedback control of a class of transportation vehicles based on wheeled inverted pendulum models. IEEE Transactions on Control Systems Technology, 20(6), 1583–1591. 26. Yu, G., Leu, Y., & Huang, H. (2017). PSO-based fuzzy control of a self-balancing two-wheeled robot. In 17th world congress of international fuzzy systems association and 9th international conference on soft computing and intelligent systems (IFSA-SCIS) (pp. 1–5). 27. Chakraborty, K., Mukherjee, R., & Mukherjee, S. (2013). Tuning of PID controller of Inverted pendulum using genetic algorithm. International Journal of Soft Computing and Engineering (IJSCE), 3(1), 21–24.

Chapter 2

Modeling of Mobile Wheeled Inverted Pendulums

2.1 Introduction In this chapter, Lagrangian motion equation is first used to model the dynamics of the MWIP system, since it is the basis of the control algorithms in the subsequent chapters. Aiming at different motion scenarios, two-dimensional and three-dimensional dynamic models of MWIP system are established respectively. In addition, we give the construction method of the physical MWIP system, the selection and principle of the sensors, which can provide great convenience for the readers to build their own MWIP system.

2.2 Two-Dimensional Dynamic Model In this section, the dynamics of two-dimensional MWIP system is established considering that the MWIP system only moves in a straight line on the slope. Figure 2.1 shows the structure of a two-dimensional MWIP system, in which the coordinate system and configuration variables are depicted in the appropriate position. The variables are introduced in the list of Symbols. According to the coordinates shown in Fig. 2.1, the positions of the body and wheel in the system can be obtained as follows: 

xb = l sin θb + r θw cos α , yb = l cos θb + r θw sin α 

xw = r θw cos α . yw = r θw sin α

(2.1)

(2.2)

Then, the speed can be derived by differentiating (2.1)–(2.2) along time © Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_2

13

14

2 Modeling of Mobile Wheeled Inverted Pendulums

Fig. 2.1 Two-dimensional mobile wheeled inverted pendulum moving on the slope



x˙b = l θ˙b cos θb + r θ˙w cos α , y˙b = −l θ˙b sin θb + r θ˙w sin α 

x˙w = r θ˙w cos α . y˙w = r θ˙w sin α

(2.3)

(2.4)

Lagrangian motion equation is subsequently used to analyze the dynamics of the system. To obtain the Lagrangian function, the full energy of the system needs to be calculated. The kinetic energies of the body and wheel can be computed as  1 1  2 m b x˙b + y˙b2 + Ib θ˙b2 2 2  1 1  2 2 = m b r θ˙w + 2rl θ˙b θ˙w cos(θb + α) + l 2 θ˙b2 + Ib θ˙b2 , 2 2

Vb =

  1 1 m w x˙w2 + y˙w2 + Iw θ˙w2 2 2 1 1 = m w r 2 θ˙w2 + Iw θ˙w2 . 2 2

Vw =

(2.5)

(2.6)

The gravitational potential energies of the body and wheel can be respectively computed as Ub = m b g (l cos θb + r θw sin α) ,

(2.7)

Uw = m w gr θw sin α.

(2.8)

2.3 Three-Dimensional Dynamic Model

15

The Lagrange function L is given by the following formula: L = Vb + Vw − Ub − Uw .

(2.9)

According to Lagrangian motion equation, the dynamic model of the MWIP system can be derived by following calculations: d dt d dt





∂L ∂ θ˙b

∂L ∂ θ˙w



 −

  ∂L = −τ − Db θ˙b − θ˙w , ∂θb

(2.10)

  ∂L = τ + Db θ˙b − θ˙w − Dw θ˙w . ∂θw

(2.11)



T  In this two-dimensional model, q2D = θw θb is used to denote the state vector. Then the dynamic model of the MWIP, computed results of (2.10)–(2.11), can be rewritten as: M (q2D ) q¨ 2D + N (q2D , q˙ 2D ) = E (q2D ) τ, where

M (q2D ) =

N (q2D , q˙ 2D ) =

(2.12)

m b lr cos (θb + α) , m b l 2 + Ib

(m b + m w ) r 2 + Iw m b lr cos (θb + α)

  Dw θ˙w − Db θ˙b − θ˙w − m b lr θ˙b2 sin (θb + α) + (m b + m w ) rg sin α ,   Db θ˙b − θ˙w − m b gl sin θb E (q2D ) =

1 −1

.

2.3 Three-Dimensional Dynamic Model Due to the complexity of the actual motion process, it is difficult to establish an accurate three-dimensional model of the MWIP system. The dynamic model can be simplified, as shown in Fig. 2.2. The weight of the car body is concentrated in point P, and the weight of the wheels is respectively concentrated in the center of the wheels. Taking the movement direction of MWIP system as x-axis, the wheel axis direction as y-axis, the vertical direction as z-axis, and the midpoint of the line between the two wheel centers as the coordinate origin, then the fixed inertial coordinate system O X 0 Y0 Z 0 can be established. Without considering the rollover of the MWIP system, there are two rotational degrees: the yaw motion around the O Z 0 axis at a yaw angle, represented as α, which forms the local coordinate system

16

2 Modeling of Mobile Wheeled Inverted Pendulums

Fig. 2.2 Three-dimensional simplified model of MWIP

O X 1 Y1 Z 1 ; the pitch motion around the OY0 axis at a pitch angle, denoted as θ , which forms the local coordinate system O X 2 Y2 Z 2 . Obviously, O Z 0 and O Z 1 are coaxial, and OY1 and OY2 are coaxial. During steering movement, the left and right wheels can rotate at different speeds. Accordingly, ψr and ψl are used to denote the rotation angles of right and left wheels, respectively. The coordinate system is established by O X 0 Y0 Z 0 , where point O is the origin of coordinate system. We first select the full state variable of three-dimensional T  MWIP system as q f = x0 y0 α θ ψr ψl . For the sake of readability, the following abbreviations are defined: Sθ = sin θ, Cθ = cos θ, Sα = sin α,

(2.13)

Cα = cos α. Similar to the two-dimensional model, the process of modeling the three dimensional MWIP system is divided into two parts: the body and the wheels. The kinetic energy, potential energy and dissipation energy are calculated respectively. Then the dynamic model of the whole system is established. The center of gravity of vehicle body in the coordinate system O X 0 Y0 Z 0 can  T be denoted as x = x1 y1 z 1 . The Lagrangian motion equation is also used to analyze the three-dimensional dynamic model of the system. The derivation process is as follows.

2.3 Three-Dimensional Dynamic Model

17

First, the position of body can be expressed as ⎧ ⎪ ⎨ x1 = x0 + l1 Sθ Cα y1 = y0 + l1 Sθ Sα . ⎪ ⎩ z 1 = l1 Cθ

(2.14)

Take the time derivative of (2.14), the speed of the body can be obtained as ⎧ ˙ ⎪ ⎨ x˙1 = x˙0 + l1 Cθ Cα θ − l1 Sθ Sα α˙ y˙1 = y˙0 + l1 Cθ Sα θ˙ + l1 Sθ Cα α˙ . ⎪ ⎩ z˙ 1 = −l1 Sθ θ˙

(2.15)

The translational kinetic energy of the system includes the translational kinetic energy of the vehicle body and the translational kinetic energy of the wheels, which can be expressed as T = Tb + Tw .

(2.16)

Then we can calculate the translational kinetic energies of the wheels and vehicle body respectively. Tw =

  1 1 m w vl2 + vr2 = m w ψ˙ l2 + rw ψ˙ r2 , 2 2

 1 1  Tb = m 1 x˙ T x˙ = m 1 x˙12 + y˙12 + z˙ 12 2 2  2 1  = m 1 x˙02 + y02 + l1 θ˙ + (l1 Sθ α) ˙ 2 + 2l1 Cθ Cα θ˙ x˙0 2 − 2l1 Sθ Sα α˙ x˙0 + 2l1 Cθ Sα θ˙ y˙0 + 2l 1 Sθ Cα α˙ y˙0 ) .

(2.17)

(2.18)

Before calculating the kinetic energy of rotation, we first introduce the moment of inertia. Iwa , Iwd are the moments of inertia of the wheel about the axle and diameter respectively. Ib is the inertia matrix of the MWIP body, which can be expressed as ⎡

⎤ Ix x Ix y Ix z Ib = ⎣ Ix y I yy I yz ⎦ . Ix z I yz Izz

(2.19)

Note that I yz is small enough to be ignored in the model. And due to the symmetry of the MWIP system, we can also suppose that Ix y = 0, Ix z = 0. Subsequently, the rotational kinetic energy of the system can be computed as the sum of the rotational kinetic energies of the wheels and body:

18

2 Modeling of Mobile Wheeled Inverted Pendulums

R = Rw + Rb , where Rw = Rb =

(2.20)

 1 Iwa ψ˙ r2 + Iwa ψ˙ l2 + Iwd θ˙ 2 , 2

 1 Ix x (sin (θ ) α) ˙ 2 . ˙ 2 + I yy θ˙ 2 + Izz (cos(θ )α) 2

The potential energy of the MWIP system can be calculated as U = m 1l1 g cos (θ ) .

(2.21)

The energy of the system will be dissipated due to frictions and other factors in the process of motion. Thus, the dissipated energy of the MWIP system can be calculated as D=

1 1 1 Dw ψ˙ r2 + Dw ψ˙ l2 + Db θ˙ 2 . 2 2 2

(2.22)

According to Lagrangian motion equation, the dynamic model of the MWIP system is represented by d dt



∂L ∂ q˙ f

 −

∂L ∂D + = E (qf ) τ + A (qf ) μ, ∂qf ∂ q˙ f

(2.23)

T T   where τ = τr τl is the control input. μ = μ1 μ2 μ3 is the Lagrange multiplier. A (qf ) is a non-holonomic constraint matrix, and it satisfies A (qf ) q˙ f = 0. Then, the dynamic equation of the MWIP is established by rewriting the calculation results of (2.23) M (qf ) q¨ f + N (qf , q˙ f ) = E (qf ) τ + A (qf ) μ,

(2.24)

with ⎡

m1 ⎢ 0 ⎢ ⎢ M13 M(qf ) = ⎢ ⎢ M14 ⎢ ⎣ 0 0 where

0 M13 M14 M23 M24 m1 M23 m 1 (l1 Sθ )2 + Ix x Sθ2 + Izz Cθ2 0 M24 0 m 1l12 + Iwd + I yy 0 0 0 0 0 0

0 0 0 0 M55 0

⎤ 0 0 ⎥ ⎥ 0 ⎥ ⎥, 0 ⎥ ⎥ 0 ⎦ M55

2.3 Three-Dimensional Dynamic Model

19

M13 = −m 1l1 Sθ Sα , M14 = m 1l1 Cθ Cα , M23 = m 1l1 Sθ Cα , M24 = m 1l1 Cθ Sα , M55 = m w rw2 + Iwa , And ⎤ −m 1l1 (Sθ Cα ) θ˙ 2 − 2m 1l1 (Cθ Sα ) α˙ θ˙ − m 1l1 Sθ Cα α˙ 2 ⎢ −m 1l1 Sθ Sα θ˙ 2 + 2m 1l1 Cθ Cα α˙ θ˙ − m 1l1 Sθ Sα α˙ 2 ⎥ ⎥ ⎢ ⎥ ⎢ 2 (m 1l1 + Ix x − Izz ) Cθ Sθ α˙ θ˙ ⎥, ⎢  N(qf , q˙ f ) = ⎢ 2 2 ⎥ ˙ S l − I + I C α ˙ + D l gS −m θ − m 1 1 xx zz θ θ 1 1 1 θ ⎥ ⎢ ⎦ ⎣ Dw ψ˙ r ˙ Dw ψl ⎡

E (qf ) =

0 0 0 −1 1 0 0 0 0 −1 0 1

T .

Assuming that there is no slippage between the wheels and ground, the constraint equations of the system can be obtained as sin (α) x˙ = cos (α) y˙ , cos (α) x˙ + sin (α) y˙ + bα˙ = rw ψ˙ r , cos (α) x˙ + sin (α) y˙ − bα˙ = rw ψ˙ l .

(2.25)

From the above equations, the coefficient matrix A (qf ) can be expressed as ⎤ −Sα Cα 0 0 0 0 A (qf ) = ⎣ Cα Sα b 0 −rw 0 ⎦ . Cα Sα −b 0 0 −rw ⎡

(2.26)

The zero space of A (qf ) can be calculated as ⎤T 0 0 01 0 0 S (qf ) = ⎣ Cα Sα 0 0 1/rw 1/rw ⎦ . 0 0 1 0 b/rw −b/rw ⎡

According to the motion constraints of the MWIP system, we can obtain

(2.27)

20

2 Modeling of Mobile Wheeled Inverted Pendulums

⎧ x˙ = cos (α) v ⎪ ⎪ ⎨ y˙ = sin (α) v . ˙ r ˙ ⎪ w ψr = v + bα ⎪ ⎩ ˙ rw ψl = v − bα˙

(2.28)

Vector qf depends on the zero space of A(qf ), satisfying q˙ f = S (qf ) q3D ,

(2.29)

 T where q3D = θ˙ v α˙ , and v is the linear velocity of the MWIP system. By multiplying both sides of (2.24) by ST , it follows that ST M (qf ) q¨ f + ST N (qf , q˙ f ) = ST Eτ .

(2.30)

Substituting (2.29) into (2.30), the dynamic model of the system can be finally expressed as   T ˙ 3D + N(qf , q˙ f ) = ST E (qf ) τ. S M (qf ) S q˙ 3D + ST (M (qf ) Sq

(2.31)

2.4 Dynamic Model with Uncertainties Based on (2.31), we further consider the external disturbances and model uncertainties. The dynamic model of the MWIP system can be described as   ⎧ m 11 ψ¨ + m 12 cos (θ ) θ¨ = m 12 sin (θ ) θ˙ 2 + α˙ 2 − 2Dw ψ˙ ⎪ ⎪ ⎪   ⎪ ⎪ ⎪ + 2Db θ˙ − ψ˙ + u r + u l + τext1 ⎪ ⎪ ⎪ ⎪ 2 ⎪ ⎨ m 12 cos (θ ) ψ¨ + m 22 θ¨ = Ibl sin (θ ) cos (θ ) α˙ +G b sin (θ )   , − 2Db θ˙ − ψ˙ − u r − u l + τext2 ⎪ ⎪  ⎪ ⎪ ⎪ Ibl sin2 (θ ) + m 33 α¨ = −2Ibl sin (θ ) cos (θ ) α˙ θ˙ − m 12 sin (θ ) α˙ ψ˙ ⎪ ⎪ ⎪ ⎪ ⎪ 2b2 b ⎪ ⎩ − 2 (Db + Dw ) α˙ + (u r − u l ) + τext3 r r where

(2.32)

2.4 Dynamic Model with Uncertainties

21

⎧ 1 ⎪ ⎪ ψ = (ψr + ψl ) ⎪ ⎪ 2 ⎪ ⎪ ⎪ ⎪ ⎪ m = (m b + 2m w ) r 2 + 2Iwa 11 ⎪ ⎪ ⎪ ⎪ ⎪ m = m b lr ⎪ ⎨ 12 m 22 = m b l 2 + Iby . ⎪ ⎪ 2 ⎪ ⎪ Ibl = Ibz + m b l ⎪ ⎪ ⎪ ⎪ ⎪ G b = m b gl ⎪ ⎪ ⎪ ⎪ 2   ⎪ ⎪ ⎩ m 33 = 2Iwd + 2b Iwa + m w r 2 2 r T  τext = τext1 τext2 τex3 represents the external disturbance. To simplify the notations, we rewrite (2.32) as vector form ˙ + O (q) ˙ = τ + τext , M (q) q¨ + N (q,q)

(2.33)

where q = [q1 q2 q3 ]T = [ψ θ α]T , ⎡

⎤ m 11 m 12 cos (q2 ) 0 ⎦, 0 m 22 M (q) = ⎣ m 12 cos (q2 ) 0 0 Ibl sin2 (q2 ) + m 33   ⎤ −m 12 sin (q2 ) q˙22 + q˙32 ⎦, −Ibl sin (q2 ) cos (q2 ) q˙32 − G b sin (q2 ) ˙ =⎣ N (q,q) 2Ibl sin (q2 ) cos (q2 ) q˙2 q˙3 + m 12 sin (q2 ) q˙1 q˙3 ⎡



⎤ 2Dw q˙1 − 2Db (q˙2 − q˙1 ) ⎢ ⎥ 2Db (q˙2 − q˙1 ) ˙ =⎣ O (q) ⎦, 2 2b + D q ˙ (D ) b w 3 r2 ⎡ ⎤ ur + ul ⎢ ⎥ τ = ⎣ −u r − u l ⎦ . b (u r − u l ) r Since the model identification process is always subject to noises and measurement errors, the disturbances and uncertainties could not be avoided. Therefore, in the ˙ O(q) ˙ as the bias parts to denote the model following, we use M(q), N(q,q), uncertainties. Finally, we lump the effect of all the disturbances and uncertainties, including bias parts of the model and external disturbances, into a single disturbance vector τd∗ . From (2.33) we have ˆ (q) q¨ + N ˆ (q,q) ˆ (q) ˙ +O ˙ = τ + τd∗ , M

(2.34)

22

2 Modeling of Mobile Wheeled Inverted Pendulums

where ⎧ ˆ (q) = M (q) − M (q) M ⎪ ⎪ ⎪ ⎪ ⎪ ˆ (q,q) ⎪ ˙ = N (q,q) ˙ − N (q,q) ˙ ⎪N ⎨ ˆ (q) ˙ = O (q) ˙ − O (q) ˙ O ⎪ ⎪   ⎪ T ∗ ∗ ∗ ⎪ ⎪ τd∗ = τd1 τd2 τd3 ⎪ ⎪ ⎩ ˙ − O (q) ˙ . = τext − M (q) q¨ − N (q,q)

(2.35)

And from (2.34) we can get ⎡



q¨1 ⎣ q¨2 ⎦ = F + G u A + τd , uB q¨3

(2.36)



⎤ ⎡ ⎤ f1 g1 0 F = ⎣ f 2 ⎦ , G = ⎣ g2 0 ⎦ , f3 0 g3

where

  ⎧ −1 ∗ ∗ ⎪ ⎨ τd1 = 1 mˆ 22 τd1 − mˆ 12 cos (q2 ) τd2  ∗ ∗ , mˆ 11 τd2 − mˆ 12 cos (q2 ) τd1 τd2 = −1 1 ⎪ ⎩ −1 ∗ τd3 = 2 τd3 ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨

   mˆ 12 mˆ 22 sin (q2 ) q˙22 + q˙32 − mˆ 12 Iˆbl sin (q2 ) cos2 (q2 ) q˙32 f 1 = −1 1    − mˆ 12 Gˆ b sin (q2 ) cos (q2 ) + 2 mˆ 22 + mˆ 12 cos (q2 ) Dˆ b (q˙2 − q˙1 ) − 2mˆ 22 Dˆ w q˙1   g1 = −1 mˆ 22 + mˆ 12 cos (q2 ) 1    f 2 = −1 mˆ 11 Iˆbl sin (q2 ) cos (q2 ) q˙32 + mˆ 11 Gˆ b sin (q2 ) − mˆ 212 sin (q2 ) cos (q2 ) q˙22 + q˙32 1    − 2 mˆ 11 + mˆ 12 cos (q2 ) Dˆ b (q˙2 − q˙1 ) +2mˆ 12 cos (q2 ) Dˆ w q˙1   g2 = −1 −mˆ 11 − mˆ 12 cos (q2 ) 1   .  ˆ2  ˆbl sin (q2 ) cos (q2 ) q˙2 q˙3 − mˆ 12 sin (q2 ) q˙1 q˙3 − 2b Dˆ b + Dˆ w q˙3 f 3 = −1 −2 I 2 rˆ 2

⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ g3 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ 1 ⎪ ⎪ ⎪ ⎪ 2 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ uA ⎪ ⎪ ⎩ uB

bˆ rˆ = mˆ 11 mˆ 22 − mˆ 212 cos2 (q2 ) = −1 2

= mˆ 33 + Iˆbl sin2 (q2 ) = ur + ul = ur − ul

2.5 Physical Design of the MWIP Robot

23

2.5 Physical Design of the MWIP Robot The mechanical system structure of an MWIP robot is shown in Fig. 2.3. The left and right sides of the robot are symmetrically distributed with coaxial wheels, which are connected to the output shaft of the gearbox. The gearbox regulates the speed of the motor to achieve large torque and stable speed. The control part of robot is mainly composed of the control circuit and peripheral components such as a gyroscope, an accelerometer, an angular displacement measuring component, servo actuators, and DC motors. The main control chip is LM3S2965, which is with Cortex-M3 core, rich development resources and peripherals. The battery voltage is 24 V. In order to meet the different voltage requirements of each module, a voltage-stabilizing circuit is necessary. The sensor system needs to obtain the states of the MWIP system, including tilt angle, tilt speed, travel displacement, travel speed, and other information. The motor driver module realizes the programmable control of the motor connected with the wheel. The wireless data transmission module is applied to receive the control instruction, and at the same time, it can send state information back to the host computer.

2.5.1 Sensing System of the MWIP The physical state information needed to be obtained for the balance, speed, and position control of the MWIP system, including the inclination angle, rotation angles of two wheels, the displacement of vehicle body, etc. These data can be measured by using different sensors, such as inertial angle measuring elements, encoders, and rotary potentiometers. In the following, we introduce several principal sensors.

Fig. 2.3 Diagram of mechanical structure

24

2 Modeling of Mobile Wheeled Inverted Pendulums

Fig. 2.4 Measurement results of accelerometer in different attitude

• Inertial Angle Measuring Element The prerequisite of realizing upright state of vehicle body is to get accurate attitude information. During the movement, the vehicle body attitude changes in two planes. One attitude change is in the sagittal plane, i.e. the vehicle body can perform swing and translation; the other is the rotation of the vehicle body in the horizontal plane. Gyroscopes and accelerometers are often used together to measure inclination of vehicle body in the sagittal plane. First, we introduce the accelerometer and its measurement method. Figure 2.4 shows a typical accelerometer entity and its measurement results at different postures. The method of measuring the inclination angle of accelerometer is to obtain the components of the gravity acceleration in different directions on the sensor coordinate axis, and then obtain the angle between the coordinate axis and the gravity acceleration in the vertical direction through the trigonometric function relationship. This angle can be used as the angle of inclination. As shown in Fig. 2.5, assuming that the acceleration measured on the X -axis of the accelerometer is ax , the inclination angle α can be calculated as 

ax α = arcsin g

 .

(2.37)

2.5 Physical Design of the MWIP Robot

25

Fig. 2.5 Principle of measuring tilt angle with accelerometer

To increase the sensitivity of measurements, the inclination angle is usually calculated using the two-axis measurement of an accelerometer. In other words, the projection of gravity acceleration g on the x-axis (ax ) and the projection on the y-axis (a y ) of the accelerometer are used together. Then, the gravity acceleration components on the two axes satisfy ax g × sin α = tan α. = ay g × cos α

(2.38)

Therefore, the inclination angle can be calculated as  α = arctan

ax ay

 .

(2.39)

However, it is difficult to get the accurate value of ax and a y in practice. On the one hand, the accuracy of the sensor is limited. On the other hand, the vibration of the robot body has a great influence on the accelerometer. During the movement of the vehicle, the acceleration generated by the movement of the vehicle itself will produce a large interference signal superimposed on the above measurement signal, so that the output signal cannot accurately reflect the inclination of the vehicle (in addition to the part of gravity acceleration, the accelerometer output may also include the acceleration of the vehicle’s own movement, making it difficult to distinguish which part is gravity acceleration). Another way to get the angle value is to integrate the gyroscope signal, as shown in the following equation. αk+1 = αk + α˙ ∗ t,

(2.40)

where αk and αk+1 are the angular values measured by gyroscopes at kth and (k + 1)th times respectively. α˙ ∗ is the measured angular velocity.

26

2 Modeling of Mobile Wheeled Inverted Pendulums

On the basis of the last acquired angle value of gyroscope, this sampling information is superimposed. Therefore, it is necessary to know the initial inclination of the robot first. Generally, the robot is powered on when the initial inclination angle is zero. Moreover, zero drift phenomenon often occurs on a gyroscope. The zero drift means that the output value of the gyroscope is not zero but a certain basic value even if it is stationary. And the zero drift is not a fixed value, but is related to environmental temperature and other factors. Due to the use of integration to obtain the robot’s inclination angle, there is accumulated error in the integration effect, and the error between the calculated value and the actual value will become larger and larger until the gyroscope cannot work effectively. To obtain satisfactory measurements, the common solution is to combine the respective advantages of accelerometer and gyroscope for complementary. Additionally, a Kalman filter is always applied to fuse the data obtained by these two components, to overcome the defects of using single type of sensor, and to get the accurate angle value. • Encoder The rotation angle of left and right wheel motors can be measured by encoders. An encoder consists of two parts, the code disk and the infrared transceiver module. The code disk is an opaque disk with a series of holes along the circumference, which is fixed with the motor shaft and rotates at the same time. One side of the code disk is the transmission of the infrared signal, while the other side receives the infrared signal. When the infrared light passes through the hole and is received by the other side, the pulse signal is generated in the output circuit. The number of pulses is accumulated according to the angle of wheel rotation. Based on the resolution of the encoder, it is capable of calculating the displacement corresponding to the number of pulses, which is equal to the displacement moved by the wheel, so the angle of rotation of the wheel can be accordingly obtained. In addition, the number of pulses measured per unit time is the angular velocity of rotation. Typically, the output pulse of the encoder has two phases, phase A and phase B. The direction of motor rotation can be obtained by comparing the leading and lagging of phase A or phase B. Figure 2.6 shows the HED-5540-C06 photoelectric encoder produced by Shenzhen Frant Technology Co., Ltd. It adopts the glass grating plating and soldering process. The maximum output pulse number per revolution can reach 30000. The frequency response standard state is 100kHz, and the maximum frequency response is 1MHz. And the input/output voltage range of the encoder is 5–28 V.

2.5.2 Servo Motor Control System of the MWIP The two wheels of the MWIP system are actuated by DC motors. The selection of motors must meet the requirements of power and torque. In this book, we introduce a qualified DC motor MAXON RE25, as shown in Fig. 2.7, whose detailed performance parameters are given in Table 2.1

2.5 Physical Design of the MWIP Robot

27

Fig. 2.6 HED-5540-C06 photoelectric encoder

Fig. 2.7 DC motor maxon RE25

Table 2.1 Performance parameters of the DC motor Rated power 20 W Rated voltage Rated speed Locked rotor torque Maximum efficiency

8330 r/min 243 Nm 85 %

No load speed Continuous torque Rotor inertia

24V 9560 r/min 26.3 Nm 10.8 gcm2

• DC Motor Driver Another indispensable module in servo motor control system is motor drive module. Here, we introduce a kind of motor driver module which is suitable for the DC motor mentioned above, as shown in Fig. 2.8. This driver is realized by MOS transistor and uses the gate circuit to control the motor’s forward, backward motion and brake. The PWM technique is used to realize speed regulation. This motor driver can be connected with 3.3 or 5 V single chip microcomputer at will. Optocoupler isolation is adopted to protect the control signal and prevent the interference of power supply peak voltage. The output current is large enough, which can easily control the operation and speed regulation of MAXON motor. At the same time, it has the function of power

28

2 Modeling of Mobile Wheeled Inverted Pendulums

Fig. 2.8 Motor drive module

supply under voltage protection. The parameters of the drive module are excellent, which allow this drive module to be sufficient to meet the requirements of DC motor in this book.

2.6 Conclusion In this chapter, a modeling analysis of the MWIP system is presented, including a detailed discussion of the kinematic and the dynamic models based on Lagrangian equations. This study of the MWIP can promote the development of control methods for such two-wheeled naturally unstable mobile robots. This chapter firstly builds the two-dimensional kinematic model of the system by analyzing the motion characteristics of the MWIP. Based on the separately derived kinetic energy, potential energy, and dissipative energy, the two-dimensional dynamics is obtained according to the Lagrangian motion equations. On the basis of the above two-dimensional model (only inclination and rotation angles are considered), the three-dimensional dynamics of the MWIP system can be obtained by additionally considering the yaw angle and using the non-holonomic constraints of the kinematics. Due to the unavoidable modeling errors and external disturbances, we derive the MWIP dynamics that lumps both model uncertainties and external disturbances, which serves as the controlled object for subsequent robust control.

2.6 Conclusion

29

This chapter follows up with a description of the control and sensing units in the physical MWIP system. The control part depicts the general scheme of the robot, while the sensing system presents the measurement of robot inclination, displacement and other information. At the same time, the robot motor and sensor selection are elaborately analyzed. Finally, an accurate and efficient robot system is constructed, which can provide a great convenience for readers to build their own MWIP systems.

Chapter 3

Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems

3.1 Introduction For the past several decades, disturbances or unknown input observation has been one of major issues in the control engineering. To deal with the system uncertainties, the sliding mode control (SMC) is a comparatively appropriate approach because it is robust to both parameter variations and external disturbances. Huang proposed a novel sliding controller in velocity-tracking control [1]. Xu et al. proposed an integral sliding-mode controller and firstly employed it for real-time control of a two-wheeled mobile robot platform [2]. Nevertheless, the main disadvantage of the SMC control method is the “chattering” phenomenon, which may cause damages to actuators in practical systems. On the other hand, the disturbance observer (DO) has become a popular and available technique in the robust control for nonlinear systems. The main idea of DO is to lump all the internal and external unknown factors of system model into a single disturbance term and then estimate this unknown term [3, 4]. The estimation of the disturbance can be used in feedforward compensation such that fast, excellent tracking performance can be achieved without the usage of large feedback gains. In the last four decades, the DO technique has made a great progress both in the theory and application fields. At present, the DO and related techniques provide a promising approach in dealing with the internal and external disturbances/uncertainties and have been applied to different kinds of mechanical and electrical systems, e.g., industrial robotic manipulators [5, 6], motion servo systems [7], power converters [8], ball and beam system [9], and nanopositioning stage [10], wheeled mobile robots [11, 12], pneumatic muscles [13]. The combination of neural control and DO can compensate the uncertainties led by neural network (NN) approximation [14, 15]. DO is also developed to provide efficient learning of time-varying disturbance and fuzzy approximation for synthesizing an adaptive fuzzy controller [16]. Furthermore, the combination of SMC and DO facilitates to reduce the “chattering” phenomenon of the SMC method [17–19].

© Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_3

31

32

3 Disturbance Observer-Based Sliding Mode Control …

Based on the abovementioned DO technologies, the extended disturbance observers (EDO) or high-order disturbance observers (HODO) are proposed to tackle more general systems with complex disturbances [20]. Although an EDO or HODO is capable of dealing with systems of higher orders with more complex disturbances, to the best of our knowledge, there are few results of applying them in the underactuated MWIP systems. The main difficulty lies in the fact that the underactuated system cannot be described by the standard cascade dynamic model, which is widely used in the fully actuated system modeling [21]. Consequently, the commonly used DOmodel structure in which only state variables are involved cannot be easily extended to the case of MWIP systems. In this chapter, a variety of disturbance observers with different orders are designed for underactuated MWIP system. As for high-order disturbance observer (HODO), the estimation accuracy can be improved based on a choice method of optimal gain matrices. Furthermore, combining the proposed HODO and SMC, a new control strategy is designed for the balance and speed control of the MWIP system. The boundness of the estimation error of DOs with different order is all proved, and the stability of the closed-loop control system is achieved through the appropriate selection of sliding surface coefficients. The effectiveness of all proposed methods is verified by simulations at the end of this chapter.

3.2 First-Order Disturbance Observer In this section, we start from the design of the first-order disturbance observer. The first-order disturbance observer is simple in structure, easy to implement, and does not cause heavy computational burden. The design of all disturbance observers in this chapter is based on the MWIP system with model uncertainties and external disturbances, which is described as (2.36). Before the design of first-order disturbance observer, we give the following assumption of the lumped disturbance. Assumption 3.1 The disturbances τd1 , τd2 , τd3 in (2.36) are continuous and satisfy ||τ˙d || ≤ μ1 ,

(3.1)

where μ1 is an unknown positive constant. We define an auxiliary variable vector p to design the first-order nonlinear disturbance observer, as shown by ⎧ ⎨ τˆ d = p + Lq˙ ⎩ p˙ = −L(F + G



 uA , + τˆ d ) uB

(3.2)

3.3 Second-Order Disturbance Observer

33

where τˆ d is the estimation of disturbance τ d . L is constant gain matrix. Therefore, the derivative of τˆ d is τ˙ˆ d = p˙ + Lq¨



= −L(F + G







(3.3)

u uA + τˆ d ) + L(F + G A + τ d ) uB uB

= L(τ d − τˆ d ) = Lτ˜ d , where τ˜ d = τ d − τˆ d . Subtracting τ˙ d from both side of (3.3), we have τ˙˜ d = τ˙ d − τ˜ d with τ˙˜ d = τ˙ d − τ˙ˆ d . Define a Lyapunov function Vτd (τ˜ d ) =

1 T τ˜ τ˜ d , 2 d

(3.4)

and differentiate both sides of (3.4), then we get V˙τ d (τ˜ d ) = τ˜ d τ˙˜ d = τ˜ Td (τ˙ d − Lτ˜ d ) ≤ μ1 ||τ˜ d | | − λmin (L)||τ˜ 2d || = − ||τ˜ d | |(λmin (L) ||τ˜ d | | − μ1 ).

(3.5)

Therefore, the estimation error is bounded by ||τ˜ d | | ≤ ε˜ ,

(3.6)

where ε˜ = μ1 /λmin (L).

3.3 Second-Order Disturbance Observer In this section, we raise the order of the disturbance observer to the second-order, in order to obtain a more accurate disturbance estimation. Also, we first give the following assumptions. Assumption 3.2 The disturbances τ d are continuous, and its first-order derivative τ˙ d and second-order derivative τ¨ d exist. Assumption 3.3 τ¨ d is bounded and satisfies τ˙ d  ≤ μ2 . Here μ2 is an unknown positive constant.

34

3 Disturbance Observer-Based Sliding Mode Control …

The second-order disturbance observer for the underactuated MWIP system (2.36) is designed as τˆ d = z1 + p1 (q),   z˙ 1 = −L1 F + G τˆ˙ d = z2 + p2 (q),   z˙ 2 = −L2 F + G

uA



+ τˆ d + τˆ˙ d ,

uB



(3.7)

uA + τˆ d , uB

where τˆ d and τˆ˙ d are the estimates of τ d and τ˙ d , respectively. The disturbance observer constant gain matrix Li (i = 1, 2) is defined as Li = ∂pi (q)/∂q, i = 1, 2,

(3.8)

 k2i−1,1 k2i−1,2 k2i−1,3 k2i−1,4 . Li = k2i,1 k2i,2 k2i,3 k2i,4

(3.9)

where 

Theorem 3.1 Considering the underactuated system (2.36), assume that the disturbance τ d and its first-order derivative τ˙ d exist, and its second-order derivative can be negligible (i.e.,τ¨ d ). Choosing proper Li satisfying that A1 is negative definite, the disturbance observer given in (3.7) with the auxiliary matrix Li defined in (3.8)–(3.9) ensures that the disturbance tracking error converges exponentially to zero. Otherwise, if the disturbance τ d and its second-order derivative τ˙ d exist and its second-order derivative τ¨ d is bounded, choosing proper Li satisfying that A1 is negative definite, the disturbance observer described in (3.7) ensures that the tracking error is globally uniformly ultimately bounded. Here



 −L1 I A1 = , −L2 0

where I is a 2 × 2 identity matrix. 0 is a 2 × 2 zero matrix. Proof Let the estimation errors to be defined as τ˜ d = τ d − τˆ d , τ˜˙ d = τ˙ d − τˆ˙ d ,

(3.10)

where τ˜ d is the estimation error between τ d and τˆ d , and τ˜˙ d is the estimation error between τ˙ d and τˆ˙ d .

3.3 Second-Order Disturbance Observer

35

Differentiating the first equation of (3.10), we can get: τ˙˜ d = τ˙ d − τ˙ˆ d



= τ˙ d + L1





uA F+G + τ d − τˆ˙ d − p˙ 1 uB

(3.11)

= τ˙ d − L1 τ˜ d − τˆ˙ d = τ˙˜ d − L1 τ˜ d Using the second equation of (3.10), we have: τ˙˜˙ d = τ¨ d − τ˙ˆ˙ d



= τ¨ d + L2 F + G



uA



uB

+ τ d − L2 q˙

(3.12)

= τ¨ d − L2 τ˜ d T According to (3.11) and (3.12), the error vector D1 = τ˜ d τ˜˙ d can be expressed as D˙1 = A1 D1 + B1 τ¨ d ,

(3.13)

T where B1 = 01 I1 . 01 is a 2 × 2 zero matrix. I1 is a 2 × 2 identity matrix. Since A1 is a negative definite matrix, the eigenvalues of A1 are negative. There exists a positive defined matrix Q1 satisfying A1 T P1 + P1 A1 T = −Q1 . Choose the following Lyapunov function V1 = D1 T P1 D1 ,

(3.14)

where P1 is a positive defined matrix. By differentiating V1 , we have

 V˙1 = D1 T A1 T P1 + P1 A1 T D1 + 2D1 T P1 B1 τ¨ d = −D1 T Q1 D1 + 2D1 T P1 B1 τ¨ d   ≤ −λ1 min D1 2 + 2 D1 T P1 B1  · μ2

(3.15)

where λ1 min is the minimum eigenvalue of Q1 . Further, we rewrite the result of (3.15) into a clearer form: V˙1 ≤ − D1  (λ1 min D1  − 2 P1 B1  · μ2 ) .

(3.16)

36

3 Disturbance Observer-Based Sliding Mode Control …

This indicates that, after a sufficiently long time, the norm of the estimation error is bounded by D1  ≤

2 P1 B1  · μ2 . λ1 min

(3.17)

Thus, if the disturbance τ d and its first-order derivative τ˙ d exist, and its secondorder derivative satisfies τ¨ d = 0, the disturbance tracking error converges exponentially to zero. If the disturbance τ d and its first-order derivative τ˙ d exist, and its second-order derivative τ¨ d is bounded, the tracking error is globally uniformly ultimately bounded.

3.4 High-Order Disturbance Observer Based on the above two sections, we further increase the order of the disturbance observer. At the same time, the accompanying problem is that the dimension of gain matrix expands with the increase of the order of the disturbance observer. Therefore, the choice method of the gain matrix becomes a critical issue, which is reduced to an optimization problem that can be solved by the Linear Matrix Inequality (LMI) toolbox. Similar to the previous two sections, we give the following assumption of the lumped disturbances. Assumption 3.4 The disturbances τd1 , τd2 , τd3 are n-times differentiable and satisfy w ≤ μ,

(3.18)

where μ is a positive number, and  w=

dn τd1 dn τd2 dn τd3 dt n dt n dt n

T .

(3.19)

Remark 3.1 To the best of our knowledge, almost all the current literatures on nonlinear disturbance observer (NDO) only consider the continuous disturbance. The discontinuous disturbance is out of the scope of most current model-based NDO methodology. In early works [21], the NDO is based on the strict assumption that the disturbance is bounded and its first derivative dies away gradually or even equals to zero. In the case of HODO, this assumption is relaxed to Assumption 3.4. There are many practical systems satisfying the new assumption. For example, the disturbance torque of the spacecraft model proposed in [22] existed due to onboard components, gravity gradients, solar pressure, atmospheric drag, or the ambient magnetic field. This disturbance is a linear combination of constant and harmonic signals for which the frequencies are known but for which the amplitudes and phases are unknown. It is obvious that Assumption 3.4 holds in this case.

3.4 High-Order Disturbance Observer

37

An n-th order DO for system (2.36) is proposed and given by ⎡ ⎤ ⎡ ⎤ (i−1) ⎤ τˆd1 p1i q˙1 (i−1) ⎦ = ⎣ p2i ⎦ + Li ⎣ q˙2 ⎦ , ⎣ τˆ d2 (i−1) p3i q˙3 τˆd3

(3.20)

⎤ ⎡ (i) ⎤     τˆd1 p˙ 1i u ⎣ p˙ 2i ⎦ = −Li F + G A + τˆ d + ⎣ τˆ (i) ⎦ , d2 uB (i) p˙ 3i τˆd3 i = 1, 2, . . . , n − 1,

(3.21)

⎡ ⎤ ⎡ ⎤ (n−1) ⎤ τˆd1 p1n q˙1 ⎣ τˆ (n−1) ⎦ = ⎣ p2n ⎦ + Ln ⎣ q˙2 ⎦ , d2 (n−1) p3n q˙3 τˆd3

(3.22)

⎤     p˙ 1n ⎣ p˙ 2n ⎦ = −Ln F + G u A + τˆ d , uB p˙ 3n

(3.23)





and







⎞ l1i1 l1i2 l1i3 Li = ⎝ l2i1 l2i2 l2i3 ⎠ ; i = 1, 2, ..., n l3i1 l3i2 l3i3

where

(3.24)

are estimates of τd(i−1) , and p ji are auxiliary are user chosen constant matrices. τˆd(i−1) j j variables (i = 1, 2, ..., n; j = 1, 2, 3). Let us define the estimation errors as T  (n−1) (n−1) (n−1) , e = τ˜d1 τ˜d2 τ˜d3 · · · τ˜˙ d1 τ˜˙ d2 τ˜˙ d3

(3.25)

τ˜d(i−1) = τd(i−1) − τˆd(i−1) ; i = 1, 2, ..., n; j = 1, 2, 3, j j j

(3.26)

denote the errors in the estimation of τd(i−1) , respectively. From (2.36), where τ˜d(i−1) j j (3.20) and (3.21), we have ⎤ ⎡ ⎤ ⎡ (i) ⎤ (i−1) τˆ˙d1 τˆd1 τ˜d1 ⎢ (i−1) ⎥ ⎢ (i) ⎥ ⎢ ⎥ ⎥ ⎥ ⎢ τ˙ˆ ⎢ ⎣ d2 ⎦ = L i ⎣ τ˜d2 ⎦ + ⎣ τˆd2 ⎦ ; i = 1, 2, ..., n − 1. (i−1) (i) τ˜d3 τˆd3 τ˙ˆd3 ⎡

(i) (i) (i) T Subtracting both sides of (3.27) by τd1 , it follows that τd2 τd3

(3.27)

38

3 Disturbance Observer-Based Sliding Mode Control …

⎤ ⎡ ⎤ ⎡ (i) ⎤ ⎡ (i) ⎤ (i−1) τd1 τ˙˜d1 τˆd1 τ˜d1 ⎢ (i) ⎥ ⎢ (i) ⎥ ⎢ (i−1) ⎥ ⎢ ⎥ ⎢ ⎢ τ˜˙ ⎥ ⎥ ⎢ ⎥ ⎣ d2 ⎦ = −L i ⎣ τ˜d2 ⎦ + ⎣ τd2 ⎦ − ⎣ τˆd2 ⎦ (i−1) (i) (i) τ˜d3 τd3 τˆd3 τ˙˜d3 ⎤ ⎡ ⎡ ⎤ (i) τ˜d1 τ˜d1 ⎥ ⎢ ⎢ ⎥ (i) ⎥ = −L i ⎣ τ˜d2 ⎦ + ⎢ ⎣ τ˜d2 ⎦ ; i = 1, 2, ..., n − 1. (i) τ˜d3 τ˜d3 ⎡

(3.28)

Also, from (3.22) and (3.23) we have ⎡

⎤ ⎡ ⎤ ⎡ (n) ⎤ (n−1) τ˙˜d1 τd1 τ˜d1 ⎢ (n−1) ⎥ ⎥ ⎥ ⎢ (n) ⎢ τ˙˜ ⎥ = −L n ⎢ ⎢ ⎣ τ˜d2 ⎦ + ⎣ τd2 ⎥ ⎣ d2 ⎦ ⎦. (n−1) (n) τ ˜ d3 τd3 τ˙˜d3

(3.29)

Differentiating (3.28) and using (3.29) we can get ⎤ ⎡ (n−i) ⎤ ⎡ n ⎤ d τ˜d1 d n τ˜d1 d τd1 ⎢ dt n ⎥ ⎢ dt (n−i) ⎥ ⎢ dt n ⎥ ⎢ n ⎥ ⎢ ⎥ ⎢ ⎥ n  ⎢ d τ˜d2 ⎥ ⎢ d (n−i) τ˜d2 ⎥ ⎢ d n τd2 ⎥ ⎢ ⎢ ⎥=− ⎢ ⎥ ⎥. +⎢ Li ⎢ ⎢ dt n ⎥ n ⎥ (n−i) ⎥ dt dt ⎢ ⎢ ⎥ ⎢ ⎥ ⎥ i=1 ⎣ d n τ˜ ⎦ ⎣ (n−i) ⎦ ⎣ d n τd3 ⎦ d3 d τ˜d3 dt n dt n dt (n−i) ⎡

(3.30)

From assumption (3.18) it is known that w is bounded. The HODO error dynamics can be described as follows: e˙ = Dn e + Ew, ⎛

−L1 I3 0 ⎜ −L2 0 I3 ⎜ ⎜ .. .. Dn = ⎜ ... . . ⎜ ⎝ −Ln−1 0 0 −Ln 0 0

⎡ ⎤ ⎞ 0 0 ⎢0⎥ 0⎟ ⎢ ⎥ ⎟ .. ⎟ , E = ⎢ .. ⎥ , ⎢ . ⎥ . ⎟ ⎢ ⎥ ⎟ ⎣0⎦ · · · I3 ⎠ I3 ··· 0

··· ··· .. .

(3.31)

(3.32)

where I3 ∈ R3×3 is the identity matrix. From (3.31) and (3.32), obviously it is always possible to select Li (i = 1, 2, ..., n) such that the eigenvalues of Dn can be placed arbitrarily. In this study, Li are chosen in such a way that the real part of the eigenvalues of Dn is negative. Therefore, for the underactuated system (2.36) and the proposed HODO (3.20)–(3.23), the norm of the estimation error e is ultimately bounded by appropriate choice of parameters Li . Hence, it follows that

3.4 High-Order Disturbance Observer

39

 T    ||e|| ≤  d¯1 d¯2 d¯3 · · · d¯1n−1 d¯2n−1 d¯3n−1  ,

(3.33)

where d¯ j , d¯i−1 j (i = 1, 2, · · · , n; j = 1, 2, 3) are positive constant bounds on disturbance terms τd j and its (i − 1) − th order derivative. For the n-th order DO, to improve the robustness of the error system (3.31) to the disturbance w, we should minimize the gain: size (e) , w=0 size (w)

 = sup

(3.34)

by choosing appropriate gain matrices Li (i = 1, 2, ..., n). In order to evaluate the system’s robustness to disturbance, in this chapter, we choose the impulse-to-energy gain ie for analysis: ie =

sup

w(t) = w0 δ(t) w0 ≤1

e ,

(3.35)

where δ (t) is a delta function. The result of an optimal choice of gain matrices is given as follows. Theorem 3.2 For the underactuated mechanical system (2.36), the proposed HODO (3.20)–(3.23), and the error dynamic system (3.31), if the following optimization problem ⎧ min α ⎪ ⎪ s.t. ⎪ ⎪ ⎪ ⎨ PA + AT P + WB + BT WT + I

3n

0 T

(3.36)

√ has solution α ∗ , P∗ , W∗ , then min ie = α ∗ . More specifically, the optimal gain T matrices Li (i = 1, 2, ..., n) can be obtained by X = −L1 −L2 · · · −Ln−1 −Ln = P∗−1 W∗ , where P ∈ R 3n×3n , W ∈ R 3n×3 are matrix variables, and A ∈ R 3n×3n , B ∈ R 3×3n are constant matrices given by ⎡

0 ⎢0 ⎢ ⎢ A = ⎢ ... ⎢ ⎣0 0

⎡ ⎤T ⎤ I3 0 ⎢0⎥ 0⎥ ⎢ ⎥ ⎥ .. ⎥ , B = ⎢ .. ⎥ . ⎢ . ⎥ . ⎥ ⎢ ⎥ ⎥ ⎣0⎦ 0 0 · · · I3 ⎦ 0 0 ··· 0 0

I3 0 .. .

0 I3 .. .

··· ··· .. .

(3.37)

Proof In the case of zero initial condition, the solution of the error dynamical system (3.31) is e = exp (Dn t) Ew0 , where w (t) = w0 δ (t). Then the L 2 norm of e is

40

3 Disturbance Observer-Based Sliding Mode Control …

"∞ e22

=

 w0T ET exp DTn t exp (Dn t) Ew0 dt

(3.38)

0

= w0T ET YEw0 , #∞

 where Y = 0 exp DTn t exp (Dn t) dt. If Dn is a Hurwitz matrix, there exists a symmetric positive matrix Y that satisfies the following Lyapunov matrix equation YDn + DTn Y + I3n = 0.

(3.39)

And for arbitrary w0 with constraint w0  < 1, it follows that   e22 < ||ET YE||w0T w0 ≤ ET YE .

(3.40)

 1/2 ie ≤ ET YE .

(3.41)

Therefore, we have

Moreover, if w0 is a unit eigenvector of the maximum eigenvalue of ET YE, then   2 ≥ w0T ET YEw0 = ET YE . ie

(3.42)

 1/2 From (3.41) and (3.42), it follows that ie = ET YE . We can also obtain ie by using following matrix inequality $ % ie = inf ||ET PE||1/2 : PDn + DTn P + I3n < 0 . P

(3.43)

Subtracting the Lyapunov matrix equation (3.39) by the Lyapunov matrix inequality in (3.43), we have UDn + DTn U < 0,

(3.44)

where U = P − Y. Because Dn is a Hurwitz matrix, we know thatP > Y≥ 0. There1/2 fore, for arbitrary matrix P satisfying (3.43), inequality ie ≤ ET PE is satisfied. Then from (3.44) it is obvious that for arbitrary ε > 0 and solution matrix Y of (3.39), there exists a matrix P that satisfies the LMI of (3.43) and P − Y ≤ ε. Therefore, the minimization problem of ie by appropriate choice of gain matrix Li (i = 1, 2, ..., n) can be converted to following optimization problem: ⎧ min α ⎪ ⎪ s.t. ⎪ ⎪ ⎪ ⎨ PD + DT P + I n

n

⎪ ⎪ ET PE ≤ αI3 , ⎪ ⎪ ⎪ ⎩ P = PT > 0.

3n

< 0,

(3.45)

3.5 High-Order Disturbance Observer-Based Sliding Mode …

41

Note that matrix inequalities in (3.45) contain some nonlinear terms such as PDn and DTn P. Thus we need some manipulations in order to solve this optimization problem by using LMI toolbox. The matrix Dn can be described by Dn = A + XB.

(3.46)

Then, from (3.46) and the first matrix inequality of (3.45) it follows that PDn + DTn P + I3n 

=P (A + XB) + AT + BT XT P + I3n

(3.47)

=PA + A P + PXB + B X P + I3n < 0. T

T

T

From (3.47) and the vector value definition by W = PX, we can obtain PA + AT P + WB + BT WT + I3n < 0.

(3.48)

This completes the proof. Note that the optimization problem (3.36) can be easily solved by using LMI Toolbox in MATLAB software.

3.5 High-Order Disturbance Observer-Based Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems In this section, an HODO-based Sliding Mode Control (HODOSMC) method is proposed that can both robustly stabilize the underactuated MWIP system and reduce the chattering phenomenon. And the constructed novel sliding surface can deal with the SMC design difficulty caused by the uncertain equilibrium and inherent dynamics of underactuated MWIP system. Then, the stability analysis is discussed for both the proposed HODOSMC approach. Simulation results are presented to demonstrate the effectiveness of the proposed methods at the end of this chapter. We now present the HODOSMC for the MWIP system. For the dynamic system (2.36), let us choose the sliding surface as  S=

S1 S2



 =

q˙2 + λ1 q2 +λ2 (q1 − q˙1d t) + λ3 (q˙1 − q˙1d ) q˙3 + λ4 (q3 − q3d )

(3.49)

where λi (i = 1, 2, 3, 4) are positive constant numbers. q2d , q˙1d , and q3d are the values of the desired equilibrium state. The following theorem gives the main stability results of the closed-loop MWIP system controlled by the HODOSMC.

42

3 Disturbance Observer-Based Sliding Mode Control …

Theorem 3.3 Using the n-th order DO (3.20)–(3.23), the closed-loop system (2.34) of the MWIP is locally stable around an equilibrium if the following control law is assumed: ⎧ 1 ⎪ ⎪ uA = [− f 2 − λ3 f 1 − λ1 q˙2 − τˆd2 − λ2 (q˙1 − q˙1d ) ⎪ ⎪ g2 + λ3 g1 ⎪ ⎨ − λ3 τˆd1 − K 1 sgn(S1 ) (3.50) ⎪ ⎪ ⎪ 1 ⎪ ⎪ [− f 3 − λ4 q˙3 − τˆd3 − K 2 sgn(S2 ) ⎩ uB = g3 where &

K 1 = d¯2 + λ3 d¯1 + γ1 K 2 = d¯3 + γ2 .

(3.51)

γ1 and γ2 are positive constants which may be chosen to be small enough, and the coefficients λ1 , λ2 , λ3 satisfy the following inequalities &

λ1 λ3 − λ2 > 0, z 1 − λ3 z 2 > 0 λ2 z 2 − λ1 z 1 < 0, λ2 λ3 z 2 − λ2 z 1 < 0,

(3.52)

where z 1 = mˆ 11 + mˆ 12 cos (q2 ) , z 2 = mˆ 22 + mˆ 12 cos (q2 ).

 Proof Choose a Lyapunov function V = 21 S12 + S22 . Then we have V˙ = S1 S˙1 + S2 S˙2 .

(3.53)

From (2.36) and (3.49) it follows that S˙1 = q¨2 + λ1 q˙2 + λ2 (q˙1 − q˙1d ) + λ3 q¨1 = f 2 + τd2 + λ1 q˙2 + λ2 (q˙1 − q˙1d ) + λ3 f 1 + λ3 τd1 + (g2 + λ3 g1 )u A , S˙2 = q¨3 + λ4 q˙3 = f 3 + g3 u B + τd3 + λ4 q˙3 ,

(3.54)

(3.55)

Combining (3.54) and (3.55), we can obtain V˙ = S1 ( f 2 + τd2 + λ1 q˙2 + λ2 (q˙1 − q˙1d ) + λ3 f 1 + λ3 τd1 + (g2 + λ3 g1 )u A ) + S2 ( f 3 + g3 u B + τd3 + λ4 q˙3 ) .

(3.56)

3.5 High-Order Disturbance Observer-Based Sliding Mode …

43

Substituting (3.50)–(3.51) into (3.56), it follows that V˙ =S1 τ˜d2 + λ3 τ˜d1 − K 1 sgn (S1 ) + S2 τ˜d3 − K 2 sgn (S2 )

 = (τ˜d2 + λ3 τ˜d1 ) S1 − d¯2 + λ3 d¯1 |S1 | − γ1 |S1 |

(3.57)

+ τ˜d3 S2 − d¯3 |S2 | − γ2 |S2 | ≤ − γ1 |S1 | − γ2 |S2 | ≤ 0. From (3.53) we can know that the achievement of the sliding motion can be guaranteed by the control law, and the state variable q3 can converge to q3d . Then, it is important to choose appropriate coefficients λ1 , λ2 , and λ3 for the stability of q˙1 and q2 during the sliding phase. From (2.34) and (3.49) we can get ∗ ∗ + τd2 , z 1 q¨1 + z 2 q¨2 = mˆ 12 sin (q2 ) q˙22 + Gˆ b sin (q2 ) + τd1

(3.58)

q¨2 + λ1 q˙2 + λ2 (q˙1 − q˙1d ) + λ3 q¨1 = 0.

(3.59)

In the case of a velocity-control problem, the desired velocity is given as ψ˙ ∗ . ˙ θ˙ , ψ, ¨ θ¨ ] = [q2∗ , q˙1∗ , 0, 0, 0]. From Then the equilibrium point can be written as [θ, ψ, (3.58) and the dynamic model (2.34), we can obtain: ∗ ∗ − τd2 . Gˆ b sin(q2∗ ) = −τd1

(3.60)

Equation (3.60) clearly shows that when the desired velocity is given, q2∗ is related ∗ ∗ and τd2 which lump model uncertainties and external disturbances. to τd1 We introduce a new state vector x = [x1 , x2 , x3 ]T = [q2 , q˙2 , q˙1 − q˙1d ]T .

(3.61)

Equations (3.58) and (3.59) are then described as follows x˙ = Π (x)

(3.62)

where ⎤ Π1 (x) ⎥ ⎢ Π (x) = ⎣ Π2 (x)⎦ , Π1 (x) = x2 , Π3 (x) ⎡

(3.63)

44

3 Disturbance Observer-Based Sliding Mode Control …

Fig. 3.1 Block diagram of the MWIP system with HODOSMC

λ3 z 1 − z 2 λ3 2 × (mˆ 12 sin (x1 ) x2 + Gˆ b sin (x1 )

Π2 (x) = −λ1 x2 − λ2 x3 −

∗ ∗ + τd2 + λ1 z 2 x2 + λ2 z 2 x3 ), + τd1 1 Π3 (x) = × (mˆ 12 sin (x1 ) x22 + Gˆ b sin (x1 ) z 1 − z 2 λ3 ∗ ∗ + τd1 + τd2 + λ1 z 2 x2 + λ2 z 2 x3 ).

It is obvious that system (3.58)–(3.59) and (3.62) are equivalent in the view of T T stability. The equilibrium of (3.62) is denoted by x∗ = x1∗ x2∗ x3∗ = q2∗ 0 0 . We linearize (3.62) around the equilibrium x∗ to establish the linear stability criteria that guarantees local exponential stability of the nonlinear system. The linearized system is described by x˙ = A · (x − x∗ ),

(3.64)

3.6 Simulation Studies

45

where ⎛ ⎞ 0 1 0 ∂Π A= |x∗ = ⎝ Θ1 Θ2 Θ3 ⎠ . ∂x Θ4 Θ5 Θ6

(3.65)

According to the Hurwitz stability criteria, the equilibrium of the linearized system (3.64) is asymptotically stable, if we have Θ2 + Θ6 < 0, Θ3 Θ4 − Θ1 Θ6 < 0, (Θ2 + Θ6 )(Θ3 Θ5 − Θ2 Θ6 ) + Θ1 Θ2 +Θ3 Θ4 > 0.

(3.66)

From (3.65), we can get Θ2 + Θ6 = Λ(λ2 z 2 − λ1 z 1 ), ˆ b cos(x1∗ ) + λ2 λ3 z 2 G ˆ b cos(x1∗ )), Θ3 Θ4 − Θ1 Θ6 = Λ2 (−λ2 z 1 G (Θ2 + Θ6 )(Θ3 Θ5 − Θ2 Θ6 ) + Θ1 Θ2 − Θ3 Θ4 = Λ2 (−λ2 z 1 Gˆ b cos(x1∗ ) + λ1 λ3 z 1 Gˆ b cos(x1∗ )), where Λ =

1 . z 1 −z 2 λ3

Because Gˆ b > 0, mˆ 11 > 0, mˆ 12 > 0, mˆ 22 > 0 and 0 ≤ θ < π2 , 0 < cos (θ ) ≤ 1, it follows that z 1 > 0, z 2 > 0. If λ1 , λ2 , λ3 satisfy (3.52), then the inequality (3.66) holds. This completes the proof. The whole HODOSMC control block diagram is shown in Fig. 3.1.

3.6 Simulation Studies 3.6.1 Disturbance Observers In this section, all the disturbance observers designed in this chapter are employed on the MWIP system in the simulation to verify the capacity of disturbance estimation. The real parameters of the MWIP system are given in Table 3.1. And the estimated parameters of the MWIP system are shown in Table 3.2. It is worth mentioning that the establishment of the dynamic model of the MWIP system is on the basis of Table 3.1. However, the parameters in Table 3.2 is used for the controller design.

46

3 Disturbance Observer-Based Sliding Mode Control …

Table 3.1 Real parameters of the MWIP system Parameter Value Parameter mb Iby Ibz Iwa Iwd Dw

2.58 [ Kg] 1.77 · 10−3 [Kg · m2 ] 1.77 · 10−3 [Kg · m2 ] 1.4 · 10−4 [Kg · m2 ] 8.4 · 10−4 [Kg · m2 ] 0.8 [N · s/m]

mw l b r Db

Table 3.2 Parameter estimates of the MWIP system Parameter Value Parameter mb Iby Ibz Iwa Iwd Dw

2.50 [Kg] 1.57 · 10−3 [Kg · m2 ] 1.57 · 10−3 [Kg · m2 ] 1.2 · 10−4 [Kg · m2 ] 8.1 · 10−4 [Kg · m2 ] 0.6 [N · s/m]

mw l b r Db

Value 0.14[Kg] 0.0622 [m] 0.15 [m] 0.04 [m] 0.5 [N · s/m]

Value 0.12 [Kg] 0.0582 [m] 0.14 [m] 0.03 [m] 0.4 [N · s/m]

The initial conditions of the MWIP are chosen as: ⎧ ⎪ ⎨ q1 (0) = 0, q˙1 (0) = 0 q2 (0) = π/18 (rad) , q˙2 (0) = 0 ⎪ ⎩ q3 (0) = 0, q˙3 (0) = 0 The optimal value of ie by solving (3.35) of the Theorem 3.2 is 1.8820 × 10−6 for the fourth-order DO. However, the sizes of corresponding parameter matrices are too large and given by Li = v4i I3 ; (i = 1, 2, 3, 4) , v41 = 47.1084, v42 = 1960.1, v43 = 36256.0, v44 = 393980.0. In practical problems, these too large matrix gains are not available and will increase the sensitivity of the HODO to noise. Thus, let us choose an appropriate value of ie in order to compromise between the accuracy of estimation and the noise amplification of the HODO. In this book, we have selected the value of ie as 0.3. The parameters of second-order, third-order, and fourth-order disturbance observers for given value of ie = 0.3 by solving (3.35) are as follows: For the second-order disturbance observer: Li = v2i I3 ; (i = 1, 2), v21 = 7.5213, v22 = 9755.8.

3.6 Simulation Studies

47

For the third-order disturbance observer: Li = v3i I3 ; (i = 1, 2, 3) , v31 = 6.1211, v32 = 423.8938, v33 = 1078.3. For the fourth-order disturbance observer: Li = v4i I3 ; (i = 1, 2, 3, 4) , v41 = 22.9778, v42 = 357.2853, v43 = 1831.5, v44 = 5737.7. It is noted that the second-order and third-order disturbance observers are used for comparing the estimation performance of disturbance observer with the fourth-order one. In this book, the following disturbances are considered: ⎧ ∗ ⎪ ⎨ τd1 = 0.05 sin (2t + π/2) (N · m) ∗ τd2 = 0.05 sin (t) (N · m) ⎪ ⎩ ∗ τd3 = 0.05 sin (t) (N · m) The simulation result is shown in Fig. 3.2, the left column within which shows the comparison between the estimated values and the actual values of each order disturbance observers, while the right column shows the estimation errors. And Table 3.3 summarizes the errors of each disturbance observers in mathematical form. −3

d1

estimation errors in τ d2 estimation errors in τ *

25

estimation errors in τ *

d1

0.1 0.05

τ*

25

Actual disturbance Second order DO Third order DO Fourth order DO

0

−0.05 5

10

15

20

25

0.1

* τ d2

0.05 0

−0.05 −0.1

5

10

15

20

τ*

d3

0.1

0

−0.1

−1

5

10

15

time [s]

20

5

10

15

20

25

20

25

20

25

time [s] −4

5

x 10

0

−5

10

5

15

time [s]

d3

time [s]

x 10

0

*

time [s]

1

−3

5

x 10

0

−5

5

10

15

time [s]

Fig. 3.2 Comparison of estimation performance among second-order, third-order, and fourth-order DOs for external disturbances

48

3 Disturbance Observer-Based Sliding Mode Control …

Table 3.3 RMS errors of the three types of DOs ∗ ∗ τd1 τd2 Fourth-order DO Third-order DO Second-order DO

2.4469 · 10−4 4.0041 · 10−4 0.0011

1.1905 · 10−4 1.8535 · 10−4 6.0453 · 10−4

∗ τd3

7.1719 · 10−4 0.0011 0.0035

It can be seen from the results shown in Fig. 3.2 and Table 3.3 that the higher-order number the disturbance observer has, the higher estimation accuracy can be obtained.

3.6.2 High-Order Disturbance Observer-Based Sliding Mode Control Choosing the most accurate disturbance observer combined with the sliding mode controller, we will show the simulation results of the high-order disturbance observerbased sliding mode control (HODOSMC) on the control of the MWIP system. As for the HODOSMC, the following control parameters are used: λ1 = 3, λ2 = 0.2, λ3 = 0.3, λ4 = 3 γ1 = 1, γ2 = 1 d¯1 = 3, d¯2 = 3, d¯3 = 3 It is noted that in the simulation, the fourth-order DO is adopted as the HODO. The fourth-order DO-based SMC (DO4SMC) is used to illustrate the advantages of proposed HODOSMC strategy, while the conventional SMC is employed for comparing. For the SMC, the parameters d¯1 = 15, d¯2 = 15, d¯3 = 15 are used. For the equilibrium control problem, desired velocity of the MWIP is selected as q˙1d = 0. The control performances of SMC and HODOSMC for the MWIP system with external disturbances and model uncertainties are compared and depicted in Fig. 3.3. As shown in Fig. 3.3, it is obvious that the HODOSMC controllers have better performance than the SMC controller in the presence of disturbances. Note that although the HODOSMC controllers can make the state variables to be uniformly bounded, they do not guarantee that all states converge to the desired value. There are small oscillations in the response trajectories all the time. Even so, the simulation results proved that the HODOSMC controller is more effective than the SMC.

3.7 Conclusion

49 4

dθ / dt [rad/s]

1.5

θ [rad]

1 0.5 0 −0.5

0

5

10

15

20

2 0 −2 −4

25

0

5

1.5

15

20

25

20

25

20

25

0.2 0.1

α [rad]

dψ / dt [rad/s]

HODOSMC SMC desired value

1 0.5

0 −0.1

0 0

5

10

15

20

−0.2

25

time [s]

5

10

15

2 1

u [Nm]

2

r

l

1 0 −1

0

time [s]

3

u [Nm]

10

time [s]

time [s]

0 −1 −2

0

5

10

15

time [s]

20

25

−3

0

5

10

15

time [s]

Fig. 3.3 Comparison of balancing control performance by employing SMC and HODOSMC with external disturbances and model uncertainties

3.7 Conclusion In this chapter, a kind of disturbance observer with different orders, ranked from 1 to n, is designed for the underactuated MWIP system. It is theoretically demonstrated that the raise of the observer’s order can effectively improve the estimation accuracy. In order to maximize the estimation performance of the high-order disturbance observer, an optimal design method of the gain matrices for the n-th order DO is proposed, which can be solved by using LMI Toolbox in MATLAB. Subsequently, we combine the high-order disturbance observer with the SMC controller to design a new control strategy for the balance and speed control of the MWIP system. The SMC controller is proposed on a constructed novel sliding surface which can deal with the SMC design difficultly caused by uncertain equilibrium and inherent dynamics of underactuated MWIP system. And the involvement of the disturbance observer can reduce the gain of the sliding mode controller from the system uncertainties’ upper bound to estimation error’s upper bound of the disturbance observer, which alleviates the chattering phenomenon that occurs in the traditional

50

3 Disturbance Observer-Based Sliding Mode Control …

SMC. Finally, simulation studies verify the effectiveness of all the proposed methods, and the experimental studies are further conducted on a physical MWIP system given in Chap. 6.

References 1. Huang, J., Guan, Z. H., Matsuno, T., Fukuda, T., & Sekiyama, K. (2010). Sliding-mode velocity control of mobile-wheeled inverted-pendulum systems. IEEE Transactions on Robotics, 26(4), 750–758. 2. Xu, J.-X., Guo, Z.-Q., & Lee, T. H. (2014). Design and implementation of integral slidingmode control on an underactuated two-wheeled mobile robot. IEEE Transactions on Industrial Electronics, 61(7), 3671–3681. 3. Liao, K., & Xu, Y. (2018). A robust load frequency control scheme for power systems based on second-order sliding mode and extended disturbance observer. IEEE Transactions on Industrial Informatics, 14(7), 3076–3086. 4. El-Sousy, F. F. M., &a Abuhasel, K. A. (2018). Adaptive nonlinear disturbance observer using a double-loop self-organizing recurrent wavelet neural network for a two-axis motion control system. IEEE Transactions on Industry Applications, 54(1), 764–786, Jan-Feb, 2018. 5. Li, Z., Su, C., Wang, L., Chen, Z., & Chai, T. (2015). Nonlinear disturbance observer-based control design for a robotic exoskeleton incorporating fuzzy approximation. IEEE Transactions on Industrial Electronics, 62(9), 5763–5775. 6. Mohammadi, A., Tavakoli, M., Marquez, H. J., & Hashemzadeh, F. (2013). Nonlinear disturbance observer design for robotic manipulators. Control Engineering Practice, 21(3), 253–267. 7. Liu, H., & Li, S. (2012). Speed control for PMSM servo system using predictive functional control and extended state observer. IEEE Transactions on Industrial Electronics, 59(2), 1171– 1183. 8. Wang, C., Li, X., Guo, L., & Li, Y. W. (2014). A nonlinear-disturbance-observer-based DCBus voltage control for a hybrid AC/DC Microgrid. IEEE Transactions on Power Electronics, 29(11), 6162–6177. 9. Zhang, J., Liu, X., Xia, Y., Zuo, Z., & Wang, Y. (2016). Disturbance observer-based integral sliding-mode control for systems with mismatched disturbances. IEEE Transactions on Industrial Electronics, 63(11), 7040–7048. 10. Cao, Y., & Chen, X. B. (2014). Disturbance-observer-based sliding-mode control for a 3-DOF nanopositioning stage. IEEE/ASME Transactions on Mechatronics, 19(3), 924–931. 11. Sun, Z., Xia, Y., Dai, L., Liu, K., & Ma, D. (2017). Disturbance rejection MPC for tracking of wheeled mobile robot. IEEE/ASME Transactions on Mechatronics, 22(6), 2576–2587. 12. Chen, M. (2017). Disturbance attenuation tracking control for wheeled mobile robots with skidding and slipping. IEEE Transactions on Industrial Electronics, 64(4), 3359–3368. 13. Wu, J., Huang, J., Wang, Y., & Xing, K. (2014). Nonlinear disturbance observer-based dynamic surface control for trajectory tracking of pneumatic muscle system. IEEE Transactions on Control Systems Technology, 22(2), 440–455. 14. Chen, M., Shao, S. Y., & Jiang, B. (2017). Adaptive neural control of uncertain nonlinear systems using disturbance observer. IEEE Transactions on Cybernetics, 47(10), 3110–3123. 15. He, W., Yan, Z., Sun, C., & Chen, Y. (2017). Adaptive neural network control of a flapping wing micro aerial vehicle with disturbance observer. IEEE Transactions on Cybernetics, 47(10), 3452–3465. 16. Xu, B., Sun, F., Pan, Y., & Chen, B. (2017). Disturbance observer based composite learning fuzzy control of nonlinear systems with unknown dead zone. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 47(8), 1854–1862. 17. Mohammed, S., et al. (2016). Nonlinear disturbance observer based sliding mode control of a human-driven knee joint orthosis. Robotics and Autonomous Systems, 75, 41–49.

References

51

18. Ajwad, S. A., Iqbal, J., Khan, A. A., & Mehmood, A. (2015). Disturbance-observer-based robust control of a serial-link robotic manipulator using SMC and PBC techniques. Studies in Informatics and Control, 24(4), 401–408. 19. Wang, C., Mi, Y., Fu, Y., & Wang, P. (2018). Frequency control of an isolated micro-grid using double sliding mode controllers and disturbance observer. IEEE Transactions on Smart Grid, 9(2), 923–930. 20. Ginoya, D., Shendge, P. D., & Phadke, S. B. (2014). Sliding mode control for mismatched uncertain systems using an extended disturbance observer. IEEE Transactions on Industrial Electronics, 61(4), 1983–1992. 21. Yang, J., Li, S., & Yu, X. (2013). Sliding-mode control for systems with mismatched uncertainties via a disturbance observer. IEEE Transactions on Industrial Electronics, 60(1), 160–169. 22. Sanyal, A., Fosbury, A., Chaturvedi, N., & Bernstein, D. S. (2014). Inertia-free spacecraft attitude trajectory tracking with internal-model-based disturbance rejection and almost global stabilization. In American control conference (pp. 4830–4835).

Chapter 4

Sliding Mode Variable Structure-Based Chattering Avoidance Control for Mobile Wheeled Inverted Pendulums

4.1 Introduction Mobile robots are widely used in various fields. As a special kind of mobile robot, the mobile wheeled inverted pendulum (MWIP) has attracted more and more attention thanks to its compact size, strong mobility, and high flexibility [1]. However, the control of the MWIP system still remains a very challenging problem because of its natural instability, underactuation, nonlinearity, time variability, and strong coupling. So far, a plurality of methods have been studied based on the MWIP system. These methods could be divided into two categories: model-free algorithms and model-based algorithms. The model-free ones are applicable to general systems, but the control accuracy demands of physical applications are often difficult to meet due to the lack of system information. Moreover, these algorithms, such as PID control, largely rely on well-tuned parameters, and it is difficult to guarantee the stability of the closed-loop system without the mathematical model. Another branch of the model-free approach is neural network (NN)-based approximation. The NN training method requires a large amount of data, and the corresponding parameters are adjusted through the neurons, which cause a heavy computational burden [2]. In addition, fuzzy logic control, a widely used strategy, suffers from a slow response time and a serious dependence on the experience of selecting suitable member functions and rules [3, 4]. For the model-based algorithms, we have to get the dynamic model of the system first, which might be controlled by the approach of feedback linearization, traditionally. In practice, however, accurate models are often hard to come by, which requires the model-based approaches to have the capacity of handling uncertainties. Although the feedback linearization controller can be directly applied to the nonlinear dynamics without linear approximation, the controller contains high-order derivative terms and is very sensitive to noises and uncertainties. In addition, the nonlinearity of the system cannot be easily canceled out, especially for the underactuated system, whose dynamics are not invertible [5]. Sliding mode control (SMC) appears to be one of the most promising robust nonlinear control techniques for systems with parameter variations and external © Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_4

53

54

4 Sliding Mode Variable Structure-Based Chattering …

disturbances [6]; it can keep the system states sliding on the sliding surface and ensure the stability of the closed-loop system. Therefore, SMC has been extensively studied and applied [7–9]. However, one serious disadvantage of SMC is the “chattering” phenomenon, which is harmful to the mechanical systems. There are two main causes for the occurrence of the chattering phenomenon. One is the discontinuous switching function in the controller. The other one stems from the switching gain of the SMC, which must be designed to be greater than the bound of the system uncertainty [10]. Therefore, many researchers have tried to reduce the chattering in the conventional SMC for MWIP systems. In [11], Pupek replaced the sign function with the saturation function on two-wheeled self-balancing mobile robots, which is the most direct way to reduce the chattering. However, the saturation function only transforms the discontinuous switching function into a continuous proportional function in the saturated region; therefore, the controller will fail once it leaves the boundary layer. Furthermore, the determination of the boundary layer also remains an ambiguous problem. The chattering can also be reduced by combining the disturbance observer (DO) and the SMC [12–14]. Huang has successfully designed a systematic method of a high-order disturbance observer-based sliding mode control for a class of underactuated robotic systems [15]. The reason lies in the fact that the estimation of the disturbance can be used as a feed-forward compensation to the controller such that the switching gain of SMC is only required to be designed greater than the bound of the disturbance estimation error. The combination of DO and traditional SMC is detailed introduced in the previous chapter. Thus, in this chapter, we try to reduce the"chattering" phenomenon in another way. High-order sliding mode-based control strategies are also significant ways to deal with the chattering elimination problem. Among them, second-order sliding mode (SOSM) control is promising, and it has been widely used in various applications, such as the regulation problem of a buck converter [16, 17], rigid spacecraft attitude control [18], and so on. The super-twisting algorithm (STA), known as a kind of second-order sliding mode control, retains all the advantages of sliding mode and effectively reduces the chattering [19, 20]. By adding an integrator to the control input, the actual control signal and its derivative can be obtained explicitly. Instead of acting on the first-order sliding manifold time derivative, the discontinuous term proceeds on its second-order time derivative. Consequently, the actual control law will be a continuous integration of its derivative, and the chattering phenomenon can be eliminated. However, for most SMC-based methods, with respect to disturbances, a common assumption is that the disturbances are bounded by an unknown constant [21, 22], which is directly utilized in the controller. Further, the disturbance bounds are often not easy to determine in real systems. Therefore, in this chapter, we use an adaptive gain on the basis of the super-twisting algorithm, which helps to learn the upper bound of the disturbance by the adaptive law. As a result, the upper bound of the disturbance learned by the adaptive law will be close enough to the real bound of the disturbance to make the gain of the controller as small as possible, which further reduces the chattering.

4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems

55

Another improvement to traditional sliding mode control (SMC) is terminal sliding mode control (TSMC). Zak first proposed the terminal absorption factor in 1989 [23], which laid a foundation for the development of terminal sliding mode control theory. In 1994, Man proposed the terminal sliding mode control theory [24–27]. TSMC is a typical nonlinear sliding mode control, which can ensure that all variables converge to the expected value in a limited time. TSMC introduces a nonlinear term into the sliding mode plane. Compared with the ordinary sliding mode control, the transient performance of the TSMC can also be greatly improved, with fast dynamic response, high tracking accuracy, and fast convergence speed. We applied online switching terminal sliding mode controllers to brake the UW-car system [25]. A TSMC scheme with augmented sliding hyperplane is proposed for a second-order nonlinear system [26]. So far, TSMC has been used successfully in many control applications [27–31].

4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems In this section, we first present the controller design based on the adaptive supertwisting algorithm. The first procedure of the adaptive super-twisting controller design is to define the sliding surface, which is similar to the SMC. Obviously, the MWIP system is an underactuated system. According to the first two equations of the dynamics (2.36), q1 and q2 are coupled. Therefore, we need to define the first sliding manifold that contains both q1 and q2 to obtain a relative degree one for u A . Then, the second sliding manifold contains q3 . The design of the sliding surface is shown in (4.1).  σ =

   e˙2 +λ1 e2 + λ2 e˙1 σ1 = , σ2 e˙3 + λ3 e3

(4.1)

    where e = e1 e2 e3 = q1 − q1d q2 − q2d q3 − q3d is the error vector, and qd = q1d q2d q3d represents a fixed equilibrium point corresponding to a particular task. λi (i = 1, 2, 3) are positive coefficients, and they are designed to satisfy the following constraints: (4.2) λ1 > 0, λ2 > 0, λ2 z 2∗ − z 1∗ < 0, where z 1∗ = mˆ 11 + mˆ 12 , z 2∗ = mˆ 22 + mˆ 12 . q2d , q˙1d , and q3d represent the desired inclination angle, the desired velocity, and the desired yaw angle, respectively. Equation (4.1) also indicates that σ1 has relative degree one with respect to u A and σ2 has relative degree one with respect to u B . This makes it possible to achieve the second-order sliding mode σ = σ˙ = 0. The derivative of the sliding surface is described as

56

4 Sliding Mode Variable Structure-Based Chattering …

 σ˙ =

σ˙ 1



σ˙ 2

 =

1

−K 1 |σ1 | 2 sgn(σ1 ) + v1 1

−K 2 |σ2 | 2 sgn(σ2 ) + v2

 ,

(4.3)

where K 1 , K 2 are arbitrary positive constants and v1 , v2 are auxiliary variables. The auxiliary variables are exploited to include the integration of the sliding mode variable, which is used to reduce the chattering phenomenon caused by the fast switching of the sign function. The derivative of the auxiliary variables is defined as  v˙ =

v˙ 1 v˙ 2



 =

−1 sgn(σ1 ) −2 sgn(σ2 )

 .

(4.4)

1 , 2 are adaptive coefficients of the sliding surface. The adaptive law can be chosen as ⎧ ⎧ ⎨ 1 |σ |, |σ | ≥ ε ⎪ ⎪ 1 ⎪ ⎪ ˙ 1 = ∂1 1 ⎪ ⎪ ⎩ ⎪ ⎨ 0, |σ1 | < ε , (4.5) ˙ = ⎧ 1 ⎪ ⎪ ⎨ ⎪ |σ2 |, |σ2 | ≥ ε ⎪ ⎪ ˙ ⎪ ⎪  2 = ⎩ ∂2 ⎩ 0, |σ2 | < ε where ∂1 , ∂2 are arbitrary positive constants as well. ε is a boundary layer of σ , which is introduced for the practical implementation of the controller. The initial ˆ ˆ is a constant vector, which is clearly clarified value of  satisfies 0 ≤ (0) < . in the following Remark 4.1. (0) will be selected to be small enough or even equal to zero. In the experimental section, (0) is appropriately selected to increase the initial responses of the system. The assumption on the disturbances is the same as the above sections, which means the lumped disturbances are assumed to be bounded; then the following inequality holds:

||τd2 + λ2 τd1 || ≤ ˆ 1 . (4.6) ||τd3 || ≤ ˆ 2 Remark 4.1 ˆ 1 , ˆ 2 are used to represent the actual bounds of the two kinds of disturbances in (4.6), respectively. It is worth noting that we are just assuming the disturbance is bounded, while we don’t need to know the knowledge of the upper bound. This unknown upper bound has not been exploited in the design of the conˆ It represents the error troller. It is adaptively learned by (4.5). We define ˜ =  − . between the bound obtained by the adaptive law and the actual bound. We will prove below that  will converge to ˆ by the rendered adaptive law. Based on the above analysis, we can conclude the adaptive STA controller by the following theorem.

4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems

57

Theorem 4.1 The achievement of a sliding motion on the surface (4.1) can be guaranteed by the selection of the control law ⎧ 1 ⎪ uA = [− f 2 − λ2 f 1 − λ1 q˙2 ⎪ ⎪ ⎪ g + λ2 g1 2 ⎪ ⎪ ⎪ 1 ⎪ ⎪ − K 1 |σ1 | 2 sgn(σ1 ) + v1 ] ⎪ ⎪ ⎪ ⎪ ⎪ 1 1 ⎪ ⎪ = [− f 2 − λ2 f 1 − λ1 q˙2 − K 1 |σ1 | 2 sgn(σ1 ) ⎪ ⎪ ⎪ g + λ g 2 2 1 ⎪ ⎪ ⎪ t ⎪ ⎪ ⎪ ⎪ ⎪ − 1 sgn(σ1 (τ ))dτ ] ⎨ 0 ⎪ ⎪ ⎪ 1 1 ⎪ ⎪ ⎪ u B = [− f 3 − λ3 q˙3 − K 3 |σ2 | 2 sgn(σ2 ) + v2 ] ⎪ ⎪ g ⎪ 3 ⎪ ⎪ ⎪ 1 1 ⎪ ⎪ ⎪ = [− f 3 − λ3 q˙3 − K 3 |σ2 | 2 sgn(σ2 ) ⎪ ⎪ g3 ⎪ ⎪ ⎪ ⎪ t ⎪ ⎪ ⎪ ⎪ ⎪ − 2 sgn(σ2 (τ ))dτ ] ⎪ ⎩

,

(4.7)

0

where f i (i = 1, 2, 3) and gi (i = 1, 2, 3) are the parts of the dynamic model, which are explicitly depicted in Sect. 2.4. Proof Consider the Lyapunov function V =

1 1 2 σ + σ22 + (∂1 ˜ 12 + ∂2 ˜ 22 ). 2 1 2

(4.8)

where ∂1 and ∂2 are positive constants. Obviously, the Lyapunov function (4.8) is positive definite. Taking the first time derivative of the defined Lyapunov function yields (4.9) V˙ = σ1 σ˙ 1 + σ2 σ˙ 2 + ∂1 (1 − ˆ 1 )˙ 1 + ∂2 (2 − ˆ 2 )˙ 2 . From (2.36) and (4.1), it follows that σ˙ 1 = q¨2 + λ1 q˙2 + λ2 q¨1 = ( f 2 + g2 u A ) + τd2 + λ1 q˙2 + λ2 ( f 1 + g1 u A + τd1 )

(4.10)

= f 2 + λ2 f 1 + λ1 q˙2 + (g2 + λ2 g1 )u A + τd2 + λ2 τd1 , σ˙ 2 = q¨3 + λ3 q˙3 = f 3 + g3 u B + τd3 + λ3 q˙3 ,

(4.11)

58

4 Sliding Mode Variable Structure-Based Chattering …

Using the proposed adaptive law in (4.5) 1 ∂1 ˙˜ 1 = ∂1 (˙ 1 − ˙ˆ 1 ) = ∂1 |σ1 | = σ1 sgn(σ1 ), ∂1

(4.12)

1 ∂2 ˙˜ 2 = ∂2 (˙ 2 − ˆ˙ 2 ) = ∂2 |σ2 | = σ2 sgn(σ2 ). ∂2

(4.13)

Combining the results from (4.10) to (4.13), then the derivative of the Lyapunov function can be written as V˙ = σ1 σ˙ 1 + σ2 σ˙ 2 + ∂1 ˜ 1 ˙˜ 1 + ∂2 ˜ 2 ˙˜ 2 = σ1 ( f 2 + λ2 f 1 + λ1 q˙2 + (g2 + λ2 g1 )u A + τ d2 + λ2 τ d1 ) + σ2 ( f 3 + g3 u B + λ3 q˙3 + τd3 ) + (1 − ˆ 1 )σ1 sgn(σ1 ) + (2 − ˆ 2 )σ2 sgn(σ2 ). (4.14) Substituting the control laws (4.7) into (4.14), we can obtain V˙ = σ1 σ˙ 1 + σ2 σ˙ 2 + ∂1 ˜ 1 ˙˜ 1 + ∂2 ˜ 2 ˙˜ 2 = σ1 ( f 2 + λ2 f 1 + λ1 q˙2 + (g2 + λ2 g1 )u A + τd2 + λ2 τd1 ) + σ2 ( f 3 + g3 u B + λ3 q˙3 + τd3 ) + ∂1 (1 − ˆ 1 )˙ 1 + +∂2 (2 − ˆ 2 )˙ 2 t

1

= σ1 (−K 1 |σ1 | 2 sgn(σ1 ) − 1

1

sgn(σ1 )dτ + τd2 + λ2 τd1 ) + σ2 (−K 2 |σ2 | 2 sgn(σ2 ) 0

t − 2

sgn(σ2 )dτ + τd3 ) + (1 − ˆ 1 )|σ1 | + (2 − ˆ 2 )|σ2 |

0 3

3

= −K 1 |σ1 | 2 − 1 |σ1 | + σ1 (τd2 + λ2 τd1 ) − K 2 |σ2 | 2 − 2 |σ2 | + σ2 τd3 + 1 |σ1 | − ˆ 1 |σ1 | + 2 |σ2 | − ˆ 2 |σ2 | = −K 1 |σ1 | 2 − K 2 |σ2 | 2 + σ1 (τd2 + λ2 τd1 ) − ˆ 1 |σ1 | + σ2 τd3 − ˆ 2 |σ2 | 3

3

3

3

≤ −K 1 |σ1 | 2 − K 2 |σ2 | 2 .

(4.15) It is clear that V˙ is negative definite. Therefore, the trajectory of the system reaches the manifold σ = 0 by using the control law, and the variable q3 can converge to q3d . After reaching the sliding surface, the second phase of the sliding mode control, i.e., the sliding phase, needs to be guaranteed. The trajectory is expected to move

4.2 Adaptive Super-Twisting Control for Mobile Wheeled Inverted Pendulum Systems

59

towards the equilibrium point while sliding on the sliding surface. From (2.34) and (4.1), the motion of the system on the sliding surface can be obtained: ∗ ∗ + τd2 , z 1 q¨1 + z 2 q¨2 = mˆ 12 sin (q2 ) q˙22 + Gˆ b sin (q2 ) + τd1

(4.16)

q˙2 + λ1 (q2 − q2d ) + λ2 (q˙1 − q˙1d ) = 0.

(4.17)

From (4.17), q˙1 and q¨1 can be described as (4.18) and (4.19), respectively. q˙1 =

−q˙2 − λ1 (q2 − q2d ) + λ2 q˙1d λ2

(4.18)

−q¨2 − λ1 q˙2 λ2

(4.19)

q¨1 =

Substituting (4.19) into (4.16) and introducing a new state vector x = [x1 ,x2 ] = [q2 ,q˙2 ], a new system is derived, which is equivalent to (4.16) and (4.17) in the view of stability: x˙ = (x), (4.20) where  (x) =

2 (x) =

1 (x) 2 (x)

 , 1 (x) = x2 ,

1 ∗ ∗ (λ2 (mˆ 12 sin (x1 ) x22 + Gˆ b sin (x1 ) + τd1 + τd2 ) + z 1 λ1 x2 ). λ2 z 2 − z 1

The equilibrium of (4.20) is denoted by x∗ = [x1∗ ,x2∗ ] = [0, 0]. We linearize (4.20) around the equilibrium x∗ to establish the linear stability criteria that guarantees local exponential stability of the nonlinear system. The linearized system is described by

(4.21) x˙ = A · x − x∗ , where    ∂  0 1 , = A= 1 2 ∂x x∗   ∂2  λ2 Gˆ b ∂2  λ1 z 1∗ 1 = = , = = . 2 ∂ x 1 x ∗ λ2 z 2∗ − z 1∗ ∂ x 2 x ∗ λ2 z 2∗ − z 1∗

(4.22)

60

4 Sliding Mode Variable Structure-Based Chattering …

According to the Hurwitz stability criteria, the closed-loop system is asymptotically stable around the equilibrium when the following condition is satisfied: 1 , 2 < 0.

(4.23)

It is obvious that the inequality (4.23) holds when the sliding mode coefficients satisfy the constraint (4.2). Then, we can conclude that the global stability of the closed-loop system can be guaranteed. This completes the proof. Remark 4.2 In this chapter, by conducting the super-twisting controller, the system motion consists of two phases. The first phase is the reaching phase, in which the trajectory of the system moves towards the manifold σ = 0 and reaches the manifold in finite time. The second is the sliding phase, in which the dynamics of the system are represented by the reduced-order model considering σ = 0. When the system’s trajectories slide on the sliding surface σ = 0, the selection of sliding surface can ensure the system’s trajectories arrive at the equilibrium point. In order to verify that the equilibrium point is stable, we linearize the system around the equilibrium point, which turns out to be a stable saddle point. Consequently, combining the supertwisting controller and the stable equilibrium, the closed-loop system is asymptotic stable. The diagram of the control strategy is shown in Fig. 4.1.

Fig. 4.1 Diagram of the control strategy. STA—super-twisting algorithm

4.3 Terminal Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems

61

4.3 Terminal Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems 4.3.1 TSMC Controller Design To ensure that the MWIP system can stay at the equilibrium and move at a desired velocity v∗ , a special sliding surface and the corresponding terminal SMC (TSMC) controller design scheme is proposed in this section. As matrices M(q) is invertible, we start by rewriting the general model (2.31) described in Chap. 2 as: ˙ q) + G(q, ˙ q)τ x˙ = F(q, (4.24) where

˙ T x = q3D = [θ˙ v α] ⎡ ⎤ ⎤ g11 g12 f1 ⎢ ⎥ ⎢ ⎥ F = ⎣ f 2 ⎦ , G = ⎣ g21 g22 ⎦ . f3 g31 g32 ⎡

And the nominal system is given by: ˆ q, ˆ q, ˙ q) + G( ˙ q)τ, x˙ = F(

(4.25)

where ⎡



⎡ ⎤ gˆ 11 gˆ 12 ⎢ ⎥ ⎢ ⎥ ˆ⎥ ˆ Fˆ = ⎢ ⎣ f 2 ⎦ , G = ⎣ gˆ 21 gˆ 22 ⎦ . gˆ 31 gˆ 32 fˆ3 fˆ1

Considering the underactuated feature of system (4.24), the following subsystem is investigated in the TSMC controller design: ˙ q) + G1 (q, ˙ q)τ, x˙1 = F1 (q,   ˙ q) and G1 (q, ˙ q) satisfy: where vector x1 = θ˙ α˙ , and matrices F1 (q,  ˙ q) = F1 (q,

   f1 g11 g12 , G1 (q˙ q) = . f3 g31 g32

(4.26)

62

4 Sliding Mode Variable Structure-Based Chattering …

Accordingly, the nominal case of subsystem (4.26) is given by ˆ 1 (q, ˙ q) + G ˙ q)τ, x˙ 1 = Fˆ 1 (q,

(4.27)

where  Fˆ 1 (q˙ q) =

fˆ1 fˆ3



 ˆ 1 (q˙ q) = ,G

 gˆ 11 gˆ 12 . gˆ 31 gˆ 32

Note that Fi and Fˆ i are the i-th elements of matrices F and Fˆ with i = 1, 2, and ˆ with i = 1, 2 and gi j and gˆ i j represent the (i, j)-th elements of matrices G and G j = 1, 2. Assume that the following inequality and equations holds.      ˆ ˆ Fi − Fi  ≤ F˜ i , F˜ = F˜ 1 F˜ 2 , G = (I + )G,

(4.28)

where I is a 2 × 2 identify matrix, and is composed of i j satisfying the following inequality:    i j  ≤ Di j , Di j > 0, |D| < 1. (4.29) TSMC method proposed by Park and Tsuji [26] was applied to the subsystem (4.27). The sliding surface can be presented as: s(t) = e˙ (t) + Ce(t) − w(t),

(4.30)

where e(t) = x(t) − xd (t), xd (t) is the reference trajectory. In addition we have C = diag(c1 , c2 ), ci > 0, w(t) = v˙ (t) + V(t). Define the following sliding surfaces of an MWIP system: s1 (t) = θ˙ + c1 (θ − θ ∗ ) − c1 v1 (t), s2 (t) = α˙ − α˙ ∗ − c2 (α − α ∗ ) − v˙ 2 (t) − c2 v2 (t),

(4.31)

where θ ∗ , α˙ ∗ , and α ∗ are the desired inclined angle, yaw angle velocity, and yaw angle, respectively. Suppose that the model parameters of underactuated system (4.26) satisfy inequalities (4.28) and (4.29). The pitch angle θ , yaw angle α will converge to the desired value, if the following control law is applied: ˆ −1 [−Fˆ − C˙e + v¨ + C˙v − ksgn(s)], τ =G where T T   v = v1 v2 , e = θ − θ ∗ α − α ∗ ,

(4.32)

4.3 Terminal Sliding Mode Control for Mobile Wheeled Inverted Pendulum Systems

63

T  ksgn(s) = k1 sgn(s1 ) k2 sgn(s2 ) ,  T  = γ1 γ2 , γi > 0, ˙ + ). k = (I − D)−1 (F˜ + D|Fˆ + C˙e + v¨ + C v| The proof can be easily obtained referencing to the following convergence analysis.

4.3.2 Analysis of Velocity Convergence Note that although the proposed TSMC controllers do not aim at controlling the velocity of MWIP, the velocity will converge to the desired value. The controller (4.32) guarantees that the velocity v converges to desired velocity. Define a new matrix V: ⎤ ⎡ 0 1 0 ⎥ ⎢ (4.33) V = ⎣ 1 r w 0⎦ . 0

0

1

Multiplying both sides of the dynamic model (2.31) by V, it follows that:



˙ = E(q)τ, M(q)˙x + N(q, q)

(4.34)

where

M(q) = V(ST M(q)S),

˙ + N(q, q)), ˙ = VST (M(q)Sx ˙ N(q, q) ⎡

1 ⎢

r w E(q) = VST E(q) = ⎢ ⎣ 1 rw

0 0

⎤ b T rw ⎥ ⎥ . b⎦ rw

Obviously, the second equation of (4.34) is underactuated and can be expressed as: (m 1l1rw Cθ + I yy + m 1l12 )θ¨ + (m 1 + 2m w + 2

Iwa Dw )˙v + 2 v + Q = 0, (4.35) rw rw

64

4 Sliding Mode Variable Structure-Based Chattering …

where Q is a function depending on states θ, α, θ˙ , α: ˙ Q = (−m 1 l1 rw Sθ − 0.5(m 1 l1 + I x x − Iz z)S2θ )α˙ 2 − m 1 l1 gSθ + D1 θ˙ − m 1 l1 rw Sθ θ˙ 2 .

Equation (4.35) represents the internal dynamics of system (2.31), which has nothing to do with the control input τ . The dynamics of system (2.31) in the sliding surfaces are determined by (4.35), and the state variables satisfy the following equations. θ˙ + c1 (θ − θ ∗ ) − v˙ 1 (t) − c1 v1 (t) = 0, α˙ − α˙ ∗ + c2 (α − α ∗ ) − v˙ 2 (t) − c2 v2 (t) = 0.

(4.36)

Given known initial conditions θ (0), α(0), θ˙ (0), α(0) ˙ and the function of v1 and v2 , state variables and their derivatives θ, θ˙ , α, α, ˙ and θ¨ can be obtained directly from (4.36). Then, by substituting these to equation (4.35), it follows that:   2Dw Iwa m 1 + 2m w + 2 v˙ + v = P(t), rw rw

(4.37)

where P(t) depends on time. Equation (4.37) is a first-order linear differential equation with respect to v, and the stability has nothing to do with P(t) as long as P(t) is finite. The stability of (4.37) is then determined by: (m 1 + 2m w + 2

Iwa 2Dw )˙v + v = 0. rw rw

(4.38)

w Since (m 1 + 2m w + 2 Irwa ) and 2D are positive, we can conclude that v is asymptotic rw w stable. According to (4.37), P(t) is asymptotic to zero when θ, θ˙ , α, α˙ converge to the desired values, and v converges to zero accordingly. In the speed control of MWIP, when the MWIP system moves in a straight line at a certain speed v∗ , the dynamic equilibrium point of the system is denoted as

x∗ = [θ ∗ α ∗ θ˙ ∗ v∗ α˙ ∗ ]T = [0 0 0 v∗ 0]T .

(4.39)

Define the error function with respect to v as: 

Iwa m 1 + 2m w + 2 rw

 e˙v +

2Dw ˜ ev = P(t), rw

(4.40)

4.4 Simulation Studies

65

where

ev = v − v∗ ,   Iwa 2Dw ∗ ˜ v˙ ∗ + v . P(t) = P(t) − m 1 + 2m w + 2 rw rw

Equation (4.40) is a first-order linear differential equation about ev , which obviously indicates that ev will eventually converge to zero.

4.4 Simulation Studies 4.4.1 Adaptive Super-Twisting Control In this section, simulation results of applying the adaptive super-twisting controller are presented. Two cases of simulation are included as follows. • Case1: Balance Control The initial conditions of the MWIP are chosen as: ⎧ ⎪ ⎨ q1 (0) = 0, q˙1 (0) = 0 q2 (0) = −π/18 (rad) , q˙2 (0) = 0 ⎪ ⎩ q3 (0) = 0, q˙3 (0) = 0 The two control techniques, adaptive SMC (ASMC) and adaptive STA (ASTA), are based on the same sliding surface and control parameters. Parameters of these two controllers are selected as follows: λ1 = 10, λ2 = 0.3, λ3 = 0.3

(4.41)

K 1 = 10, K 2 = 0.3, 1 = 5, 2 = 5

(4.42)

According to the values defined in (4.41) and the physical parameters of the MWIP system, the denominator of the controller (4.7) will always be non-negative during the simulation process, which means the design of the controller is feasible. In this case, the MWIP system is expected to reach and maintain upright; thus, the desired values of states are set as zero. The simulation results are shown in Figs. 4.2, 4.3, and 4.4. It can be observed from Fig. 4.2 that both algorithms are able to make the MWIP system return to upright position from a larger initial inclination angle. Meanwhile, under the same conditions, the control performance of ASTA is better than that of ASMC from the perspective of settling time and overshoot. Additionally,

66

4 Sliding Mode Variable Structure-Based Chattering … ASTA ASMC

0.05

[rad]

0 -0.05 -0.1 -0.15 -0.2 -0.25

0

2

4

6

8

10

Time [s]

Fig. 4.2 Comparisons of the inclination angle in balance control 0.2

ASMC ASTA

0 10-3 -0.2

S [rad]

2 0

-0.4 -2 4

-0.6

-0.8

0

2

4.5

4

5

6

8

10

Time [s]

Fig. 4.3 Comparisons of the sliding mode variables in balance control

we give the results of sliding variable and its derivative in Figs. 4.3 and 4.4, which show the capacity of the ASTA in chattering elimination. • Case2: Velocity Control In the case of velocity control, we considered the desired value q˙1d = 0.5 rad/s. The other conditions including initial values of system and the control parameters are the same as Case1. Simulation results are shown in Figs. 4.5, 4.6 and 4.7. Figure 4.5 illustrates the velocities of MWIP system using different methods. It can be seen

4.4 Simulation Studies

67

40

ASMC ASTA

dS [rad]

20

0 10-3 -20

2 0

-40 -2 4 -60

0

2

4.5 4

5 6

8

10

Time [s]

Fig. 4.4 Comparisons of the derivatives of the sliding mode variables in balance control

that both algorithms can reach the desired velocities. But as expected, the ASMC controller has a rather substantial chattering effect, which is greatly decreased by the ASTA. To present more explicitly, we chose the trajectory from 5 to 6 s in the same scale to specify the performance. In this region, the chattering effect can be clearly observed from the ASMC while the curve of ASTA was smooth. The sliding mode variable and its derivative are compared respectively in Figs. 4.6 and 4.7. From Fig. 4.6, the ASMC curve looked thicker than the ASTA curve due to the chattering of the sliding mode variable. The ASTA can guarantee the sliding mode variables and its derivatives converge to zero simultaneously. This effectively suppressed the occurrence of chattering. For the ASMC, due to the chattering of the sliding mode variable, its derivative fluttered more seriously.

4.4.2 Terminal Sliding Mode Control In this section, some simulation results illustrate the effectiveness of the terminal sliding mode control. In all simulations, the physical parameters of an MWIP are the same as above. TSMC is designed according to the analysis in Sect. 4.3. The controller is based on sliding surface given by (4.31), and the augmenting functions v1 , v2 are designed as cubic polynomials:  vi (t) =

ai0 + ai1 t + ai2 t 2 + ai3 t 3 , 0 ≤ t ≤ T f , 0, t > Tf

(4.43)

68

4 Sliding Mode Variable Structure-Based Chattering … ASMC

0.6

ASTA 0.5

velocity [rad/s]

0.4

0.52

0.3 0.5 0.2 0.48 0.1

7

7.5

8

0 -0.1 -0.2

0

2

4

6

8

10

Time [s]

Fig. 4.5 Comparisons of the velocity in velocity control 1

ASMC ASTA

0.5

S [rad]

0 -0.5

0.04

-1

0.02

-1.5

0

-2

7

7.5

8

-2.5 -3

0

2

4

6

8

10

Time [s]

Fig. 4.6 Comparisons of the sliding mode variables in velocity control

where ai0 = ei (0), ai1 = e˙i (0), ai2 = −3(ei (0)/T f2 ) − 2(e˙i (0)/T f ), ai3 = 2(ei (0)/T f3 ) + (e˙i (0)/T f2 ).

4.4 Simulation Studies

69

40

ASMC ASTA

dS [rad]

20

0 10 5

-20

0 -40

-5 7

-60

0

2

4

7.5

6

8

8

10

Time [s]

Fig. 4.7 Comparisons of the derivatives of the sliding mode variables in velocity control

For the sliding surface, T f = 1 was used. In order to avoid chattering associated with the SMC law, we have approximated the discontinuous sign function (sgn(s)) with continuous saturation function of small boundary layers. LQR is a common control technique which is used to make a comparison. The ˙ Linearizing the plant state is chosen as a five-dimensional vector: x = [θ λ θ˙ v λ]. dynamic model of MWIP system (2.31) about equilibrium results in the following controllable linear system: x˙ = FL x + GL u, where the control input vector is u = τ , FL and GL are linearized corresponding system matrices of F and G in (4.24). The LQR optimal control technique is used to design a linear state feedback control law u = −Kx, where the gain matrix K can be solved by minimizing the linear quadratic problem: ∞ (xT Qx + uRu)dt.

J= 0

Weighted matrices Q and R are chosen as:

70

4 Sliding Mode Variable Structure-Based Chattering …



1000 ⎢ 0 ⎢ Q=⎢ ⎢ 0 ⎣ 0 0

0 100 0 0 0

0 0 100 0 0

⎤ 0 0   0 0 ⎥ ⎥ 0.01 0 ⎥ 0 0 ⎥,R = . 0 0.01 100 0 ⎦ 0 1000

The feedback gain matrix K of the LQR controller was obtained as follows: 

 −207.87 70.71 − 75.62 15.33 219.80 K = . −207.87 70.71 − 75.62 15.33 219.80 Three cases of simulation are conducted to verify the effectiveness of the proposed control algorithm. • Case1: Equilibrium control of an MWIP According to the dynamic model (2.31), it is easy to compute the equilibrium of the system is: x = [θ α θ˙ v α] ˙ T = 0. Suppose the initial conditions are given by: α(0) = 0.5, θ (0) = 0.1, α(0) ˙ = 0, θ˙ (0) = 0, v(0) = 1. Apply controller (4.32) (4.26), parameters are

to the subsystem



and the controller

selected as F = 0.8Fˆ , C = 2.5I ,  = 10I , D = 0.4I . The simulation results controlled by TSMC are shown in Figs. 4.8 and 4.9. The red lines represent the desired value, and the black lines are dynamic responses controlled by TSMC. As shown in Fig. 4.8, the TSMC guarantees that the states can converge to the equilibrium. Figure 4.9 presents the output torques of the wheels. With a few seconds of adjustment, the torques converge to zero finally. The simulation results of the equilibrium control controlled by LQR are shown in Figs. 4.10 and 4.11. The red lines represent the desired value, and the black lines are dynamic responses controlled by LQR. It turns out that the LQR controller can also guarantee the states converge to the equilibrium. Comparing Figs. 4.8 and 4.9 with Figs. 4.10 and 4.11, it turns out that both the TSMC and LQR controller can guarantee the states converge to the equilibrium. That is, near the equilibrium, both TSMC controller and LQR controller have the ability to guarantee the states converge to the equilibrium. • Case2: Velocity control without yaw motion Because of the underactuated feature and inherent unstable dynamics of MWIP, an important and basic control problem of the two wheeled mobile vehicle is the dynamic balance and motion control. In this case, we will discuss the velocity control of the system.

4.4 Simulation Studies

71 d T / dt [rad/s]

0 -0.1

0

5

10 time [s]

15

20

D [rad]

0.5 0 -0.5

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

dD / dt [rad/s]

T [rad]

0.1

0.2 0 -0.2

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

0.2 0 -0.2

v [m/s]

1 0.5 0

Fig. 4.8 Simulation results of the equilibrium control using SMC 100

r

 [N*m]

50

l

0 -50 -100

0

2

4

6

8

10 time [s]

12

14

16

18

20

Fig. 4.9 Output torque during the simulation using SMC

Suppose the initial conditions are given by: α(0) = 0.5, θ (0) = 0.1, α(0) ˙ = 0, θ˙ (0) = 0, v(0) = 0, and the desired states are: α = θ = α˙ = θ˙ = 0, v(0) = 1. That is, the MWIP system is expected to go straight without pitch and yaw angles. The TSMC controller parameters are selected as ˆ C = diag(2.5 0.5),  = [5 20]T , D = 0.4I. F = 0.9F,

72

4 Sliding Mode Variable Structure-Based Chattering … d  / dt [rad/s]

0.05 0

0

5

10 time [s]

15

-0.05

20

 [rad]

0.5

0

0

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

d / dt [rad/s]

 [rad]

0.1

-0.1

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

0 -0.1 -0.2

v [m/s]

1 0.5 0

Fig. 4.10 Simulation results of the equilibrium control using SMC 50

 [N*m]

r l 0

-50

0

2

4

6

8

10 time [s]

12

14

16

18

20

Fig. 4.11 Output torque during the simulation using SMC

The simulation results are shown in Figs. 4.12, 4.13, 4.14, and 4.15. Also, the red lines represent the desired value, and the black lines are dynamic responses. Obviously, the LQR controller cannot guarantee the pitch angle and velocity to converge to the desired values simultaneously. While the TSMC controller can realize it. The TSMC controller is a comparatively appropriate approach to control the unstable MWIP system due to its robustness to the model uncertainties. • Case3: Velocity control with a yaw motion Another important control problem is to adjust the motion orientation, i.e., yaw angle α, to a desired value. The controller (4.32) also has the ability for tracking a given

4.4 Simulation Studies

73 d / dt [rad/s]

 [rad]

0.1 0

-0.1

0

5

10 time [s]

15

20 d / dt [rad/s]

 [rad]

0.5 0 -0.5

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

0.2 0 -0.2

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

0.2 0 -0.2

v [m/s]

1 0.5 0

Fig. 4.12 Simulation results of the velocity control without yaw motion using SMC. 100

r

 [N*m]

50

l

0 -50

-100

0

2

4

6

8

10 time [s]

12

14

16

18

20

Fig. 4.13 Output torque during the simulation using SMC

yaw motion. The motion is expected to be circle. That is, the yaw angle velocity is a constant. Choosing the desired yaw angle velocity α˙ = 0.2 rad/s, and the velocity v = 0.2 m/s. The controller parameters are selected as ˆ C = 2.5I,  = 5I, D = 0.4I. F = 0.8F, From (4.37), it is obvious that the velocity is zero at the equilibrium. Since the error function (4.40) is equivalent to (4.37), the second equation of (4.36) is replaced by (4.40). With the controller (4.32), the simulation results are shown in Figs. 4.16, 4.17,

74

4 Sliding Mode Variable Structure-Based Chattering … d / dt [rad/s]

0

-0.1

0

5

10 time [s]

15

20

 [rad]

0.5

0

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

d / dt [rad/s]

 [rad]

0.1

0.5 0 -0.5

0

5

10 time [s]

15

20

0

5

10 time [s]

15

20

0 -0.1 -0.2

v [m/s]

1 0 -1

Fig. 4.14 Simulation results of the velocity control without yaw motion using SMC using LQR

W [N*m]

100

Wr Wl

50

0

-50

0

2

4

6

8

10 time [s]

12

14

16

18

20

Fig. 4.15 Output torque during the simulation using LQR

and 4.18, within which red lines represent the desired value and the black lines are dynamic responses controlled by TSMC. As shown in Fig. 4.16, the system states converge to the desired value in 7 s. The motion trajectory of the MWIP system is shown in Fig. 4.17. Because of the adjustment phase in the first several seconds, the trajectory is not on the circle at the beginning, but reach on it when the states converge to the desired value. Figure 4.18 is the output torques during the simulation. After a short period of oscillation, the torques converge to −1.2 and 1.2, respectively.

4.4 Simulation Studies

75 dT / dt [rad/s]

T [rad]

0.1 0 -0.1

0

10

20 time [s]

30

dD / dt [rad/s]

D [rad]

5

0

10

20 time [s]

30

40

0

10

20 time [s]

30

40

0

-0.2

40

10

0

0.2

0

10

20 time [s]

30

40

0

10

20 time [s]

30

40

5 0 -5

v [m/s]

0.2 0.1 0

Fig. 4.16 Simulation results of the MWIP system 2

1.5

Y [m]

1

0.5

0

-0.5 -1.5

-1

-0.5

0 X [m]

Fig. 4.17 Trajectory of the MWIP

0.5

1

76

4 Sliding Mode Variable Structure-Based Chattering … 2 1 0 -1 -2 28.5

29

29.5

30

30.5

31

31.5

200

Wr

W [N*m]

100

Wl

0 -100 -200

0

5

10

15

20 time [s]

25

30

35

40

Fig. 4.18 Output torque during the simulation

4.5 Conclusion This chapter proposed two advanced sliding mode approaches for the underactuated MWIP system, including an adaptive super-twisting control and a terminal sliding mode control. The adaptive super-twisting controller enables the discontinuous term to proceed on its second-order time derivative, which effectively solves the chattering problem caused by traditional sliding mode control. By guaranteeing the stability of the closedloop system, the adaptive gain in the controller can effectively learn the upper bound of the system disturbance, so that the switching coefficients of the sliding surface are sufficiently small to performs a superior performance of balance control and capacity to reduce chattering. The terminal sliding mode controller of the MWIP is obtained by designing a special sliding surface and considering the actuated part of the MWIP system. Then, by solving the equations of the underactuated part and the dynamics on the sliding surface simultaneously, it can be proved that the underactuated state is self-stabilizing on the sliding surface. It is theoretically demonstrated that the terminal sliding mode controller can realize the equilibrium control, linear and nonlinear motion control of the MWIP. Finally, comparison simulations between the LQR controller and the proposed terminal sliding mode controller are conducted. The simulation results show that the LQR controller can achieve the balance control near the equilibrium.

4.5 Conclusion

77

But for the speed control, the LQR controller cannot realize the desired control effect. The terminal sliding mode controller, on the other hand, has good control effects for balance control, linear and nonlinear motion control of the MWIP system.

References 1. Kim, S., & Kwon, S. (2017). Nonlinear optimal control design for underactuated two-wheeled inverted pendulum mobile platform. IEEE/ASME Transactions on Mechatronics, 22, 2803– 2808. 2. Hendzel, Z. (2007). An adaptive critic neural network for motion control of a wheeled mobile robot. Nonlinear Dynamics, 40, 849–855. 3. Butt, C., & Rahman, M. A. (2004). Limitations of simplified fuzzy logic controller for IPM motor drive. In Proceedings of the Conference Record of the 2004 IEEE Industry Applications Conference (pp. 1891–1898), Seattle, WA, USA, 3–7 October 2004. 4. Huang, J., Ri, M., Wu, D., & Ri, S. (2017). Interval type-2 fuzzy logic modeling and control of a mobile two-wheeled inverted pendulum. IEEE Transactions on Fuzzy Systems, 26(4), 2030–2038. 5. Lee, D., Kim, H. J., & Sastry, S. (2009). Feedback linearization vs. adaptive sliding mode control for a quadrotor helicopter. International Journal of control, Automation and Systems, 7, 419–428. 6. Utkin, V. I. (1993). Sliding mode control design principles and applications to electric drives. IEEE Transactions on Industrial Electronics, 40, 23–36. 7. Li, H., Shi, P., & Yao, D. (2017). Adaptive sliding-mode control of Markov Jump nonlinear systems with actuator faults. IEEE Transactions on Automatic Control, 62, 1933–1939. 8. Su, X., Liu, X., Shi, P., & Yang, R. (2017). Sliding mode control of discrete-time switched systems with repeated scalar nonlinearities. IEEE Transactions on Automatic Control, 62, 4604–4610. 9. Huang, J., Guan, Z., Matsuno, T., Fukuda, T., & Sekiyama, K. (2010). Sliding-mode velocity control of mobile-wheeled inverted-pendulum systems. IEEE Transactions on Robotics, 26, 750–758. 10. Sankaranarayanan, V., & Mahindrakar, A. D. (2009). Control of a class of underactuated mechanical systems using sliding modes. IEEE Transactions on Robotics, 25, 459–467. 11. Pupek, L., & Dubay, R. (2018). Velocity and position trajectory tracking through sliding mode control of two-wheeled self-balancing mobile robot. In Proceedings of the 2018 Annual IEEE International Systems Conference (SysCon) (pp. 1–5), Vancouver, BC, Canada, 23–26 April 2018. 12. Yang, J., Li, S., & Yu, X. (2013). Sliding-mode control for systems with mismatched uncertainties via a disturbance observer. IEEE Transactions on Industrial Electronics, 60, 160–169. 13. Zhang, J., Liu, X., Xia, Y., Zuo, Z., & Wang, Y. (2016). Disturbance observer-based integral sliding-mode control for systems with mismatched disturbances. IEEE Transactions on Industrial Electronics, 63, 7040–7048. 14. Huang, J., Zhang, M., Ri, S., Xiong, C., Li, Z., & Kang, Y. (2019). High-order disturbanceobserver-based sliding mode control for mobile wheeled inverted pendulum systems. IEEE Transactions on Industrial Electronics. https://doi.org/10.1109/TIE.2019.2903778. 15. Huang, J., Ri, S., Fukuda, T., & Wang, Y. (2019). A disturbance observer based sliding mode control for a class of underactuated robotic system with mismatched uncertainties. IEEE Transactions on Automatic Control, 64, 2480–2487. https://doi.org/10.1109/TAC.2018.2868026. 16. Ding, S., & Li, S. (2017). Second-order sliding mode controller design subject to mismatched term. Automatica, 77, 388–392. 17. Ling, R., Maksimovic, D., & Leyva, R. (2016). Second-order sliding-mode controlled synchronous buck DCDC converter. IEEE Transactions on Power Electronics, 31, 2539–2549.

78

4 Sliding Mode Variable Structure-Based Chattering …

18. Tiwari, P. M., Janardhanan, S., & un Nabi, M. (2015). Rigid spacecraft attitude control using adaptive integral second order sliding mode. Aerospace Science and Technology, 4(2), 50–57. 19. Chalanga, A., Kamal, S., Fridman, L. M., Bandyopadhyay, B., & Moreno, J. A. (2016). Implementation of super-twisting control: Super-twisting and higher order sliding-mode observerbased approaches. IEEE Transactions on Industrial Electronics, 63, 3677–3685. 20. Derafa, L., Benallegue, A., & Fridman, L. (2012). Super twisting control algorithm for the attitude tracking of a four rotors UAV. Journal of the Franklin Institute, 349, 685–699. 21. Wang, C., Mi, Y., Fu, Y., & Wang, P. (2018). Frequency control of an isolated micro-grid using double sliding mode controllers and disturbance observer. IEEE Transactions on Smart Grid, 9, 923–930. 22. Jia, Z., Yu, J., Mei, Y., Chen, Y., Shen, Y., & Ai, X. (2017). Integral backstepping sliding mode control for quadrotor helicopter under external uncertain disturbances. Aerospace Science and Technology, 68, 299–307. 23. Zak, M. (1989). Terminal attractors in neural networks. Neural Networks, 2(4), 259–274. 24. Man, Z. H., & Yu, X. (1997). Terminal sliding mode control of MIMO linear systems. IEEE Transactions on Circuits and Systems, 44(11), 1065–1070. 25. Ding, F., Huang, J., Wang, Y., Gao, X., et al. (2009). Optimal braking control for UW-car using sliding mode. In Proceeding IEEE 2009 International Conference on Robotics and Biomimetics, pp. 117C122. 26. Park, K.-B., & Tsuji, T. (1999). Terminal sliding mode control of second-order nonlinear uncertain systems. International Journal of Robust and Nonlinear Control, 9(11), 769C780. 27. Man, Z. H., et al. (1994). A robust MIMO terminal sliding mode control scheme for rigid robotic manipulators. IEEE Transaction on Automatic Control, 39(12), 2464C2470. 28. Chen, S.-Y., & Lin, F.-J. (2011). Robust nonsingular terminal sliding model control for nonlinear magnetic bearing system. IEEE Transaction on Control Systems Technology,19(3), 636C643. 29. Liu, H., & Li, J. F. (2009). Terminal sliding mode control for spacecraft formation flying. IEEE Transaction on Aerospace and Electronic Systems,45(3), 835C846. 30. Guo, Y. S., & Li, C. (2008). Terminal sliding mode control for coordinated motion of a space rigid manipulator with external disturbance. Applied Mathematics and Mechanics,29(5), 583C590. 31. Ge, W., & Ye, D. (2011). Sliding mode variable structure control of mobile manipulators. International Journal of Modelling, Identification and Control,12(1C2), 166C172.

Chapter 5

Interval Type-2 Fuzzy Logic Control of Mobile Wheeled Inverted Pendulums

5.1 Introduction Fuzzy logic systems (FLSs), which have been used in a broad range of applications, have also found applications on MWIP systems [12, 28, 44]. For example, Huang et al. [12] designed a type-1 (T1) FLS for an MWIP using the Takagi–Sugeno (TS) model and Mamdani inference. Xu et al. [44] proposed a novel implementation of a T1 TS FLS for an MWIP using full-state feedback. In both approaches, the control objective was to achieve position control of the MWIP while keeping it balanced. Generally, the dynamics of the MWIP can be represented by a TS fuzzy model, and then a parallel distributed compensation FLS can be designed using linear matrix inequality (LMI) approaches, with guaranteed stability [18, 36]. Recently it has been shown that interval type-2 fuzzy sets (IT2 FSs) [25, 26], an extension of T1 FSs, are better able to model and cope with uncertainties, as demonstrated by a number of applications [4, 10, 21–25, 34, 35, 37, 40–42], including the modeling and control of mobile inverted pendulums [1, 5, 27]. For example, Mohammad et al. [27] designed an IT2 fuzzy PID controller using a new type reduction method to control an inverted pendulum on a cart system with an uncertain model. Benjamas and Ahmad [1] proposed an IT2 TS FLS for the balancing and position control of a wheelchair. However, most existing FLSs for mobile-inverted pendulums only considered balance control. Other important considerations, including position control and direction control, have not been paid enough attention to. Furthermore, to our best knowledge, IT2 FLSs have not been applied to the position and direction control of MWIP system. Thus, in this chapter, we propose the integrated IT2 FLS approach that models the uncertain dynamics of an MWIP and controls its balance, position, and direction simultaneously. Then, we introduce an LMI-based approach to guarantee the stability of the balance controller. Finally, we demonstrate the superior performance of the proposed IT2 FLS in simulations.

© Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_5

79

80

5 Interval Type-2 Fuzzy Logic Control of Mobile …

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile Two-Wheeled Inverted Pendulum The control objective is to balance the MWIP and to simultaneously control its movement position and direction. For the balance control, only the first two equations in (2.34) are needed. We can rewrite them as  

  θ¨ = mˆ 12 cos θ ψ¨

mˆ 12 cos θ m 11 mˆ 22

(5.1)

˙ + u r + u l + τˆ1 mˆ 12 (θ˙ 2 + α˙ 2 ) sin θ − 2dˆw ψ˙ + 2dˆb (θ˙ − ψ)

 ,

˙ − u r − u l + τˆ2 nˆ bla α˙ 2 sin θ cos θ + gˆ b sin θ − 2dˆb (θ˙ − ψ) which is equal to   θ¨ 

1 =  ψ¨



 mˆ 12 cos θ mˆ 11 , mˆ 22 mˆ 12 cos θ

˙ + u r + u l + τˆ1 mˆ 12 (θ˙ 2 + α˙ 2 ) sin θ − 2dˆw ψ˙ + 2dˆb (θ˙ − ψ) ˙ − u r − u l + τˆ2 nˆ bla α˙ 2 sin θ cos θ + gˆ b sin θ − 2dˆb (θ˙ − ψ)



(5.2) ,

where  = mˆ 212 cos 2 θ − mˆ 11 mˆ 22 . Note that the terms including yaw angle α and its derivatives can be viewed as the T  disturbances in balance control. Choose the state vector as x = x1 x2 x3 x4 =  T   θ θ˙ ψ ψ˙ , where the inclination angle θ ∈ − π6 π6 . The state model of the disturbance-free model (5.2) is x˙ = f(x) + g(x)u,

(5.3)

where f(x) =

1  f1 

1 g(x) = 



f2

f3

f4

T

mˆ 11 + mˆ 12 cos x1 −mˆ 22 − mˆ 12 cos x1

,  ,

and u = u r + u l is the control input of the system. Hence f i (i = 1, 2, 3, 4) satisfy

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile …

81

⎧ f 1 = · x2 ⎪ ⎪ ⎪ ⎪ ⎪ f 2 =mˆ 212 x22 cos x1 sin x1 − 2mˆ 12 cos x1 dˆw x4 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ − mˆ 11 gˆ b sin x1 + 2mˆ 12 cos x1 dˆb (x2 − x4 ) ⎪ ⎪ ⎪ ⎪ ⎨ + 2mˆ 11 dˆb (x2 − x4 ) . ⎪ f 3 = · x4 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ f 4 = − mˆ 22 mˆ 12 x22 sin x1 + 2mˆ 22 dˆw x4 ⎪ ⎪ ⎪ ⎪ ⎪ − 2mˆ 22 dˆb (x2 − x4 ) + mˆ 12 gˆ b cos x1 sin x1 ⎪ ⎪ ⎪ ⎩ − 2mˆ 12 dˆb (x2 − x4 ) cos x1 Using local approximation in fuzzy partition space, a TS fuzzy model can be derived from (5.3). When x1 is close to 0, (5.3) can be simplified as (5.4), where 1 = mˆ 11 mˆ 22 − mˆ 212 . Otherwise, when x1 is close to ± π6 , (5.3) can be simplified as (5.5), where β = mˆ 11 mˆ 22 − mˆ 12 β12 and β1 = cos π6 . Note that (5.4) and (5.5) are now linear systems, as shown ⎤ x2

 

⎥ ⎢   1 ⎥ ⎢ ⎥ ⎢  mˆ 11 gˆ b x1 − 2dˆb mˆ 12 + mˆ 11 x2 + 2 mˆ 12 dˆw + mˆ 11 dˆb + mˆ 12 dˆb x4 ⎥ ⎢ 1 x˙ = ⎢ ⎥ ⎥ ⎢ x 4 ⎥ ⎢ ⎣ 1   ⎦

ˆ ˆ ˆ ˆ ˆ −mˆ 12 gˆ b x1 + 2 mˆ 22 db + mˆ 12 db x2 − 2 mˆ 22 dw + mˆ 22 db + mˆ 12 db x4 1   1 −mˆ 11 − mˆ 12 + u, 1 mˆ 22 + mˆ 12 ⎡

(5.4) ⎡

⎤ x2 ⎢

⎥ 1

π π ⎢ ⎥ x1 − 2dˆb mˆ 11 + mˆ 12 cos x2 + 2σ1 x4 ⎥ mˆ 11 gˆ b cos ⎢ ⎢ ⎥ β 6 6 ⎥ x˙ = ⎢ ⎢ x4 ⎥ ⎢ ⎥ ⎢   ⎥ 

⎣ 1 ⎦ π 2 π −mˆ 12 gˆ b cos x1 + 2 mˆ 22 dˆb + mˆ 12 dˆb cos x2 − 2σ2 x4 β 6 6 ⎡ π⎤ 1 ⎢ −mˆ 11 − mˆ 12 cos 6 ⎥ + ⎣ π ⎦u β mˆ 22 + mˆ 12 cos 6 (5.5)

82

where

5 Interval Type-2 Fuzzy Logic Control of Mobile …

π π + mˆ 11 dˆb + mˆ 12 dˆb cos 6 6 π ˆ ˆ ˆ σ2 = mˆ 22 dw + mˆ 22 db + mˆ 12 db cos 6 σ1 = mˆ 12 dˆw cos

The linearized model of the MWIP at θ = − π6 and θ = π6 are identical. Thus, we only need to develop TS fuzzy rules for θ = 0 and θ = π6 , and then interpret the dynamics for other inclination angles between them using fuzzy inference. More specifically, the following two rules are enough to describe the dynamics of the MWIP: ˜ i , then: Model Rule i: if θ is M x˙ = Ai x + Bi u, i = 1, 2,

(5.6)

˜ i is an IT2 FS of Rule i in the domain of θ , and Ai and Bi are the system where M matrix: ⎡

0

⎢ ⎢ A1 = ⎢ ⎢ ⎣

mˆ 11 gˆ b 1

0 − mˆ 121gˆb

⎡ ⎢ ⎢ ⎢ A2 = ⎢ ⎢ ⎣

1 ˆ

− 2mˆs11db 0 0 0 2dˆb mˆ s2 1

0 mˆ 11 gˆ b β1 β

1 −





0 2dˆb mˆ β2 β



0

2 mˆ 12 dˆw +dˆb mˆ s1

0−

0 0

1

2 mˆ 22 dˆw +dˆb mˆ s2

⎤ ⎥ ⎥ ⎥, ⎥ ⎦

1

0

2 mˆ 12 dˆw +dˆb mˆ β1

0−

0

1

2 mˆ 22 dˆw +dˆb mˆ β2 β



mˆ 12 +mˆ 22 1

0



⎢ − (mˆ 12 β1 +mˆ 11 ) ⎥ ⎥ ⎢ β B2 = ⎢ ⎥, 0 ⎦ ⎣ mˆ 12 β1 +mˆ 22 β

⎤ 



⎢ − (mˆ 11 +mˆ 12 ) ⎥ 1 ⎥, B1 = ⎢ ⎦ ⎣ 0





1

0

2mˆ β1 dˆb β

0 mˆ 12 gˆ b β12

0

⎥ ⎥ ⎥ ⎥, ⎥ ⎦

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile …

83

Fig. 5.1 IT2 FSs for the antecedents of the IT2 TS fuzzy model

in which mˆ s1 = mˆ 11 + mˆ 12 , mˆ s2 = mˆ 12 + mˆ 22 , mˆ β1 = mˆ 11 + mˆ 12 β1 , and mˆ β2 = ˜ i , as shown mˆ 12 β1 + mˆ 22 . Triangular IT2 FSs are used as membership functions of M in Fig. 5.1: ⎧ θ+π/7 ⎪ ⎨ π/7 , θ < 0 θ = 0, μ M˜ (θ ) = 1 − μ M˜ (θ ) μ M˜ (θ ) = 1, 2 1 1 ⎪ ⎩ π/7−θ , θ > 0 π/7 ⎧ θ+π/6 ⎪ ⎨ π/6 , θ < 0 θ = 0, μ¯ M˜ 2 (θ ) = 1 − μ¯ M˜ 1 (θ ) μ¯ M˜ 1 (θ ) = 1, ⎪ ⎩ π/6−θ , θ > 0 π/6 Here μ M˜ (θ ) and μ¯ M˜ i (θ ) are the lower and upper membership functions, respectively. i Note that we make μ M˜ (θ ) and μ¯ M˜ i (θ ) complementary to each other to simplify the i computation and also the stability analysis. The firing strength of the ith rule is   Mi = μ M˜ 1 (θ ), μ¯ M˜ i (θ ) , i = 1, 2.

(5.7)

Therefore, the defuzzified output of the IT2 TS fuzzy model, using the Nie–Tan method [31, 40], is

84

5 Interval Type-2 Fuzzy Logic Control of Mobile …

x˙ =

=

i=1

  μ M˜ (θ ) + μ¯ M˜ i (θ ) /2 i  (Ai x + Bi u) 2  μ (θ ) + μ ¯ (θ ) /2 ˜ j=1 Mj M˜

2 

μ M˜ i (θ ) + μ¯ M˜ i (θ )

2 

j

2

i=1



2 

(Ai x + Bi u)

,

(5.8)

m i (θ ) (Ai x + Bi u)

i=1

where m i (θ ) =

μ M˜ (θ ) + μ¯ M˜ i (θ ) i

2

.

Equation (5.8) will be considered as the model to be controlled in the next section.

5.3 IT2 FLSs for Controlling the Balance, Position, and Direction of the MWIP This section introduces the IT2 FLSs for controlling the balance, position, and direction of the MWIP system.

5.3.1 Balance Control T  Let the desired state of the MWIP be xd = θd , θ˙d , ψd , ψ˙ d . The first control objective is to guarantee the balance of the MWIP by determining the feedback gains G i , so that the IT2 FLS can drive x to 0. An IT2 parallel distributed compensation FLS with two rules in the following form is proposed: ˜ i , then: Balance Control Rule i: if θ is M u = Gi x, i = 1, 2,

(5.9)

˜ i are IT2 FSs defined in Fig. 5.1, and Gi are the constant local feedback where M gains to be determined. The defuzzified output, using again the Nie–Tan method, is:

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile …

u=

=



i=1

 μ M¯ (θ ) + μ¯ M¯ i (θ ) /2 i  Gi x 2  μ (θ ) + μ ¯ (θ ) /2 ¯ M j=1 j M¯

2 

μ M¯ (θ ) + μ¯ M¯ i (θ )

2 

85

j

i

2

i=1

Gi x ≡

2 

.

(5.10)

m i (θ )Gi x

i=1

The local feedback gains Gi are determined so that the state x approaches zero asymptotically. Substituting (5.10) into (5.8), it follows that: x˙ =

2 

⎡ m i (θ ) ⎣Ai x + Bi

i=1

=

2 

⎡ m i (θ ) ⎣

i=1

=

2  2 

2 

⎤ m j (θ )G j x⎦

j=1 2 

m j (θ )Ai x +

j=1

2 

⎤ m j (θ )Bi G j x⎦

j=1

  m i (θ )m j (θ ) Ai + Bi G j x

,

(5.11)

i=1 j=1

=

2 2  

m i (θ )m j (θ )Ki j x

i=1 j=1

where Ki j = Ai + Bi G j , and we have used the fact that m 1 (θ ) + m 2 (θ ) = 1. An LMI-based stability condition guaranteeing the stability of (5.11) is given by the following lemmas. Lemma 5.1 The equilibrium of the FLS in (5.8) is quadratically stable in the large if there exist matrices P and W such that ⎧ P>0 ⎪ ⎪ ⎪ ⎪ T ⎪ ⎪ ⎪ Kii P + PKii + Wii < 0 ⎨ KiTj P + PKi j + Wi j ≤ 0 . ⎪   ⎪ ⎪ ⎪ W W ⎪ 11 12 ⎪ ⎪ >0 ⎩W = W W 12

(5.12)

22

Proof Choose the Lyapunov function candidate as V (x) = xT Px. The time derivative of V (x) along the solution trajectory is

86

5 Interval Type-2 Fuzzy Logic Control of Mobile …

V˙ (x) = x˙ T Px + xT Px˙ = +

2 

    m i2 xT KiiT P + PKii x

i=1

    m i m j xT KiTj P + PKi j x



.

(5.13)

i= j

From (5.12) we have KiiT P + PKii < −Wii KiTj P + PKi j < −Wi j

,

(5.14)

and hence V˙ (x) ≤ −

2 

m i2 xT Wii x −

i=1



=−

m1x m2x

T 



m i m j xT Wi j x

i= j

W11 W12 W21 W22



m1x



.

(5.15)

m2x

0 ⎪ ⎨ QAiT + Ai Q − NiT BiT − Bi Ni + Yii < 0 . ⎪ ⎩ QAiT + Ai Q − NTj BiT − Bi N j + Yi j < 0

(5.19)

Note that the inequalities in (5.19) are LMIs of variables Q, Ni and Yi j , from which the controller gains Gi can be easily solved.

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile …

87

Lemma 5.2 For the FLS in (5.11), suppose the unknown initial state vector (x0 ) is uppex r bounded by ε, i.e., x0  ≤ ε. Then, the control input u satisfies |μ| ≤ ρ if the following conditions are added to those in Lemma 5.1: ⎧ 2 ε I≤Q ⎪ ⎨  , Q NiT ⎪ ≥0 ⎩ 2 Ni ρ I

(5.20)

where ε and ρ are predefined positive scalars. Proof From (5.16) and (5.20) we have P = Q−1 ≤ and hence x0 T Px0 ≤

1 I, 2

1 T x0 x0 ≤ 1. 2

(5.21)

(5.22)

According to the Schur complement procedure, LMI (5.19) is equivalent to 1 T N Ni − Q ≤ 0. ρ2 i

(5.23)

Since Gi = −Ni Q−1 , (5.23) can be rewritten as 1 T G Gi − Q−1 ≤ 0 ρ2 i

(5.24)

From (5.10) and (5.24) it follows that u2 = u T u =

2  2 

m i m j xT GiT G j x

i=1 j=1



1 2

2  2 

≤ ρ2

  m i m j xT GiT Gi + GTj G j x

(5.25)

i=1 j=1 2  2 

m i m j xT Q−1 x

i=1 j=1

Considering the fact that m i (θ ) + m j (θ ) = 1 and V˙ (x) is negative defined, (5.25) leads to (5.26) u2 ≤ ρ 2 xT Q−1 x = ρ 2 xT Px ≤ ρ 2 This completes the proof.

88

5 Interval Type-2 Fuzzy Logic Control of Mobile …

Based on Lemmas 5.1 and 5.2, the control gains Gi can be computed to guarantee lim x = 0.

t→∞

5.3.2 Position and Direction Control So far we have introduced the balance controller. Next we will propose two IT2 Mamdani FLSs for the position and direction control of the MWIP. Intuitively, when the inverted pendulum leans forward (θ > 0), the MWIP should also move forward to balance it, and vice versa. So, position control can be achieved by giving a certain inclination angle to the inverted pendulum. Meanwhile, direction control can be achieved by applying the following control signals to the left and the right wheels: ul = u p − u α ur = u p + u α where u r and u l are control signals for the left and right wheels, respectively. u p is the output of the IT2 position controller, and u α is the output of the IT2 direction controller. The position controller employs IT2 Mamdani If-Then rules in the following form: ˜ D and θ˙ is B˜ θ˙ , Position Controller Rule i: If pe is A ˜ D. Then θoff is C where pe is the error of the position, and θ˙ is the change rate of the inclination angle. Note that the output of the position controller is θoff instead of a direct control signal. As shown in Fig. 5.3, θoff is then fed into the balance controller. If θoff is not zero, then the balance controller thinks the MWIP is out of balance. Thus, it drives the MWIP forward or backward to balance it, but in fact achieves our desired position control. Similarly, the direction controller employs the following IT2 Mamdani If-Then rules: ˜ α and α˙ e is B˜ α , Direction Control Rule i: If αe is A ˜ α. Then u α is C where αe is the error of the direction, and α˙ e is its change rate. The ranges of the above variables are given in Table 5.1. The domain of the each antecedent and consequent is partitioned into seven overlapping triangular IT2 FSs (NB, NM, NS, ZO, PS, PM, and PB), as shown in Fig. 5.2. The rulebase is shown in Table 5.2, which implements an unusual diagonal controller

5.2 Interval Type-2 Fuzzy Logic Modeling and Control of a Mobile … Table 5.1 Ranges of the input and output variables θ˙e (rad/s) Variables pe (m) αe (rad) α˙ e (rad/s) Range

[−3, 3]

[−4, 4]

[−1, 1]

[−1, 1]

89

θo f f (rad)

ua

[π/40, π/40]

[−200, 200]

Fig. 5.2 Overall control diagram for the MWIP Table 5.2 Fuzzy rules for position and direction control pe (αe ) NB NM NS ZO θ˙e (α˙ e ) NB NM NS ZO PS PM PB

PB PB PB PB PM PS ZO

PB PB PB PM PS ZO NS

PB PB PM PS ZO NS NM

PB PM PS ZO NS NM NB

PS

PM

PB

PM PS ZO NS NM NB NB

PS ZO NS NM NB NB NB

ZO NS NM NB NB NB NB

similar to the fuzzy sliding mode controller [11, 30]. The minimum t− norm and the Begian–Melek–Mendel type-reduction and defuzzification approach [38] were used in the IT2 FLSs. The overall IT2 FLS scheme is shown in Fig. 5.3.

90

5 Interval Type-2 Fuzzy Logic Control of Mobile …

Fig. 5.3 Overall control diagram for the MWIP

5.4 Simulation Studies In this section, the effectiveness of the proposed IT2 FLS controller is verified by simulations of balance control. Other scenarios, including balance control, position control, and direction control, are conducted on a real MWIP system, whose experimental results are presented in Sect. 6.2.3. All the initial conditions of the MWIP system are set as ⎧ ⎪ ⎨ q1 (0) = 0, q˙1 (0) = 0 q2 (0) = π/18 (rad) , q˙2 (0) = 0 ⎪ ⎩ q3 (0) = 0, q˙3 (0) = 0 IT2 FLS controller (5.10) is employed, where the controller gain matrixes G1 and G2 is calculated by the LMI toolbox. The gain matrixes are given by 

−3.19 × 104 −807 G1 = 90.5 −28.6 



−1.8 × 105 −1.6 × 103 G2 = 734.6 89.9



The simulation result of balance control is shown in Fig. 5.4. One can obviously observe that the the inclination angle of MWIP system converges quickly from the initial position to the equilibrium position (θ = 0) and remains in the equilibrium position.

5.5 Discussions

91

Fig. 5.4 Control performance of balance control

5.5 Discussions This section presents discussions on the robustness and stability of the proposed IT2 FLS.

5.5.1 Robustness of the IT2 FLS The IT2 FLS was more robust than the T1 FLS, which can be found in [17, 39–42]. Also, our real-world experiments were consistent with this conclusion, referring to Chap. 6 of this book. But why IT2 FLSs are more robust? The reason was initially investigated in [43] and then in more details in [37]. We summarize their results here for the completeness of this chapter. Several researchers [17, 39, 41, 42] have shown that an IT2 FLS can give a smoother control surface than its T1 counterpart, especially in the region around the steady state; for a proportional-integral (PI) controller, this means that both the error and the change of error approach 0. As a result, small disturbances around the steady state will not result in significant control signal changes and thus minimize the amount of oscillations. Wu and Tan [39, 42] made use of this property to design simplified IT2 FLSs, where IT2 FSs are only used for the region around 0 in each input domain, and T1 FSs are used in other regions. This simplified IT2 FLS preserves the robustness of traditional IT2 FLSs, with significantly reduced computational cost.

92

5 Interval Type-2 Fuzzy Logic Control of Mobile …

Wu and Tan [37, 43] then mathematically showed that when the baseline T1 FLS implements a linear PI controller and the IT2 FSs of the IT2 FLS are obtained from symmetrical perturbations of the T1 FSs, the resulting IT2 FLS implements a variable gain PI controller around the steady state. These gains are smaller than the original PI gains of the baseline T1 FLS, especially around the steady state. As a result, the IT2 FLS has a smoother control surface around the steady state. The PI gains of the IT2 FLS also change with the inputs, which cannot be achieved by the baseline T1 FLS. However, all above analyses focused on IT2 FLSs using the Karnik–Mendel typereducer. In this book, we used the Nie–Tan and Begian–Melek–Mendel type-reducers for their simplicity. The robustness of IT2 FLSs using the Begian–Melek–Mendel type-reducer has been studied in [3]. It concluded that both T1 and IT2 FLSs can be designed to achieve robust behavior in various applications. However, IT2 FLSs have a more flexible structure and exhibit relatively small approximation errors in several examples in [3]. In this book, we coupled several IT2 FLSs together, which makes a comprehensive robustness analysis more challenging. Nevertheless, this will be one of our future research directions.

5.5.2 Stability of the IT2 FLS To facilitate the stability analysis of IT2 FLSs, Biglarbegian, Melek, and Mendel [2] proposed an inference mechanism which was formulated in closed form and hence does not require the iterative Karnik–Mendel algorithms [25]. By using their inference mechanism, LMI stability conditions for IT2 TSK FLSs and IT2 TS FLSs were derived and transformed into the standard formats that can be easily solved using software tools such as the MATLAB LMI toolbox. Further, Jafarzadeh et al. [15, 16] obtained stability conditions for general type-2 TSK FLSs. Unlike results using a common Lyapunov function, their results do not require the stability of all consequents for stability investigation. In this book, we proved the stability of IT2 TS FLSs in a different way. By using the Nie–Tan method, the defuzzified output of the IT2 FLS can be described by (5.4), which has the same structure as the T1 FLS studied in [14, 33]. Therefore, the related stability conditions of T1 FLS can be easily applied in our IT2 FLS case.

5.6 Conclusion This chapter presents an integrated interval type-2 fuzzy logic approach that simultaneously models and controls an underactuated MWIP system, which suffers from modeling uncertainties and external disturbances. The control objective is to attain the desired position and direction while keeping the MWIP balanced. The proposed method includes four interval type-2 fuzzy logic systems (IT2 FLSs): the first IT2

5.6 Conclusion

93

FLS describes the dynamics of the MWIP using a Takagi–Sugeno model. The second one maintains the balance of the MWIP by using an additional Takagi–Sugeno model. The third and fourth IT2 FLSs achieve the position and direction control, respectively, using a Mamdani model. A linear matrix inequality is also constructed to guarantee the stability of the closed-loop system. Simulations are conducted, and the results indicate the effectiveness of the proposed method. Additionally, the proposed approach is compared with a type-1 FLS in real-world experiments in the experimental results chapter, referring to Chap. 6.

References 1. Benjamas, P., & Phichitphon, C. (2014). Self-balancing iBOT-like wheelchair based on type-1 and interval type-2 fuzzy control. In Proceeding of 11th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTICON), Nakhon Ratchasima, Thailand, 2014, pp. 1–6. 2. Biglarbegian, M., Melek, W., & Mendel, J. (2010). On the stability of interval type-2 TSK fuzzy logic control systems, IEEE Trans. Syst. Man Cybern.CB, 41(5), 798–818. 3. Biglarbegian, M., Melek, W., & Mendel, J. (2011). On the robustness of type-1 and interval type-2 fuzzy logic systems in modeling. Information Sciences, 181(7), 1325–1347. 4. Castillo, O., & Melin, P. (2008). Type-2 fuzzy logic theory and applications. Springer-Verlag. 5. Cervantes, L., & Castillo, O. (2015). Type-2 fuzzy logic aggregation of multiple fuzzy controllers for airplane flight control. Information Sciences, 324, 247–256. 6. Chiu, C. (2010). The design and implementation of a wheeled inverted pendulum using an adaptive output recurrent cerebellar model articulation controller. IEEE Transactions on Industrial Electronics, 57(5), 1814–1822. 7. Dai, F., Gao, X., & Jiang, S. (2015). A two-wheeled inverted pendulum robot with friction compensation. Mechatronics, 30, 116–125. 8. Grasser, F., & DArrigo, A., Colombi, S., & Rufer, A. (2002). JOE: A mobile, inverted pendulum. IEEE Transactions on Industrial Electronics, 49(1), 107–114. 9. Ha, Y., & Yuta, S. (1996). Trajectory tracking control for navigation of the inverse pendulum type self-contained mobile robot. Robotics and Autonomous Systems, 17(1/2), 65–80. 10. Hagras, H. (2007). Type-2 FLCs: A new generation of fuzzy controllers. IEEE Computational Intelligence Magazine, 2(1), 30–43. 11. Hellendoorn, H., & Palm, R. (1994). Fuzzy system technologies at Siemens R&D. Fuzzy Sets and Systems, 63(3), 245–269. 12. Huang, C., Wang, W., & Chiu, C. (2011). Design and implementation of fuzzy control on a two-wheel inverted pendulum. IEEE Transactions on Industrial Electronics, 58(7), 2988–3001. 13. Huang, J., Fukuda, T., & Matsuno, T. (2013). Modeling and velocity control for a novel narrow vehicle based on mobile wheeled inverted pendulum. IEEE Transactions on Control Systems Technology, 21(5), 1607–1617. 14. Huang, J., Ri, S., Liu, L., Wang, Y., Kim, J., & Pak, G. (2015). Nonlinear disturbance observerbased dynamic surface control of mobile wheeled inverted pendulum. IEEE Transactions on Control Systems Technology, 23(6), 2400–2407. 15. Jafarzadeh, S., Fadali, S., & Sonbol, A. (2011). Stability analysis and control of discrete type-1 and type-2 TSK fuzzy systems: Part I stability analysis. IEEE Transactions on Fuzzy Systems, 19(6), 989–1000. 16. Jafarzadeh, S., Fadali, S., & Sonbol, A. (2011). Stability analysis and control of discrete type-1 and type-2 TSK fuzzy systems: Part II control design. IEEE Transactions on Fuzzy Systems, 19(6), 1001–1013.

94

5 Interval Type-2 Fuzzy Logic Control of Mobile …

17. Jammeh, E. A., Fleury, M., Wagner, C., Hagras, H., & Ghanbari, M. (2009). Interval type-2 fuzzy logic congestion control for video streaming across IP networks. IEEE Transactions on Fuzzy Systems, 17(5), 1123–1142. 18. Kim, E., & Lee, H. (2000). New approaches to relaxed quadratic stability condition of fuzzy control systems. IEEE Transactions on Fuzzy Systems, 8(5), 523–534. 19. Lee, H., & Jung, S. (2012). Balancing and navigation control of a mobile inverted pendulum robot using sensor fusion of low cost sensors. Mechatronics, 22(1), 95–105. 20. Li, Z., & Luo, J. (2009). Adaptive robust dynamic balance and motion controls of mobile wheeled inverted pendulums. IEEE Transactions on Control Systems Technology, 17(1), 233– 241. 21. Liang, Q., Karnik, N. N., & Mendel, J. M. (2000). Connection admission control in ATM networks using survey-based type-2 fuzzy logic systems. EEE Transactions on Systems, Man, and Cybernetics, 30(3), 329–339. 22. Liang, Q., & Mendel, J. M. (2000). Equalization of nonlinear time-varying channels using type-2 fuzzy adaptive filters. IEEE Transactions on Fuzzy Systems, 8(5), 551–563. 23. Melin, P., Astudillo, L., Castillo, O., Valdez, F., & Garcia, M. (2013). Optimal design of type-2 and type-1 fuzzy tracking controllers for autonomous mobile robots under perturbed torques using a new chemical optimization paradigm. Expert Systems with Applications, 40(8), 3185– 3195. 24. Melin, P., Mendoza, O., & Castillo, O. (2001). Face recognition with an improved interval type2 fuzzy logic Sugeno integral and modular neural networks. IEEE Transactions on Systems, Man, and Cybernetics, 41(5), 1001–1012. 25. Mendel, J. M. (2001). Uncertain rule-based fuzzy logic systems: Introduction and new directions. Prentice-Hall. 26. Mendel, J. M., John, R. I., & Liu, F. (2006). Interval type-2 fuzzy logic systems made simple. IEEE Transactions on Fuzzy Systems, 14(6), 808–821. 27. Mohammad, E., & Ahmad, M. (2014). Interval type-2 fuzzy PID controller for uncertain nonlinear inverted pendulum system. ISA Transactions, 53, 732–743. 28. Muhammad, M., Buyamin, S., Ahmad, M., & Nawawi, S. (2013). Takagi-Sugeno fuzzy modeling of a two-wheeled inverted pendulum robot. Journal of Intelligent and Fuzzy Systems, 25, 535–546. 29. Nie, M., & Tan, W. W. (2008). Towards an efficient type-reduction method for interval type-2 fuzzy logic systems. In Proceedings of IEEE International Conference on Fuzzy Systems (pp. 1425–1432). Hong Kong. 30. Palm, R. (1992). Sliding mode fuzzy control. In Proceedings of IEEE International Conference on Fuzzy Systems (pp. 519–526). San Diego, CA, USA. 31. Pathak, K., Franch, J., & Agrawal, S. (2005). Velocity and position control of a wheeled inverted pendulum by partial feedback linearization. IEEE Transactions on Robotics, 21(3), 505–513. 32. Ri, S., Huang, J., Wang, Y., Kim, M., & An, S. (2014). Terminal sliding mode control of mobile wheeled inverted pendulum system with nonlinear disturbance observer. Mathematical Problems in Engineering, 2014. Art. No. 284216. 33. Salerno, A., & Angeles, J. (2007). A new family of two-wheeled mobile robots: Modeling and controllability. IEEE Transactions on Robotics, 23(1), 169–173. 34. Sanchez, M. A., Castillo, O., & Castro, J. R. (2015). Generalized type-2 fuzzy systems for controlling a mobile robot and a performance comparison with interval type-2 and type-1 fuzzy systems. Expert Systems with Applications, 42(14), 5904–5914. 35. Tai, K., El-Sayed, A.-R., Biglarbegian, M., Gonzalez, C. I., Castillo, O., & Mahmud, S. (2016). Review of recent type-2 fuzzy controller applications. Algorithms, 9(2), 39. 36. Tseng, C., Chen, B., & Uang, H. (2001). Fuzzy tracking control design for nonlinear dynamic systems via T-S fuzzy model. IEEE Transactions on Fuzzy Systems, 9(3), 381–392. 37. Wu, D. (2012). On the fundamental differences between interval type-2 and type-1 fuzzy logic controllers. IEEE Transactions on Fuzzy Systems, 20(5), 832–848. 38. Wu, D. (2013). Approaches for reducing the computational cost of interval type-2 fuzzy logic systems: Overview and comparisons. IEEE Transactions on Fuzzy Systems, 21(1), 80–99.

References

95

39. Wu, D., & Tan, W. W. (2004). A simplified architecture for type-2 FLSs and its application to nonlinear control (pp. 485–490). In Proceedings of IEEE Conference on Cybernetics and Intelligent Systems. Singapore. 40. Wu, D., & Tan, W. W. (2004). A type-2 fuzzy logic controller for the liquid-level process, Proceedings of IEEE International Conference on Fuzzy Systems (vol. 2, pp. 953-958), Budapest, Hungary. 41. Wu, D., & Tan, W. W. (2006). Genetic learning and performance evaluation of type-2 fuzzy logic controllers. Engineering Applications of Artificial Intelligence, 19(8), 829–841. 42. Wu, D., & Tan, W. W. (2006). A simplied type-2 fuzzy controller for real-time control. ISA Transactions, 15(4), 503–516. 43. Wu, D., & Tan, W. W. (2010). Interval type-2 fuzzy PI controllers: Why they are more robust. In Proceedings of IEEE IEEE International Conference on Granular Computing (pp. 802–807), San Jose, CA, USA. 44. Xu, J., Guo, Z., & Lee, T. (2013). Design and implementation of a Takagi-Sugeno-type fuzzy logic controller on a two-wheeled mobile robot. IEEE Transactions on Industrial Electronics, 60(12), 5717–5728.

Chapter 6

Experiments of Controlling Real Mobile Wheeled Inverted Pendulums

6.1 Experimental Setup The physical MWIP system of the experiment is shown in Figs. 6.1 and 6.2. Figure 6.1 shows the nominal system, on which the system parameters calibration and controller design are based. The system shown in Fig. 6.2 adds a layer of plates to the system in Fig. 6.1, which is used to increase the uncertainty of the system and thus verify the robustness of the algorithm. The hardware of the system is comprised of a main control circuit board (LM3S2965, Texas Instruments), an accelerometer, a three-axis gyro, and two encoders. The angle information is provided by the accelerometer and gyroscope, and the speed information is provided by the encoder. All the information is sent to the main control board, in which the information is processed, then the control algorithm is completed to generate the control signal. The control signal modulates a pulse signal of a certain width to control the motor speed after each sampling. The sampling period is set as 5 ms. In this section, the effectiveness of the proposed controller will be verified by experiments, including high-order disturbance observer-based sliding mode control, adaptive super-twisting control, and interval type-2 fuzzy logic control. The real parameters and nominal parameters of the MWIP system are shown in Tables 6.1 and 6.2. It is worth noting that the dynamic model of the MWIP system is established based on real parameters (Table 6.1), while the design of the controller is based on nominal parameters (Table 6.2).

© Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_6

97

98

6 Experiments of Controlling Real Mobile Wheeled Inverted …

Fig. 6.1 Nominal MWIP system

Fig. 6.2 MWIP system with model uncertainties

Table 6.1 Real parameters of the MWIP system Parameter Value Parameter mb Iby Ibz Iwa Iwd Dw

2.58 [Kg] 1.77 × 10−3 [Kg· m2 ] 1.77 × 10−3 [Kg· m2 ] 1.4 × 10−4 [Kg· m2 ] 8.4 × 10−4 [Kg· m2 ] 0.8 [N · s/m]

mw l b r Db

Value 0.14 [Kg] 0.0622 [m] 0.15 [m] 0.04 [m] 0.5 [N· s/m]

6.2 Experimental Results

99

Table 6.2 Nominal parameters of the MWIP system Parameter Value Parameter mˆ b Iˆby Iˆbz Iˆwa Iˆwd Dˆ w

2.50 [Kg] 1.57 × 10−3 [Kg· m2 ] 1.57 × 10−3 [Kg· m2 ] 1.2 × 10−4 [Kg· m2 ] 8.1 × 10−4 [Kg· m2 ] 0.6 [N·s/m]

mˆ w lˆ bˆ rˆ Dˆ b

Value 0.12 [Kg] 0.0582 [m] 0.14 [m] 0.03 [m] 0.4 [N· s/m]

6.2 Experimental Results 6.2.1 Experimental Results of High-Order Disturbance Observer-Based Sliding Mode Control The whole experimental process can be divided into two parts: the balance control and the speed control. In the balance control experiments, two cases (Case 1 and Case 2) were considered. The MWIP system used in Case 1 was shown in Fig. 6.1, and its physical parameters were presented in Table 6.1. The controllers were designed based on these parameters, i.e., Case 1 was regarded as the nominal case. Case 2 was designed to further verify the robustness of the proposed controller, and more model uncertainties were introduced. In the Case 2, a mass adjustable pan of 0.5 Kg and four length-adjustable rods of 0.1 m were added to increase the model uncertainties of the system, as shown in Fig. 6.2, while using the same controller and parameters as in Case 1. In the speed control experiments, except for Case 1 and Case 2, a special case (Case 3) was added, in which the MWIP was controlled to cross an artificial obstacle (a small stick) with model uncertainties simultaneously (see Fig. 6.3). In each experiment, the basic SMC, the first-order DO-based SMC (DO1SMC), and the fourth-order DO-based SMC (DO4SMC) were used to illustrate the advantages of proposed HODOSMC strategy. The parameters of the controllers were given in Table 6.3. Fig. 6.3 MWIP system crosses a stick obstacle

100

6 Experiments of Controlling Real Mobile Wheeled Inverted …

Table 6.3 Parameters of controllers Parameter SMC λ1 λ2 λ3 λ4 γ1 , γ2 d¯1 , d¯2 , d¯3 K1 K2

3 0.01 0.1 3 1 20 25 21

DO1SMC

DO4SMC

3 0.01 0.1 3 1 13 17.3 14

3 0.01 0.1 3 1 3 6.3 4

• Balance Control In these experiments, the MWIP was expected to restore the upright position from a large initial angle and maintain the balance on the flat ground. This means that the desired speed and inclination angle should be set as 0. The initial conditions of the system were chosen as: ⎧ ⎨ q1 (0) = 0, q˙1 (0) = 0 q2 (0) = π/18(rad), q˙2 (0) = 0 ⎩ q3 (0) = 0, q˙3 (0) = 0 * Case 1 The results of the experiments were shown in Fig. 6.4, which presents the comparisons of inclination angle and speed by employing SMC, DO1SMC, and DO4SMC. It is shown that all the control algorithms can balance the MWIP from a certain initial inclination angle with the same parameters of the sliding surface. Only the switching coefficients K 1 and K 2 are different. As we know, for the SMC strategy, large values of the switching coefficients can keep the states of the system sliding on the sliding surface. In these experiments, as the order of disturbance observer increases, the switching coefficients K 1 and K 2 of the basic SMC, DO1SMC, DO4SMC will decrease, as shown in Table 6.3. The reason is that when the smaller switching coefficients were applied, the basic SMC and DO1SMC cannot guarantee the states of the system to stay on the sliding surface, which leads to the instability of the MWIP system, whereas large values of switching coefficients will cause severe chattering phenomenon which can be observed clearly. Moreover, the motors produced a lot of noises due to the severe chattering. Finally, due to the substitution of the saturation for the sign function, the chattering decreases to some extent. However, this inevitably leads to slow adjustment, which can be observed clearly from the perspective of the control input, referring to the results of SMC control strategy in Fig. 6.4. Compared with the DO1SMC, the chattering phenomenon of the DO4SMC was weaker, and the performance of equilibrium was better than the DO1SMC even with the smallest value of switching coefficients among the three algorithms. Based on the above

0.1 0.05 0 -0.05

Torque [N.m]

Speed [rad/s]

Angle [rad]

6.2 Experimental Results

6 4 2 0 -2 -4

101 SMC DO1SMC DO4SMC

0

20

40

60

80

100

0

20

40

60

80

100

0

20

40

60

80

100

1 0 -1

Time [0.1s]

Fig. 6.4 Balance control of Case 1 (nominal case)

analysis, it indicates that the higher-order DO-based SMC can both guarantee the control performance and reduce the chattering phenomenon at the same time. * Case 2 To demonstrate the robustness of the proposed controllers, we conducted the experiments with model uncertainties. The control performances of SMC, DO1SMC, and DO4SMC for the MWIP system were depicted in Fig. 6.5. It turns out that the MWIP can overcome the disturbances and keep a steady state on the flat ground while applying all the three control strategies. Meanwhile, the control performances were different. The MWIP system with model uncertainties vibrated more seriously compared with the previous experiments, whereas from Fig. 6.5, it still can be observed that the MWIP system behaved best when using the DO4SMC among the three control strategies, which indicates that the higher-order DO is more robust to disturbances. Also, we plotted the control input torque. The frequency and amplitude of control input signals perfectly explained this phenomenon and provide further support for our conclusion. More quantitatively, we use the root mean square (RMS) equation D(xi ) for each control algorithm to show more evidence about the advantages of the DO4SMC. Here, we mainly compare the steady-state phase from the 2 s to the 10 s:

D(xi ) =

  1000   2   n=201 (xi (n)) 800

6 Experiments of Controlling Real Mobile Wheeled Inverted …

Torque [N.m]

Speed [rad/s]

Angle [rad]

102

SMC DO1SMC DO4SMC

0.3 0.2 0.1 0 0

20

40

60

80

100

0

20

40

60

80

100

0

20

40

60

80

100

5 0 -5

1 0 -1

Time [0.1s]

Fig. 6.5 Balance control of Case 2 (with model uncertainties) Table 6.4 RMS errors in balance control D(xi ) SMC Inclination angle (x1 ) in Case 1 Inclination angle (x1 ) in Case 2 Speed error (x3 ) in Case 1 Speed error (x3 ) in Case 2

0.0216 0.0257 1.3240 1.8414

DO1SMC

DO4SMC

0.0156 0.0158 0.8442 0.9886

0.0055 0.0079 0.5113 0.6157

where n denotes the index of the data record (here the data record period is 10 ms). xi (i = 1, 3) respectively represent the inclination angle and the error of speed. Table 6.4 demonstrates the RMS of inclination angles and speeds in both Case 1 and Case 2. It is clear that the DO4SMC attains the minimum errors of RMS. This comes to the same conclusion that the control performance can be significantly improved with higher-order DO-based SMC. • Speed Control In these experiments, the MWIP was supposed to move at a constant speed which was set as q˙1d = −7 rad/s. The initial conditions and the parameters were the same as the previous experiments. * Case 1 Firstly, without considering the disturbances, we conducted the speed control experiments using three control algorithms for comparisons. The results of the inclination angle (q2 ), the speed (q˙1 ), and control input torque (τ ) are given in Fig. 6.6, respectively.

Angle [rad]

6.2 Experimental Results

103 SMC DO1SMC DO4SMC

0.1 0 -0.1 0

20

40

60

80

100

0

20

40

60

80

100

0

20

40

60

80

100

10 0 -10

Torque [N.m]

Speed [rad/s]

-0.2

1 0 -1 Time [0.1s]

Fig. 6.6 Speed control of Case 1 (nominal case)

From Fig. 6.6, it can be seen that, when the MWIP moves at a nonzero speed steadily, the inclination angle keeps at an uncertain nonzero value as well. This is

T

T consistent with the equilibrium point x∗ = x1∗ x2∗ x3∗ = q2∗ 0 0 , where q2∗ is an uncertain value. It can also be seen that after a period of adjustment, the MWIP reached the closest to the desired speed, and the chattering phenomenon was the weakest as well by using the DO4SMC. This means that when the higher-order DO-based SMC is applied, the tracking accuracy of the system is higher, and the chattering phenomenon is weaker. This proves that the DO4SMC is the most effective control method among the three controllers in the speed control as well. *Case 2 We conducted the speed control experiments with large model uncertainties that had been explained in the previous experiment. The desired speed was also set as q˙1d = −7 rad/s. Figure 6.7 presents the results of the inclination angle, speed, and control input torque of the system with model uncertainties, respectively. Although the chattering of inclination angle and velocity were significantly severer than that of the nominal case, the system was the least affected while using the DO4SMC. This definitely indicates that the DO4SMC is the most robust to disturbances. For the speed control, it is of great significance to maintain the speed at the desired value. Thus, we compared the RMS of speeds in both Case 1 and Case 2 to illustrate the robustness of these three algorithms in speed control. The results are given in Table 6.5. It can be seen that the RMS of DO4SMC is the smallest in both cases,

6 Experiments of Controlling Real Mobile Wheeled Inverted …

Angle [rad]

104

SMC DO1SMC DO4SMC

0.1 0 -0.1 0

20

40

60

80

100

0

20

40

60

80

100

0

20

40 60 Time [0.1s]

80

100

10 0 -10 -20

Torque [N.m]

Speed [rad/s]

-0.2

1 0 -1

Fig. 6.7 Speed control of Case 2 (with model uncertainties) Table 6.5 RMS errors in speed control D(xi ) SMC Speed error (x3 ) in Case 1 Speed error (x3 ) in Case 2

1.4640 1.6085

DO1SMC

DO4SMC

0.9974 1.2081

0.7353 0.9144

followed by DO1SMC and the basic SMC. Therefore, the higher-order DO-based SMC can give rise to better control performance of the MWIP system. * Case 3 Obstacle crossing is a common situation for mobile robots; thus, we added this special case to further demonstrate the robustness of the proposed controllers. The desired speed was also set as −7 rad/s. When the MWIP crosses the stick, a transient response of speed will occur, which is shown in Fig. 6.8 (starting from around 60 × 0.1 [s]). It turns out that the MWIP can cross the obstacle and recover to the steady state as the feedback loop is activated while applying the three control strategies. When the MWIP crossed the stick, the inclination angle deviated from the equilibrium point and the speed changed suddenly. As DO4SMC is applied, the MWIP was minimally affected in the inclination and speed and could restore to the steady state quickly. Here, we suppose that the steady state has been reached when the actual velocity falls within (−9 rad/s, −5 rad/s) considering the strong uncertainties. In Fig. 6.8, the settling time for each control strategy is indicated by a double arrow. Also, we compare the settling time of the three control strategies quantitatively in Table 6.6.

105 SMC DO1SMC DO4SMC

0.2 0 -0.2 -0.4 40 20

Speed [rad/s]

Angle [rad]

6.2 Experimental Results

50

60

70

80

90

100

Settling time

0 -20

Torque [N.m]

40

50

60

50

60

70

80

90

100

70

80

90

100

2 0 -2 -4 40

Time [0.1s] Fig. 6.8 Speed control of Case 3 Table 6.6 Settling time in speed control Control strategy SMC Settling time(s)

1.74

DO1SMC

DO4SMC

0.86

0.19

Based on the comparison, it can be concluded that the DO4SMC is the most robust to model uncertainties and external disturbances among the three control strategies.

6.2.2 Experimental Results of Adaptive Super-Twisting Control In this subsection, the effectiveness of the proposed adaptive STA (ASTA) controller will be verified by experiments, and the control framework is shown in Fig. 4.1. The adaptive SMC (ASMC) with the same adaptive law is compared with the ASTA to highlight the advantages of the proposed method. The real parameters and nominal parameters of the MWIP system are shown in Tables 6.1 and 6.2. These two sets of different parameters are used to verify the robustness of the proposed algorithm. It is well known that maintaining balance is a basic requirement for the naturally unstable MWIP system. Owing to this, we just consider the experiment on balance control. The control goal is to adjust the MWIP system from an initial state with a certain inclination angle error to the upright state and then maintain the upright state

106

6 Experiments of Controlling Real Mobile Wheeled Inverted …

on flat ground. This means that the desired inclination angle, speed, and yaw angle should be set as zero. Thus, the sliding surface can be simplified and rewritten as

σ1 σ = σ2





q˙2 + λ1 q2 + λ2 q˙1 = . q˙3 + λ3 q3

The whole experiment is divided into two cases, one of which is the nominal case, and the other adds uncertainties to the system. The corresponding MWIP systems under these two cases are shown in Figs. 6.1 and 6.2, respectively. For the sake of fairness, we preset the same initial conditions for each experimental scenario. The initial condition is set as ⎧ ⎨ q1 (0) = 0, q˙1 (0) = 0 q2 (0) = −π/18 (rad) , q˙2 (0) = 0 . ⎩ q3 (0) = 0, q˙3 (0) = 0 In addition, the two control techniques, adaptive SMC and adaptive STA, are based on the same sliding surface and control parameters. They are selected as follows: λ1 = 10, λ2 = 0.3, λ3 = 3,

(6.1)

K 1 = 10, K 2 = 10, 1 = 5, 2 = 5.

(6.2)

According to the values defined in (6.1) and Table 6.2, the denominator term g2 + λ2 g1 will always be non-negative during the experimental process, which means the design of the controller is feasible. • Case 1: Regardless of disturbances In this case, no additional disturbances are considered. The experimental system in this case is shown in Fig. 6.1. The experimental results of the adaptive STA and adaptive SMC are illustrated in Figs. 6.9, 6.10, 6.11, and 6.12. Figure 6.9 compares the inclination angle of the MWIP system by employing the adaptive SMC and adaptive STA, and Fig. 6.10 depicts the value of the sliding surface. One can conclude from the above observation that both strategies can balance the MWIP system effectively. It can be seen from Fig. 6.9 that the variation in the inclination is obviously large when the adaptive SMC algorithm is employed, while the inclination angle is relatively stable and stays near zero when the adaptive STA algorithm is applied. From the perspective of the sliding surface, as shown in Fig. 6.10, both the adaptive SMC and adaptive STA can drive the system’s states to slide on the sliding surface. Moreover, the adaptive STA effectively suppressed the occurrence of chattering better than the adaptive SMC. Figure 6.11 shows the variations in the adaptive coefficients of the adaptive SMC and the adaptive STA, respectively. It can be seen that the adaptive coefficient changes greatly at the initial stage, and its rate of change gradually decreases until it reaches a suitable value, which indicates that the parameters are sufficient to stabilize the

6.2 Experimental Results

107

0.1

ASMC ASTA

Angle [rad]

0.05

0

-0.05

-0.1

0

20

40

60

80

100

Time [0.1s]

Fig. 6.9 Comparison of the angles in Case 1 2

ASMC ASTA

1.5 1

S

0.5 0 -0.5 -1 -1.5 -2

0

20

40

60

80

100

Time [0.1s] Fig. 6.10 Comparison of the sliding mode variables in Case 1

system. Additionally, we plotted the control torque in Fig. 6.12. The control torque of the adaptive STA turns out to have a smaller amplitude and lower frequency than that of the adaptive SMC. The experimental results prove that it is effective to turn discontinuous control into continuous control by hiding the high-frequency switch as the second derivative

108

6 Experiments of Controlling Real Mobile Wheeled Inverted … 50

ASMC ASTA

40

gain

30

20

10

0

0

20

40

60

80

100

Time [0.1s] Fig. 6.11 Comparison of the adaptive gains in Case 1 0.2

ASMC ASTA

0.15

Torque [N.m]

0.1 0.05 0 -0.05 -0.1 -0.15 -0.2

0

20

40

60

Time [0.1s]

Fig. 6.12 Comparison of the control torque in Case 1

80

100

6.2 Experimental Results

109

Table 6.7 Root mean square (RMS) errors in Case 1 D(xi ) ASMC Angle error (q2 ) Sliding mode variable (S1 )

ASTA

0.0138 0.4184

0.0087 0.3546

of the sliding mode variable. At the same time, adaptive gains are used to precisely learn the disturbance bound. As a result, the chattering caused by excessive gain is significantly reduced. More quantitatively, we compared the RMS errors of the inclination angle and sliding mode variable. We ignored the first two seconds for the adjustment of the adaptive gains and calculated the RMS errors for the next eight seconds:

D(xi ) =

  n=1000   2   n=201 x(n) 800

,

(6.3)

where x = [q2 , S1 ]. The RMS error of the inclination angle indicates the equilibrium performance of the MWIP system, and the RMS of the sliding mode variable is used to describe the chattering degree of the system. The results of the comparison are shown in Table 6.7. • Case 2: Considering the disturbance Since the SMC is insensitive to parameter uncertainties and external disturbances, we need to verify the relevant features of the STA, which is a special form of secondorder SMC. Moreover, we used adaptive gain, whose effects also need to be verified. To this end, we added a pan on the nominal MWIP system to greatly increase the uncertainty of the system. The system is shown in Fig. 6.2, in which the height of the MWIP system is increased by 10 cm and the weight is increased by 0.5 kg. The parameters of the controller remain the same as those in the previous case. The experimental results are shown in Figs. 6.13, 6.14, 6.15, and 6.16. It turns out that the MWIP system can still be balanced on flat ground. The figures show that the stability of the system can be guaranteed despite the increase in external disturbances. Compared with the previous case, the adaptive coefficients obviously increased faster and finally reached a relatively large value. This result is consistent with the fact that large values of the switching gains can keep the states of the system sliding on the sliding surface, but it leads to serious chattering at the same time for the SMC-based strategy. From Fig. 6.14, we can observe that the amplitude of the sliding surface also increases. The inclination angle can still be maintained at zero, as shown in Fig. 6.13. This proves that the adaptive parameters of the algorithm are adjusted effectively according to the disturbance, and the proposed algorithm is robust to large model uncertainties. The control torque shown in Fig. 6.16 concurs with the analysis

110

6 Experiments of Controlling Real Mobile Wheeled Inverted … 0.1

ASMC ASTA

Angle [rad]

0.05

0

-0.05

-0.1

0

20

40

60

80

100

Time [0.1s] Fig. 6.13 Comparison of the angles in Case 2 2.5

ASMC

2

ASTA

1.5 1

S

0.5 0 -0.5 -1 -1.5 -2 -2.5

0

20

40

60

80

100

Time [0.1s] Fig. 6.14 Comparison of the sliding mode variables in Case 2

of other variables, which further supports our conclusion. The comparison of RMS error in this case provides more support for our conclusion, as shown in Table 6.8.

6.2 Experimental Results

111

60

ASMC ASTA

50

gain

40

30

20

10

0

0

20

40

60

80

100

Time [0.1s] Fig. 6.15 Comparison of the adaptive gains in Case 2 0.2

ASMC ASTA

0.15

Torque [N.m]

0.1 0.05 0 -0.05 -0.1 -0.15 -0.2

0

20

40

60

80

Time [0.1s]

Fig. 6.16 Comparison of the control torque in Case 2 Table 6.8 RMS errors in Case 2 D(xi ) Angle error (q2 ) Sliding mode variable (S1 )

ASMC

ASTA

0.0176 0.8317

0.0154 0.4769

100

112

6 Experiments of Controlling Real Mobile Wheeled Inverted …

6.2.3 Experimental Results of Interval Type-2 Fuzzy Logic Control In this section, the performance of the proposed IT2 FLS is compared with that of a T1 FLS on a real MWIP system. The controller design is derived in detail in Chap. 5. Additionally, the control block diagram Fig. 5.3 is employed. In the following experimental scenarios, the initial condition was selected as x0 = [0.48, 0, 0, 0].T Figure 6.17 shows the results from the first experiment, which involved only the balance controller. Observe that the T1 FLS resulted in persistent oscillations, whereas the IT2 FLS was very stable. Figure 6.18 shows the results from the second experiment, which tested the balance and position controllers together. The initial conditions were the same as those in balance control, and the desired position was pd = 0.7. Again, the T1 FLS resulted in persistent oscillations, but the IT2 FLS was very stable. Figure 6.19 shows the results from the third experiment, which included the balance, position, and direction controllers. The initial conditions were the same as those in the previous two experiments. The desired position and direction were pd = 1 and αd = 1.5. Figure 6.20a and b show the sequential pictures taken from this experiment from two different angles. It is found that the T1 FLS resulted in persistent oscillations or steady-state errors, whereas the IT2 FLS was much more stable and accurate. 0.5 θ [rad]

IT2FLC T1FLC 0

−0.5

0

5

10

15

10

15

10

15

time [s]

PWM

0.2

0

−0.2

0

5 time [s]

dψ / dt [rad/s]

10 5 0 −5

0

5 time [s]

Fig. 6.17 Results from Experiment 1: with the balance controller only

6.2 Experimental Results

113

0.6

0.8

θ [rad]

0.4 0.2 0 −0.2

0

5

10

0.6

Distance [m]

IT2FLC T1FLC

0.4 0.2 0

15

0

5

15

10

15

10

15

10

15

0.15 0.1

5

PWM

dψ / dt [rad/s]

10

0.05

0

−5

10 time [s]

time [s]

0

0

5

10

15

−0.05

0

5

time [s]

time [s]

Fig. 6.18 Results from Experiment 2: with the balance and position controllers 0.6

2 IT2FLC T1FLC

1.5 α [rad]

θ [rad]

0.4 0.2 0 −0.2

1 0.5 0

0

5

10

−0.5

15

0

5

time [s]

time [s] 0.15 0.1

1

PWM

Distance [m]

1.5

0.5

0

0.05 0

0

10

5 time [s]

15

−0.05

0

5 time [s]

Fig. 6.19 Results from Experiment 3: with the balance, position, and direction controllers

114

6 Experiments of Controlling Real Mobile Wheeled Inverted …

Fig. 6.20 Experiment pictures taken from a top and b side of the MWIP

6.3 Conclusion

115

In summary, all three experiments showed that, when there were modeling uncertainties, the T1 FLS tended to produce persistent oscillations, whereas the IT2 FLS was much more stable and accurate. In other words, the IT2 FLS was better able to cope with modeling uncertainties.

6.3 Conclusion This chapter presents the experimental studies of the methods shown in the previous chapters on a real MWIP system. These approaches can be categorized as modelbased methods which rely on the dynamics of the MWIP system shown in Chap. 2. For the sake of presentation, this chapter starts with the experimental setup, where the control and sensing units can also be found in Chap. 2. Next are the experimental studies of HODOSMC. The scenarios include equilibrium control and velocity control, where the cases of disturbance rejection and obstacle crossing are presented. The experimental results show that the higher-order DO-based SMC outperforms the lower-order DO-based SMC and the traditional SMC in both the balance and the velocity control scenarios, since the HODO has superior estimation ability for system disturbance. Then, the experimental studies of adaptive super-twisting control show comparative experiments of multiple balance controls for the MWIP system. The results indicate that the adaptive gains can effectively learn the disturbance bound so that the switching coefficients of the sliding surface are relatively small. As a result, the proposed algorithm shows the superior performance of balance control and capacity in chattering reduction. Finally, the effectiveness of an integrated IT2 FLS is verified through real-world experiments. The results showed that the designed IT2 FLS is better able to cope with the modeling uncertainties than its T1 counterpart and performed better on the actual plant.

Chapter 7

Conclusion

This book presents the achievements of the author’s team in the research of a special underactuated system called mobile wheeled inverted pendulum (MWIP) over recent years. Note that this book focuses on the combination of theory and practice, and almost all algorithms are verified on the real MWIP system. Taking the dynamic modeling, control, and simulation as the mainline, this book first introduces the particularity, control challenges, and applications of the MWIP system. Then, Lagrange function is adopted to model the dynamics of two-dimensional and three-dimensional MWIP systems. Based on the special characteristics of the MWIPs dynamics, a new high-order disturbance observer is designed, and a control strategy is proposed by combining the high-order disturbance observer with a novel design of sliding mode manifold. Furthermore, several methods, aiming at overcoming the chattering problem of the traditional sliding mode control, are presented in detail. Besides, some intelligent algorithms related to the interval type-2 fuzzy logic control are applied to the MWIP system. Finally, the future development of underactuated robot has prospected. This book is intended for researchers and engineers in the field of robotics and control. It can also be used as supplementary reading for nonlinear systems theory at the graduate level. The in-depth theory and detailed platform construction provide a great convenience for readers to build their own platforms and learn the knowledge they need.

© Huazhong University of Science and Technology Press 2023 J. Huang et al., Robust and Intelligent Control of a Typical Underactuated Robot, Research on Intelligent Manufacturing, https://doi.org/10.1007/978-981-19-7157-0_7

117