I N T E L L I G E N T M O D E L P R E D I C T I V E C O N T R O L OF F L E X I B L E L I N K ROBOTIC MANIPULATORS by TAO F A N B. Eng., Xian Jiaotong University, 1991 M.A.Sc., The University of British Columbia, 2003 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES (Mechanical Engineering) THE UNIVERSITY OF BRITISH COLUMBIA May 2007 © Tao Fan, 2007 Abstract This thesis develops and evaluates an intelligent model predictive control (LMPC) strategy for motion control of a flexible link robotic manipulator through analysis, computer simulation, and physical experimentation. The developed LMPC is based on a two-level hierarchical control architecture. This control structure is used to combine the advantages of the conventional model predictive control (MPC) with those of knowledge-based soft control techniques. The upper level of the structure is a fuzzy-rule based intelligent decision-making system. The lower level consists of two modules: a real-time system identification module (which adjusts the model parameters and accommodates payload changes of the manipulator), and a model predictive control (MPC) module (which develops control inputs based on the linear model generated by the system identification module). The upper-level intelligent fuzzy rule-based tuner interacts with the lower level modules. Based on the desired system performance, the state feedback signals, and the knowledge base, the upper-level fuzzy tuner automatically adjusts the tuning parameters of the M P C controller. It is also able to adjust the model structure of the systemidentification module, if necessary, to accommodate large model errors, and will increase the robustness of the controller. An explicit, complete, and accurate nonlinear dynamic model of the system is developed using the assumed mode method. More realistic boundary conditions, which represent the balance of moments and shear forces separately, at the ends of each link, are used for the dynamic model development of the system. A computationally efficient multi-stage M P C algorithm with guaranteed stability is developed as well. This algorithm is used by the MPC module to enable real-time implementation of the overall scheme. A fuzzy knowledge base for tuning the M P C controller is developed based on analysis, computer simulations and experimental testing of the prototype flexible-link manipulator system (FLMS). A fuzzy tuner is designed based on this fuzzy knowledge base. The performance of the developed TMPC scheme is evaluated using computer simulations and experiments of the prototype FLMS. The results show that LMPC can more effectively control the motion of a flexible link robot manipulator when compared with conventional M P C . 11 Table of Contents Abstract , ii Table of Contents iii List of Tables vi List of Figures viii Nomenclature xiii Acknowledgments xviii Chapter 1 Introduction 1 1.1 Goals of the Research 1 1.2 Motivation 3 1.3 Related Work 7 1.3.1 Model Predictive Control 7 1.3.2 Controller Tuning 9 1.3.3 Control of Flexible Link Robotic Manipulators 1.4 Organization of the Thesis Chapter 2 Manipulator Model 10 14 16 2.1 Kinematics 17 2.2 Flexible Link Model 21 2.3 2.4 2.2.1 Flexible Beam Equation 21 2.2.2 Boundary Conditions 22 2.2.3 Solution of the Flexible Beam Equation 24 2.2.4 The Assumed Mode Method 28 Derivation of Equations of Motion 37 2.3.1 Closed-form /i-link Model 37 2.3.2 Single-link Model 41 2.3.3 Two-link Model 46 Linearization of the Equations of Motion 51 iii 2.5 Non-minimum Phase Characteristic 54 2.6 Summary 62 Chapter 3 Intelligent Model Predictive Control 64 3.1 The Overall Structure of IMPC 64 3.2 MPC Controller Design 65 3.2.1 Basic Principles of MPC 66 3.2.2 State-space Model MPC Formulation 69 3.2.3 Prediction 71 3.2.4 MPC Computation and Constraint Handling 77 3.2.5 Stability Analysis 83 3.3 System Identification for Unknown Payload 88 3.4 Fuzzy Rule-Based Auto-Tuning 90 3.5 3.4.1 Effects of the Tuning Parameters 91 3.4.2 Fuzzy Inference System 96 3.4.3 Overall Scheme of the Fuzzy Tuner Summary Chapter 4 Control of a Single-link Flexible Manipulator 4.1 Dynamic Model 104 108 109 109 4.1.1 Flexible Modes 109 4.1.2 Nonlinearity 114 4.1.3 Effects of Payload 118 4.2 MPC Controller 121 4.3 Payload Identification 127 4.4 Fuzzy Tuner 131 4.5 Computer Simulations of LMPC 133 4.6 Summary 139 Chapter 5 Control of a Two-link Flexible Manipulator 141 5.1 Internal Model 141 5.2 LMPC Controller Design 142 5.3 Computer Simulations of LMPC 144 5.4 Summary 154 iv Chapter 6 6.1 Experiments with Flexible-link Manipulator 155 The Experimental Test Bed 155 6.1.1 Actuation Subsystem 158 6.1.2 Measurement Subsystem 160 6.1.3 Data Acquisition Subsystem 163 6.1.4 Software Design 167. 6.1.5 Operations of the Overall System 175 6.2 Experimental Results 175 6.3 Summary 180 Chapter 7 Conclusion 181 7.1 Primary Contributions 181 7.2 Recommendations for Future Research 182 Bibliography 184 Appendix A Dynamic Models 192 A.l Single-link Flexible Manipulator Model 192 A. 1.1 Nonlinear Model 192 A. 1.2 Continuous-time State-space Model 193 A. 1.3 Discrete-time State-space Model 194 A. 2 Two-link Flexible Manipulator Model 195 Appendix B Assembling of the Prototype FLMS 203 B. l Mechanical Assembling of the F L M S B. 2 Electrical Wiring of the FLMS Appendix C Installation Guide for Motion Control Interface Card Hardware C. l Jumper and Connector Locations C.2 Connections 203 205 206 206 207 v List of Tables 2.1 Parameters of the links 32 2.2 First four modes of link 1 33 2.3 First four modes of link 2. 33 3.1 Adjustable controller parameters 96 3.2 General linguistic rules for tuning an MPC controller 101 4.1 M P C controller parameters 123 4.2 Effects of the MPC tuning parameters 132 4.3 Rule base of the FIS 132 4.4 Predetermined parameters of MPC controller for the single-link manipulator . . . 134 4.5 Tuning parameters of M P C controller for the single-link manipulator 134 5.1 Predetermined parameters for the M P C controller of the two-link manipulator . . . 147 5.2 Tuning parameters for the MPC controller of the two-link manipulator 148 6.1 FLMS system components 157 6.2 Specifications of the harmonic-drive motors 159 6.3 Specifications of the P W M amplifiers 160 6.4 Specifications of the D C power supply 160 6.5 Specifications of the load cell 161 6.6 Specifications of the force sensor signal conditioner 162 6.7 Parameters of the ultrasonic sensor 163 6.8 Specifications of the motion control interface card 166 6.9 Description of the input parameters of the M P C controller 171 vi 6.10 M P C controller parameters 177 vii List of Figures 1.1 Prototype flexible link manipulator system 3 2.1 Schematic diagrams of flexible link manipulators: (a) Two-link manipulator; (b) General manipulator 17 2.2 Flexible link i and the free-body diagram for an elemental segment 21 2.3 Free body diagram of the link end element 24 2.4 Mode shape of link 1 with zero and maximum mechanical offsets 2.5 Mode shapes of link 1 with different payloads (zero, nominal, maximum) compared to a free-end link 35 2.6 Mode shapes of link 2 with different payloads 36 2.7 Single-link flexible robotic manipulator 41 2.8 External dynamics and internal dynamics of a nonlinear system 55 2.9 Pole-zero map of a single-link flexible robotic manipulator (aluminum rod) . . . . 61 2.10 Pole-zero map of a single-link flexible robotic manipulator (aluminum thin beam) 61 2.11 Pole-zero map of a two-link flexible robotic manipulator 62 3.1 Structure of the intelligent model predictive control (LMPC) system 65 3.2 Illustration of the strategy ofSISO MPC at kth sampling instant 68 3.3 Basic structure of MPC 69 3.4 Unconstrained M P C controller structure 81 3.5 The basic idea of multi-stage MPC 88 3.6 The fuzzy inference system 97 3.7 Membership functions for the input variables 100 3.8 Membership functions for the output variables 100 3.9 Fuzzy inference process 102 34 viii 3.10 Overall scheme of the fuzzy tuner 107 4.1 Case 1: Joint angle responses of 1-mode model and 2-mode models with an initial tip deflection of 51.2mm Ill Case 1: Link tip deflection responses of 1-mode model and 2-mode models with an initial tip deflection of 51.2mm . 112 Case 2: Joint angle responses of 1-mode model and 2-mode models under a bang-bang control input (6 (0) = 0, w (0) = 0) 112 Case 2: Link tip deflection responses of 1-mode model and 2-mode models under a bang-bang control input ( 6 (0) = 0, w (0) = 0 ) 113 4.5 Case 2: Bang-bang control input 113 4.6 Case 1: Joint angle responses of the linear and nonlinear models with an initial tip deflection of 51.2mm 116 Case 1: Link tip deflection responses of the linear and nonlinear models with an initial tip deflection of 51.2mm 116 Case 2: Joint angle responses of the linear and nonlinear models under a bangbang control input ( 9 (0) = 0, w (0) = 0) 117 Case 2: Link tip deflection responses of the linear and nonlinear models under a bang-bang control input (6>, (0) = 0, w (0) = 0) . . . 117 Case 1: Joint angle responses of the linear model for different payloads with an initial tip deflection of 51.2mm 119 Case 1: Link tip deflection responses of the linear model for different payloads with an initial tip deflection of 51.2mm 119 4.2 4.3 X 4.4 tip X 4.7 4.8 X 4.9 tjp tjp ft> 4.10 4.11 4.12 Case 2: Joint angle responses of the linear model for different payloads under a bang-bang control input (6 (0) = 0, w (0) = 0) X 4.13 tip 120 Case 2: Link tip deflection responses of the linear model for different payloads under a bang-bang control input (6>, (0) = 0, w (0) = 0) 120 4.14 Simulation block diagram 123 4.15 Case 1: Joint angle responses for the constrained and unconstrained M P C 124 4.16 Case 1: Link tip deflection responses for the constrained and unconstrained MPC 124 tip ix 4.17 Case 1: Control inputs for the constrained and unconstrained M P C 125 4.18 Case 2: Control inputs for the constrained and unconstrained M P C with the same parameters 125 Case 2: Control inputs for the constrained and unconstrained M P C with different parameters 126 Case 2: Joint angle responses for the constrained and unconstrained M P C with different parameters 126 Case 2: Link tip deflection responses for the constrained and unconstrained M P C with different parameters 127 Case 1: Input and output responses of the single-link flexible manipulator (nominal payload) 129 4.23 Case 1: Measured output and simulated model outputs (nominal payload) 130 4.24 Case 2: Input and output responses of the single-link flexible manipulator (double the nominal payload) 130 Case 2: Measured outputs and simulated model outputs (double the nominal payload) 131 4.26 FIS input-output diagram 131 4.27 Case 1: Joint angle responses with LMPC 135 4.28 Case 1: Link tip deflection responses with IMPC 135 4.29 Case 1: Control input with LMPC 136 4.30 Case 2: Joint angle responses with TMPC 136 4.31 Case 2: Link tip deflection responses with TMPC 137 4.32 Case 2: Control input with IMPC 137 4.33 Case 3: Joint angle responses with IMPC 138 4.34 Case 3: Link tip deflection responses with TMPC 138 4.35 Case 3: Control input with TMPC 139 5.1 Simulation block diagram of the two-link flexible manipulator system 144 5.2 Joint angle response with three different internal models 146 4.19 4.20 4.21 4.22 4.25 x 5.3 Link tip deflection responses with three different internal models 146 5.4 Case 1: Joint angle responses of link 1 with LMPC 148 5.5 Case 1: Joint angle responses of link 2 with LMPC 149 5.6 Case 1: Link tip deflection responses of link 1 with LMPC 149 5.7 Case 1: Link tip deflection responses of link 2 with LMPC 150 5.8 Case 1: Control input of link 1 with LMPC 150 5.9 Case 1: Control input of link 2 with LMPC 151 5.10 Case 2: Joint angle responses for link 1 with LMPC 151 5.11 Case 2: Link tip deflection responses for link 1 and link 2 with LMPC 152 5.12 Case 2: Control inputs of link 1 and link 2 with LMPC 152 5.13 Case 3: Joint angle responses for link 1 and link 2 with LMPC 153 5.14 Case 3: Link tip deflection responses for link 1 and link 2 with LMPC 153 5.15 Case 3: Control inputs of link 1 and link 2 with LMPC 154 6.1 The prototype flexible link manipulator system (FLMS) 156 6.2 Schematic diagram of the electrical system of the manipulator 158 6.3 Pull down menu of the FLMS software package 167 6.4 Analog-to-digital conversion dialog box 168 6.5 Digital-to-analog conversion dialog box 169 6.6 Encoder count dialog box 169 6.7 Manual control dialog box 170 6.8 MPC motion control dialog box 171 6.9 Save dialog box 171 6.10 Program structure of the FLMS software package 174 6.11 Flow diagram of the FLMS dialog box 174 6.12 Case 1: Joint angle responses (experiment and simulation) 177 xi 6.13 Case 1: Tip position responses (experiment and simulation) 178 6.14 Case 1: Control input (experiment and simulation) 178 6.15 Case 2: Joint angle responses (experiment and simulation) 179 6.16 Case 2: Tip position responses (experiment and simulation) 179 6.17 Case 2: Control input (experiment and simulation) 180 B.l Overall C A D model of the FLMS prototype 203 B.2 Assembly drawing of joint module 1 204 B.3 Assembly drawing of joint module 2 204 B.4 Electrical wiring diagram of the prototype manipulator system 205 xii Nomenclature Notations di set of real numbers 9}" vector space of n -tuples over SR. II II II !|2 / 2 |JC| Euclidean norm of vector xeSR" (equivalent to ||x| or Jx ,4, 5 , C, D state-space representation of a system or,. angle of rotation of link i due to bending; a =3w,(x ,r)| 2 i 3x x ( 2~ H — + x„ ) = w. (/,.,0 ( ; 6 equivalent viscous damping coefficient B diagonal damping matrix «,,,/ cos(a,._, (0 + 3(0) E Young's modulus of link i EJj flexural rigidity of link / F° fixed world coordinate frame F' rigid-body moving frame of link i, fixed at the joint of link i F' flexible body moving frame of link i, fixed at the end of link i G(s) transfer function H. . homogeneous transformation matrix that transforms the coordinates of a point c i from frame F to frame F' J h vector of Coriolis and centrifugal forces i encoder counts i A D C counts H prediction horizon ENC ADC Xlll H prediction horizon before tuning old H new p H prediction horizon after tuning initial prediction horizon inj H en d f" l prediction horizon generated by fuzzy tuner H sen sensitivity parameter of prediction horizon p p H ma control horizon u moment of inertia of the link i cross section about the Y axis i I nth constant integral parameter of link i (J and k are mode shape function nijk indices) J equivalent moment of inertia at the end of link / J mass moment of inertia of link i about joint i axis J payload inertia K stiffness matrix Li oi p K M P C controller gain matrix k + i\k value predicted for time k + i based on the information available up to time k / length of link i MPC ; L J Lagrangian L = T-V cost function m equivalent mass at the end of link i Li m mass of link i m mass of hub i m payload mass i hi p M .(jc .,r) bending moment at x of link i (MO); contributions ( ( i of the masses of payload and link/ + 1 , d u e mechanical offsets M positive-definite symmetric mass matrix to the Pcv count to voltage constant of A D C Pvlb voltage to lb constant of force sensor Pvcm centimeter to voltage constant of ultrasonic sensor q generalized coordinates; q = {0 , • • •, 6 , Q tracking error weighting matrix (output weighting matrix) Qw _old link deflection weight before the tuning Qw new link deflection weight after the tuning Qw _ini initial link deflection weight Qw _sen sensitivity parameter of link deflection weight Qyw overall weight for joint angle and link deflection r/(0 point r, on link 1 in frame F r,°(0 absolute position of r, in frame F ° R total energy dissipation function . R control penalty weighting matrix (input rate weighting matrix) R _old input rate weight before the tuning X n ,, • • •, S lflm _, • • •, 8 , • • •, 1 u D u_new input rate weight after the tuning u_M initial input rate weight R-u_end final tuned initial input rate weight R n sensitivity parameter of input rate weight r reference trajectory e joint angle setpoint u_sen r link deflection constraint (maximum allowed link deflection) r w u control input constraint (maximum allowed control input) V,/ sin(a _, (0 + 0,(0) T kinetic energy r T s f sampling period nX v°(7) absolute velocity of r, in frame F° V^x^t) shear force at x of link i V potential energy i U elastic potential energy of link i u vector of inputs w„_. maximum control input i oo w (x , t) i ; transverse deflection of link / at abscissa x.; w (x. ,t) = ^ <py (x. )d (t) t ( jj 7=1 absolute maximum link deflection w link tip deflection j) predicted controlled output y link tip position tip tip fa- (x ) mode shape function (eigenfunction) of link i j 6; joint angle of link / 0° absolute angular velocity of frame F' p linear mass density (mass per unit length) of link i Au future control moves S (t) mode coordinates co the naturalfrequencyof vibration of link i i (j i Abbreviations ADC Analog-to-Digital Converter CARLMA Controlled Auto-Regressive and Integrated Moving Average DAC Digital-to-Analog Converter DMC Dynamic Matrix Control FIS Fuzzy Inference System xvi FLMS Flexible Link Manipulator System GPC Generalized Predictive Control GUI Graphical User Interface LMPC Intelligent Model Predictive Control LMIs Linear Matrix Inequalities LP Linear Programming LQG Linear Quadratic Gaussian LQR Linear Quadratic Regulator LS Least Squares LTI Linear Time-Invariant System MLMO Multi-Input Multi-Output MPC Model Predictive Control PDE Partial Differential Equation PEM Prediction-error method PID Proportional-Integral-Derivative PWM Pulse-Width Modulation QP Quadratic Programming SISO Single-Input Single-Output SMC Sliding Mode Control Acknowledgments I wish to thank my research supervisor, Prof. Clarence W. de Silva, for his continuous advice and guidance of my research for his willingness to discuss my progress. I am thankful for his kind encouragement to keep me motivated, outstanding supervision, comprehensive knowledge, and effort throughout the entire process of this research. I greatly appreciate his constructive comments and criticism, and the valuable discussions that speeded up the progress of this project. I would also like to thank my previous research supervisor, the late Prof. Dale Cherchas, for his advice and contributions to this research project. I wish to express my appreciation to the external examiner for his careful reading of the thesis and insightful comments. I would also like to express my gratitude to the supervisor committee, Prof. Mohamed S. Gadala, Prof. Farrokh Sassani, and Dr. Ricky Min-Fan Lee for their constructive comments and suggestions. This thesis would not have attained its final state without the positive feedback and invaluable suggestions I received from other faculty members as well. Their kind support is gratefully acknowledged. Financial support for the research presented in this thesis has been provided through various sources. These include the scholarships from the University of British Columbia in the form of Graduate Entrance Scholarship, Ph.D. Tuition Fee Awards; research assistantships and equipment funding from the Natural Sciences and Engineering Research Council (NSERC) of Canada which are held by Prof. Clarence W. de Silva. I take this opportunity to thank my good friends and colleague with whom I shared my pleasant moments during the study at UBC; especially, Dr. Poi Loon Tang, Mr. Ying Wang, and Mr. Jason J. Zhang, for many fruitful discussions. I truly appreciate my parents and my family members for their unwavering encouragement and unconditional support. xvm Chapter 1 Introduction 1.1 Goals of the Research High-speed and high-precision motion control of robot manipulators with flexible links is naturally more complex and difficult than the motion control of those with conventional rigid links. The inherent non-minimum phase behavior, dynamic model complexity, lack of complete sensing, multi-modal vibration and incapability of precise positioning due to system flexibility are among the primary reasons for the difficulty of controlling a flexible-link manipulator in achieving high accuracy and robustness simultaneously. The stability of the robotic system is particularly relevant in this context. Consequently, practical application of flexible-link manipulators, which need efficient control algorithms, is rather limited. The motion control problem of a flexible robot manipulator may be solved by a combination of the following approaches (Book, 1993): • Design of material and shapes such that high stiffness/mass ratio is achieved. • Passive damping treatment of flexible elements in order to reduce vibrations. • Improved dynamic modeling that allows reliable design and control. • Active feedback control of flexible vibrations. • Trajectory planning algorithms to constrain the excitement of flexible modes. • Use of sensors and actuators distributed in the structure. • Sensors for directly detecting end-of-arm position and states. Research to examine the advantages and limitations of these complementary approaches in accommodating link flexibility is crucial in making flexible manipulators desirable for practical manipulation tasks. The intelligent model predictive control (EvIPC) which is developed in the present thesis represents a focused effort toward this goal. It involves the design of an active feedback control strategy that is effective in the associated motion control 1 problem. The main objectives of the research presented in this thesis are the following: 1. Develop an explicit, realistic, and accurate dynamic model for a typical flexible link manipulator. The model must be capable of capturing the process dynamics so as to predict the future outputs with sufficient precision, while being simple enough to implement and analyze for controller design. It must incorporate realistic boundary conditions. 2. Design an effective model predictive controller for high-speed real-time implementations with guaranteed nominal stability. 3. Extend the scheme of model predictive control (MPC) to intelligent model predictive control (LMPC) and investigate relevant analytical and practical issues of the enhanced control scheme. 4. Apply LMPC for the motion control of structurally flexible robotic manipulators and investigate its performance through analysis, computer simulation, and experimentation. The developed controller is expected to possess the advantages of conventional MPC and also those of intelligent control. In particular, the controller will be efficient, intelligent, adaptive, and robust. It should be useful in the real-time control of high-speed motions of a robot with flexible links. Also, it should be able to automatically adjust the controller parameters and model structures to guarantee a sufficiently small end-point tracking error and closed-loop system stability for different payloads and disturbances. The developed control approach will incorporate the experience and other knowledge of human experts in tuning the parameters of a conventional MPC controller, in order to achieve high system performance. Both computer simulation and experimentation will be used to evaluate the performance of the developed control methodology. In particular, an LMPC controller will be designed to control the end-effector motions of a planar revolute robot manipulator with flexible link. As a test bed, a prototype flexible link manipulator system (FLMS) is designed and constructed. It will be used to verify and refine the modeling and control strategies that are developed in the present work. Both simulation and experimental studies will be carried out using the flexible link robotic system, in order to validate the control methodologies developed in the present work. A view of the prototype manipulator, which has been designed and developed 2 in our laboratory is shown in Figure 1.1. Figure 1.1 Prototype flexible link manipulator system. 1.2 Motivation In this section, first some basic concepts and definitions that are relevant to the control of flexible manipulators, which is the application domain of intelligent model predictive control (IMPC) as developed in the present research, are reviewed. The advantages of flexible manipulators, and challenges and difficulties of the related motion control problem are addressed next, which provides the rationale for the investigation into IMPC. Robot manipulators have a wide range of applications, from industrial automation and medical operations to exploring hazardous environments such as space, underground, underwater and nuclear plants. In all these applications, completion of a generic task requires accurate control the movements of the end-effector of one or more manipulators. In general, the control of a robotic manipulator consists of motion control and contact force control. For unconstrained (free) motion, where there is no physical interaction between the end-effector and the environment, only motion control is required. For constrained motion, where contact forces will arise between the end-effector and the environment, both motion and contact forces may have to be controlled. 3 The motion control problem of a robot manipulator can be generally divided into two categories: regulation (or stabilization) and tracking (or servoing). In the regulation problem, one is concerned with devising a control algorithm such that the system states are driven to a desired final equilibrium point and stabilized around that point. In the tracking problem, one is faced with designing a controller such that the system output tracks a reference spatial path with respect to time (i.e., a trajectory). The regulation problem can be regarded as the special case of tracking problem when the desired trajectory is a constant spatial configuration with respect to time. Trajectory of the robot end-effector or joints, as generated by path planning, is realized by the appropriate reference inputs to the motion control system of the manipulator. The problem of manipulator control generally involves the determination of the time behavior of the forces and torques to be delivered by the joint actuators so as to ensure the execution of the reference trajectories. The controller has to drive the outputs (responses) close to the desired trajectories while maintaining stability of the overall robot system. Structural flexibility refers to the deflection of a structure under applied or inertial (acceleration-related) forces/torques. Here, the structural flexibility may be addressed from the control point of view. A robotic manipulator becomes flexible if the flexural effects are significant such that they cannot be neglected during the controller design stage in order for the system to meet the performance specifications. Flexibilities in a robotic manipulator may result from joint flexibilities (Spong, 1987) and link flexibilities. Joint flexibility arises primarily because of the elastic behavior of the joint transmission elements such as gears, harmonic drives, and shafts of the actuators. Link flexibility is a consequence of light-weight constructional features of large-dimension manipulators, which result in low link stiffness. They are designed to operate at high speeds with low inertia or to handle heavy payloads. Research on the dynamic modeling and control of flexible manipulators has received increased attention during the past 30 years due to the advantages of flexible manipulators over rigid ones (Book, 1984). Two types of robotic systems motivate the application domain of the present research: light-weight high-speed industrial manipulators, and large dimension manipulators capable of handling heavy payloads such as space exploration manipulators. Advantages of flexible manipulators over their rigid counterparts include: higher payload to robot weight ratio, low energy consumption, use of smaller actuators, greater maneuverability, increased transportability, lower mounting strength requirements, reduced overall cost, and 4 safer operation due to reduced inertia. Achieving accurate, high-speed manipulation with a light-weight structure is clearly a desirable objective and a significant challenge. The motion control of the flexible manipulator is more difficult than the rigid manipulator. For a rigid manipulator, the end-point trajectory is completely defined by the trajectory of the joints. Effective control of the joints is equivalent to good control of the endpoint motion. The situation is not as straightforward for a flexible manipulator, and difficulties arise when one tries to track a specified end-effector position trajectory by applying the torque at the joint. When a distributed parameter system is forced at one point in its spatial domain and its response is measured at another point, the system is said to be noncollocated. In this case, the control becomes rather difficult due to the non-collocated nature of the sensor and actuator positions, which can result in unstable zero dynamics (Wang and Vidyasagar, 1991). In other words, the system can be non-minimum phase. Then, the system has an unstable inverse. Many theoretical results of control are complicated by or even totally voided by a system of non-minimum phase. It can be shown that the non-minimum phase property of a flexible manipulator makes exact asymptotic tracking of a desired tip trajectory impossible by means of a causal controller (Slotine and Li, 1991). Thus, in practice, one may be satisfied with small (rather than zero) tracking errors. Furthermore, use of a reduced-order model for the controller design may also lead to control and observation spillover. Control spillover is the excitation of the residual modes of the system by the control action. Observation spillover is the contamination of sensor readings by the residual modes. When control and observation spillovers are present, the closed-loop system may become unstable. Further complications arise because of the highly nonlinear nature of the system and the difficulties involved in accurately modeling various friction and backlash terms. Moreover, a change in the arm configuration and in the payload also leads to a change in the system dynamics. This change has a degrading effect on the performance of the controllers. Due to the complexity of the dynamics of structurally flexible robotic manipulators, designers of conventional robotic manipulators usually avoid confronting the flexibility issues in an explicit manner. The motion control algorithms of these systems are based on the rigid model of the system, the flexibility of the system being considered negligible. There are two primary solutions in current usage to avoid the flexibility problems of the system. The first is to make the manipulator rigid by increasing the stiffness of the system. This will reduce the 5 system vibration, and good positional accuracy can be achieved. High stiffness usually is achieved by using heavy and bulky structural components. Most of the conventional industrial robotic manipulators are designed based on this concept. This will reduce the efficiency and operating speed/bandwidth, increased the cost, and limit the performance of the manipulator. In fact, most existing industrial robot manipulators are limited to a load-carrying capacity of about 5-10 percent of their own weight. Heavy weight of the system means large inertia of the system. In order to drive the system at high speed, large actuators will be needed. This will increase the overall cost and energy consumption. The second solution is to reduce the speed of the manipulator. By moving slowly enough, it might be possible to ensure that the flexible modes of the system are not excited, and then the system can be controlled as a rigid system. This conservative strategy is used, for example to control space-based robotic manipulators. Space applications require low-mass designs of the robotic manipulator to achieve escape velocity, and in order to accomplish a mission with better fuel economy. The workspace of a space robotic manipulator is usually large. Weightlessness of space means that mobility provided by wheels and legs on ground-based systems is ineffective for space-based system. Thus a long robotic manipulator is used to move equipment and material into and out of the cargo bay. The primary control technique for space manipulator that is employed at present is to move the joints slowly and wait for the tip of the arm to settle to equilibrium. This can lead to slow performance and extended the task completion time past acceptable limits. In order to overcome such performance limitations of existing robotic system, we have to explicitly address the flexibility issue of the robotic manipulator systems. With advances in hardware and software, the implementations of high performance advanced motion control methods have become possible even for complex plants. There are a variety of advanced control techniques, which enjoy various degrees of success in practical applications. Among them is the class of techniques known as model predictive control (MPC). These techniques are model-based approaches where the future response of the plant is predicted, and the controller seeks to make the predicted response approach a desired response. Such an approach is desirable when a satisfactory model of the plant is available and desired response is rather complex. Many industrial applications meet these characteristics. Since an accurate plant model may not be present in many practical applications and since there are parameters of M P C that can be tuned online to achieve 6 improved performance, particular for complex plants and under model uncertainties, it is useful to investigate procedures for "tuning" an M P C scheme. Control expertise, past experience, and insight into the M P C scheme and the specific plant may be used in developing a knowledge-based "intelligent" scheme to tune the parameters of MPC. This is the main motivation for the proposed investigation in developing an LMPC scheme. In summary, the non-minimum phase characteristic, coupling effects, nonlinearities, parameter variations, and unmodelled dynamics all contribute to make the problem of controlling the end-effector of a flexible link manipulators much more difficult than that of a rigid-link manipulator. Control strategies that ignore these uncertainties and nonlinearities generally fail to provide satisfactory closed-loop performance. It is expected that the proposed technique of intelligent model predictive control will provide a suitable solution for this class of applications. 1.3 Related W o r k Three main research aspects have to be investigated in order to achieve the objectives of the research. They are: model predictive control (MPC), controller tuning, and control of flexible link robotic manipulators. In the following sections, we will review relevant existing work and approaches in this three research areas. 1.3.1 Model Predictive Control Model predictive control (MPC) is a model-based control technique. The term M P C generally denotes a collection of controllers, which determine the control effort by minimizing a cost function (usually quadratic) in a receding horizon manner using an explicit model while satisfying some imposed constraints. Physical limitations of the system; e.g., valve saturations, may be represented by an input constraints. The state constraints are imposed for states or outputs that may not have set-points, but are required to remain within certain limits during the intended system operation. The existing M P C schemes share the following essential features: an explicit internal model, the receding horizon concept, and the computation of the control signal by optimizing predicted plant behavior. M P C strategies were developed independently by industrial groups in France and the 7 United States in the late 1970's. The pioneers of M P C are mostly industrial practitioners who implemented M P C several years before the first publication appeared. Richalet, et al. (1978), of the French company Adersa, proposed predictive control based on impulse-response model under the name model predictive heuristic control (MPHC), later known as model algorithmic control (MAC). This control method is based on intuitive concepts and offers ease of tuning. It can be applied to problems that are too difficult to be handled by conventional proportionalintegral-derivative (PID) control. Constraint handling and optimality are not the principal objectives. Culter and Ramaker (1985), of the Shell Oil Co., Texas, proposed dynamic matrix control (DMC). This control algorithm is an input-output approach based on step/impulse response models. It emphasizes optimal plant operation under constraints, and computes the control signal by repeatedly solving a linear programming (LP) problem. Clarke, et al. (1987) proposed one of the most popular predictive control algorithms, generalized predictive control (GPC), with an analysis of its properties. This receding-horizon method depends on predicting the output of the plant over several steps, based on assumptions on future control actions. In the absence of constraints, it can provide an analytical solution. It can deal with unstable and non-minimum phase plants, and incorporates the concept of control horizon as well as the consideration of weighting of control increments in the cost function. The roles of the output and control horizons were explored for processes with nonminimum phase, unstable and variable dead-time models. The general set of choice available for GPC leads to a greater variety of control objectives compared to other approaches, some of which can be considered subsets or limiting cases of GPC. Furthermore, the offsets are eliminated by the consequence of assuming a controlled auto-regressive and integrated moving average (CARIMA) plant model. The stability of the GPC scheme is guaranteed using end-point weighting of the cost function, which gives the required monotonicity to the Difference Riccati Equation associated with the cost function by Demircioglu and Clarke (1993). Rawlings and Muske (1993) provided a stability proof of constrained receding horizon control based on a finite number of optimization parameters but an infinite prediction horizon. Kothare, et al. (1996) presented a technique for the synthesis of a robust model predictive control law, using linear matrix inequalities (LMIs). The technique allows incorporation of a large class of plant uncertainty descriptions, and is shown to be robustly stabilizing. This 8 work exploits the powerful methods, which have recently become available for solving LMIs and the connections which exist between LMIs and control theory. Although the formulation no longer leads to a Quadratic Programming (QP) problem, it does lead to an LMIs optimization problem, which is a convex problem. The algorithm available for solving LMIs optimization is efficient, making it a plausible candidate for online use. 1.3.2 Controller Tuning One of the challenges for M P C , however, is how to tune the parameters of the controller. So far, only a few guidelines related to the tuning of the parameters of M P C controllers have been provided in the literature. Clarke and Mohtadi (1989) have developed some general guidelines on how to tune a GPC. They have shown that variable dead-time and unstable/inverse-unstable plants can be stably controlled by correct choices of the horizon. They recommended that the first costing horizon should at least exceed the plant dead-time. The prediction horizon should be set comparable to the rise-time of the open loop system. The control horizon determines the degrees-of-freedom in future control increments, and it can be set the number of unstable/underdamped poles of the open loop system. Lee and Y u (1994) presented practical on/off-line tuning rules for state-space M P C controllers. Guidelines for tuning the predictive controller for robust performance are provided based on a fixed tuning of the cost function weights and a manipulation of the observer covariance matrices. Based on the frequency-domain analysis of the closed-loop behavior of M P C controllers, the effect of various tuning parameters on the performance and robustness of the closed-loop system is characterized, and quantitative guidelines on how these parameters are best determined are established. It is shown that the choice and the settings of the tuning parameters play a critical role in the overall robustness of the resulting closed-loop system and also the ease of design and tuning. Liu and Wang (2000) proposed an auto-tuning procedure for a predictive controller. Their auto-tuning procedure is based on a recursive multi-objective optimization algorithm. Now we will review some existing approaches related to knowledge-based tuning of controllers. De Silva (1991) investigated a knowledge-based tuner consisting of a two-level control structure. The lower level is occupied by a conventional servo loop. The upper level consists of a knowledge-based tuner for the servo parameters. In his work, knowledge-based 9 tuner was expressed in the conventional fuzzy-logic formulation of a linguistic rule base to which the compositional rule of inference is applicable; concepts of rule dissociation, fuzzy resolution, and resolution relationships were defined; and the stability of the overall control system and the computational requirements for the tuning system were analyzed. The developed strategy was used to tune a PLD controller. Wu and De Silva (1993) investigated the effect of fuzzy resolutions on the processing speed, storage requirement, and response accuracy of a hierarchical fuzzy tuning system. The paper suggests, in practice, the fuzzy resolution has to be chosen to satisfy the requirements of the particular situation, by weighing various factors. 1.3.3 Control of Flexible Link Robotic Manipulators For the modeling and control of flexible link robotic manipulator, most of researchers using planar single-link manipulator flexible model or planar two-link flexible manipulator model. Many of the advanced control algorithms have been applied to the flexible link manipulator. A flexible link manipulator is a nonlinear and distributed parameter system. The model of this system is an infinite-dimensional model. A finite-dimensional nonlinear model can be obtained by the assumed mode techniques or finite element method. Three different approaches have been used in the control design. In the first approach, the control law is designed based on finite-dimensional model. In the second approach, the control law is designed based on distributed parameter model in spite of the model complexities. In the third approach, the controller is designed using soft computing control techniques. Next we will review some major contributions in these three different approaches. The first approach is based on discretized dynamic models. In an order to reduce the complexity, many of the work on flexible manipulator control perform local linearization and truncate the number of flexible modes. Camion and Schmitz (1984) designed a Linear Quadratic Gaussian (LQG) controller for a single-link flexible manipulator. Estimation of the system's states is based on dynamic calculation using signals from the tip-position sensor and the hub-rate sensor. They showed that the speed of response to commands is ultimately limited by the inherent wavepropagation delay for the beam. Morris and Madani (1998) developed a quadratic optimal control algorithm for a two link flexible manipulator. Static deflection of flexible links under 10 gravity was considered. Availability of all the states of the system was assumed. Singer and Seering (1990) proposed an input shaping control technique. This method essentially involves the convolution of a sequence of impulses with the reference input to suppress the vibration of flexible modes. They showed that the controller robustness with respect to uncertain frequencies or damping can be increased by using a larger number of impulses. They also showed that multiple modes of vibration could be handled. Magee and Book (1992) extend the input shaping control method to deal with variable frequency systems. They proposed a command shaping algorithm that can filter out the frequencies around the flexible modes. Lee and Park (2002) presented a modified input shaping method, which can be applicable to linear time-varying system. In a practical sense, linear feedback control with observer can be undesirably sensitive to small changes in parameters or payload. Many adaptive and robust control algorithms based on bounded uncertainty estimates have been presented for flexible link manipulator with large payload changes and parameter uncertainties. Banavar and Dominic (1995) presented an LQG/// M controller for a single-link flexible manipulator. While the flexible modes are damped out in the inner-loop by the L Q G controller, the outer-loop ensures stability of the system in the presence of uncertainties. Feliu, et al. (1997) has studied the control of singlelink flexible manipulator in the presence of joint fraction and payload changes. They developed a robust control method based on two nested loops: an inner feedback loop to control the motor position which is robust to joint friction, and an outer loop to control the tip position which is robust to payload changes. Bai, et al. (1998) presented an adaptive augment state feedback controller for a two-link flexible manipulator. The controller design is based on the Linear Quadratic Regulator (LQR) technique in conjunction with an adaptive compensator, where all states are adaptively estimated by employing the strong tracking filter. This will increase the robustness of the controller against payload variations. Ryu, et al. (2000) proposed a robust LQR based on the descriptor form for the control of a single-link flexible manipulator, which has a large uncertain payload variation and parameter uncertainties. The controller design problem is formulated as a convex programming problem and is solved using LMIs. The controller designed with this method shows the improved robust performance and the reduced conservatism. Although linear controllers may yield desirable closed-loop performance, their region of 11 operation is limited due to the nonlinearities present in the original system. To have a wider region of operation, one has to take into account the nonlinearities. Yim designed a modified predictive controller based on the nonlinear predictive control theory. A vector function s has been chosen as a linear combination of tracking error, its higher order derivatives, and the integral of the tracking error for robustness. A control law has been derived by minimizing a quadratic function of the predicted value of s and control torque. Wilson, et al. (2002) proposed an augmented sliding mode control (SMC) scheme, which ensures a good performance in the rigid body motion and provides sufficient damping in the measured flexible body modes. S M C takes advantages of control law switching to move a system from an initial state to a prescribed surface in the state space. Once on that surface, a second control law is used to keep the state from leaving the surface while moving toward the desired final state. It is robust to model-parameter uncertainty and disturbances if bounds are known a priori. Due to the use of Lyapunov stability theory during the controller design, S M C is appealing for nonlinear system control. The novel aspect of the proposed augmented SMC is that the control law neglects the flexible body generalized accelerations, but the system remains stable even when flexible body generalized accelerations, unmodeled dynamics, disturbances and model uncertainties are present. The most common approach to compensate the nonlinear dynamics is the so-called inverse dynamics or computed torque strategy. De Luca and Siciliano (1989) designed a nonlinear control law using the input-output inversion algorithm. They have shown that the closed-loop dynamics is always stable when joint angle is the output; the zero dynamics of the system may become unstable when the output is the angular position of a point along the link. Thus, in general, end-point trajectories cannot be tracked exactly without going unstable. Wang and Vidyasagar (1991) have shown that the nonlinear flexible link system is not in general input-state linearizable. However, the system is locally input-output linearizable but the associated zero dynamics may become unstable when the tip position is considered as an output of the system. In order to overcome the non-minimum phase characteristic of the system, two most common used methods are multiple time scale composite control based on the singular perturbation (Siciliano and Book, 1988) and output redefinition approach (Wang and Vidyasagar, 1989, Madhavan and Singh, 1991). Singular perturbation control strategy is based on a two-time scale model of the flexible manipulator. This allows the definition of a 12 slow subsystem corresponding to the rigid body motion, and a fast subsystem describing the flexible motion. A composite control strategy is then applied. A linear stabilizer is used to stabilize the fast dynamics (flexible modes) and a nonlinear controller is used to make the slow dynamics (joint variables) track the desired trajectories. In order to improve the performance of a singular perturbation approach, several researchers used the integral manifold approach introduced by Spong, et al, (1987) to control the flexible link manipulator (Siciliano, et al, 1986, Moallem, et al, 1997). The integral manifold approach facilitates the inclusion the effects of higher frequency flexible modes into the corrected models. The output redefinition approach is also used to overcome the non-minimum phase characteristics of the system. The basic idea is to redefine the system outputs such that the zero dynamics of the system is stable. Based on the new outputs, the input-output (inverse dynamics) approach can be used to control the flexible link manipulator. In the second approach, the control law is designed based on the distributed parameter model. This will avoid the undesired model truncation. The main advantage of this approach is that it is free from control spillover. Luo (1993) proposed an asymptotically stable strain feedback control for regulating control of the link vibration. This strategy directly introduces a damping term into the system model, and precise dynamic model is not needed for real-time control. Ge et al. (1998) designed a strain feedback regulating control, where the payload mass was considered. The controller is independent of system parameters and thus robust to system parameters uncertainties. The closed-loop stability of the system is proven based on the partial differential equations (PDE) of the system. Lee (2004) developed a momentfeedback trajectory-tracking control scheme based on a distributed parameter model. The stability of the closed-loop system is proven based on the Lyapunov stability theorem. Intelligent control methods have been applied to flexible link manipulators. Kubica and Wang (1993) developed a two stages direct fuzzy logic controller. One stage controls the rigid motion while the second stage monitors the elastic deformations and modifies the output of the first stage to reduce the induced vibrations. This approach was taken to reduce the number of rules needed in the associative fuzzy knowledge base. Garcia-Bentiez, et al. (1993) proposed a two level hierarchical control strategy. A fuzzy logic supervisory level is used for the selection of a lower-level conventional controller. Moudgal, et al. (1994) designed a twolevel hierarchical rule-based controller. This scheme employs an upper-level "expert 13 controller" that captures the knowledge about how to supervise the application of low-level fuzzy controllers during movements in the robot workspace. Gutierrez and Lewis (1998) developed a neural network tracking controller. The controller is composed of an outer PD tracking loop, a singular perturbation inner loop for stabilization of the fast dynamics, and a neural network inner loop used to feedback linearize the slow dynamics. The neural network controller requires no off-line learning phase. Song and Koivo (1999) have designed a nonlinear predictive controller. A neural network has been constructed to represent the inputoutput relation of a dynamic model. Based on the neural network plant model, the control inputs are calculated by minimizing a projected cost function that penalizes the future tracking errors. Nho and Meckl (2003) proposed a control architecture that incorporates a neural network, a fuzzy logic and a PD controller. The neural network controller is trained offline to capture the inverse dynamics of the plant, and the fuzzy logic estimator, trained offline to optimize the membership functions, is placed in the feedback loop to estimate the unknown payload. The estimated payload is used as an additional input to the neural network controller to update the inverse dynamics after payload changes. Wai and Lee (2004) developed an intelligent optimal control system, in which the proposed controller was made of an optimal controller which minimize a quadratic performance index, a fuzzy neural network (FNN) controller which learn a nonlinear function to implement the optimal controller, and a robust controller which compensate the approximation error of the F N N controller. 1.4 Organization of the Thesis As an overview, the reminder of the thesis presents the theoretical and experimental research on the modeling and control of flexible link robotic manipulators in sufficient detail. The thesis is divided into seven chapters and three appendices. Included in Chapter 1 are the goals and motivation for this research, related work, contributions and organization of the thesis. Chapter 2 presents the development of kinematic and dynamic models of flexible link robotic manipulator. Boundary conditions and mode shape selections for flexible link model are discussed. Equations of motion for a planar n-link flexible manipulator are presented. Detailed nonlinear mathematical models for a single-link and two-link flexible manipulator 14 are derived. Linearization o f the equations o f motion technique is developed. Non-minimum phase characteristic o f the system are analyzed. Chapter 3 presents the I M P C algorithm, and its underlying strategy, and addresses issues related to the application o f L M P C i n the motion control o f flexible link robot manipulators. Chapter 4 presents L M P C controller design for a single-link flexible manipulator. The performance o f the controller is evaluated using computer simulations. Chapter 5 presents L M P C controller design for a two-link flexible manipulator and computer simulation results. Chapter 6 presents the experimental flexible link manipulator system (FLMS). Experimental results are presented and discussed. Chapter 7 concludes this thesis with a summary o f the major results and recommendations for future research i n the area. 15 Chapter 2 Manipulator Model Advanced model-based control of a complex system generally involves three main steps: model development and analysis, parameter estimation/measurement, and controller design and implementation. This chapter represents the first step of the process of controller design. Model-based predictive control uses a plant model to predict the future response of the system and on this basis decides the control inputs to the system. It follows that the development of a suitable dynamic model is a crucial part in the process of controller design. The dynamic model should capture important features of the plant that are relevant to designing the controller. Yet, it should not be so complex as to mask the essence of the problem. With this backdrop, in the present work, a dynamic model of a flexible robotic manipulator is used for the design, simulation and control of the manipulator. In this chapter kinematic and dynamic (kinetic) modeling of flexible-link robotic manipulator is investigated in both general and special-case perspectives. In Section 2.1, kinematic formulation of a general, planar rc-link flexible manipulator with revolute joints is presented. In Section 2.2, a flexible link model of the manipulator is developed based on the Bernoulli-Euler beam theory. Realistic boundary conditions for the manipulator under some common practical conditions are given and discussed. Mode shape selection for analysis and computer simulation of the manipulator are discussed. In Section 2.3, the overall dynamic model of the manipulator is derived using Lagrange's equations. Closed-form equations of motion for a planar rc-link flexible manipulator are presented. Detailed mathematical models for a single-link and two-link flexible manipulator are derived. In Section 2.4, linearization of the equations of motion is presented. In Section 2.5, the non-minimum phase characteristic of the flexible manipulator system is analyzed. 16 2.1 Kinematics Consider a planar n-lirik flexible manipulator with revolute joints. The links are subjected to bending deformations only in the plane of motion, and torsional effects are neglected. Figure 2.1 (a) shows a two-link example, and Figure 2.1 (b) shows a serial chain of w-link flexible manipulator. The geometry of the system is described in terms of the coordinates shown in Figure 2.1. Frame F° is the fixed, world coordinate frame with the joint of link 1 located at its origin. Frame F' is the rigid-body moving frame of link i, and is fixed at the joint of link i. Frame F" is the flexible-body moving frame of link i, and is fixed at the end of link i. The rigid motion of link i is described by the joint angle 6>., and the transversal deflection of link / at abscissa x is denoted by w.(x ,r). i ; (a) (b) Figure 2.1 Schematic diagrams of flexible link manipulators: (a) Two-link manipulator; (b) General manipulator. 17 The geometric relations among the coordinate frames can be described using homogeneous transformation matrices (Spong and Vidyasagar, 1989). The homogeneous transformation matrix that transforms the coordinates of a point from frame F to frame F' J is denoted by H .. Specifically, the homogeneous transformation between frames F and F° 1 ; is H ,(0 = 0l 0 0 0 0 0 1 0 0 0 1 (2.1) where 5, = sin 9 (t) and c, = cos 6 (t). The rigid-body components of rotation and translation X X between frames F' and F ' _ 1 are given by the homogeneous transformation between frame F' and frame F ' " : 1 C, H, (0 = w S, 0 0 0 0 0 0 1 0 0 0 0 1 (2.2) where s = sin# .(r) and c,. = cos6?(r) . Additional rotation and translation due to the structural ; ( deformation of link i -1 must be considered. The deflections of the flexible links are assumed to be small compared to their lengths, so the high-order terms of deformations can be neglected. The changes of link lengths due to deformation are also neglected. The flexible body components of rotation and translation between frames F' and F'~ is the homogeneous x transformation between frame F' and frame F : 1-1 where /._, is the length of link i-l, s ai t 0 0 1 0 0 0 0 1 =sina _ (t), i l c _ =cosa._,(£), and a (2.3) is the angle of rotation of link i-l due to bending. Note that 18 The homogeneous transformation between frames F' and frame F' 1 is 0 H ,(0 = H H f M j c . (0H . (0 1 ; /,.1-1 0 w (/ ,0 M M w 0 0 1 0 0 0 0 1 (2.5) where ^ _. = sin(a,._,(0 + 0 {t)) and c , . = cos(a,._,(0 + 0,(0) • t a In general, the homogeneous transformation of frame F' with respect to the world coordinate frame F° can be characterized by the following composition of consecutive transformations: H ,(0 = H (0H (0-H ._ ,_ (0H _ ,(0 0 The 0il li2 I 2 I i 1 (2.6) absolute position and linear velocity at any point on link i can be calculated based on these transformations. For a point r. on link i in frame F' one has ; r/(0 = [x, w {x ,t) 0 t t if (2.7) The absolute position of r, in frame F° is r°(0 = H , ( 0 r / ( 0 0 (2.8) The absolute velocity of this point in frame F ° is given by v(0 = " dt (2.9) The absolute angular velocity of frame F' is 4°+«,_,) The position vector r°(t), (2.10) the velocity vector v°(?), and the absolute angular velocity 0° 19 are used in Section 2.3 to form the kinetic energy, potential energy and dissipation function expressions for the flexible link manipulators. The absolute position and linear velocity for any point on link 1 and link 2 can be calculated based on the transformations given above. For a point r, on link 1 in frame/ ' one 7 has r{(t) = [x w (x ,t) } x 0 x (2.11) if The absolute position of r, in frame F° is r°(t) = H (t)r \t) 0X l = [c x -s w (x ,t), x x x x ^x, + c w (x ,t), x x x 0 x if (2.12) The absolute velocity of this point in frame F° is -[x s + c w (x,, t)]0 - w (x,, t)s x x x x x [x c -s^fx^t)]^ *i(0 x ] +w (x ,t)c x dt x x x 0 x (2.13) 0 For a point r on link 2 in frame F one has 2 2 (t) = [x l 2 w (x ,t) 2 0 2 (2.14) if The absolute position of r in frame F° is 2 r °(0 = H r (0 = Ho/OH^COr'W 2 0>2 2 7,0, 2 -w (l ,t)s +x c -w (x ,t)s l ] /,5, + W,(/,,0C, + X S 2 Xa>t2 x 2 + lai2 2 2 Xai2 W (x ,t)c 2 2 lai2 (2.15) 0 1 The absolute velocity of this point in frame F° is 20 -(7,5, + w, (/,, Oc, )6\ - vv, (/,, t)s - x s, t -w (jc ,Oc (0, +d, 2 2 (4 + a, + 0 ) 2 ^2(^2.0^,2 liai>2 2 >Bi 2 (Ac, - w,(/,,0*,)0, + w,(/,,t)c+ x c { 2 hai -w (x ,os,,« (4 +«,+4)+w (x ,oc 2 i>2 2 2 2 2 (4 + a, + 0 ) (2.16) 2 la]2 0 0 2.2 Flexible L i n k Model 2.2.1 Flexible Beam Equation Consider the link / of the M-link flexible robotic manipulator shown in Figure 2.1(b), which undergoes transverse vibrations. We use the Bernoulli-Euler beam model to represent this flexible link, for which rotary inertia and shear deformation effects are assumed small (De Silva, 2006). The free-body diagram for a segment of this link with width dx at position x. is i shown on the right-hand side of Figure 2.2. The displacement of the segment from the X i axis is MA(X ,0 • ( Also V (x ,t') is the shear force and i i Link M.(x ,0 is the bending moment. ( i+1... Link n and Payload Joint; Figure 2.2 Flexible link i and the free-body diagram for an elemental segment. The force equation of motion (Newton's 2 nd law) in the Y direction is j 21 V,(x„t)- J7(x„0 + dV,(x„t) d w,(x„t) 2 p {.x )dx i OX; i i dt 1 (2.17) where p,(x ) is the linear mass density (mass per unit length) of the beam. The moment ( equilibrium condition (since rotary inertia is neglected) is M,(x,,0 + '^-^dx, - M , ( x , , 0 ox, V (x„t) + l 5F(x,.,0, dx, dx,.=0 3X; (2.18) Ignore the second order term with dx in equation (2.18), we have i V,(x„t) = dM,(x,,Q (2,19) dx. Since deformation due to shear is neglected, the relationship between bending moment and deflection can be expressed as (De Silva, 2006) M,(x,.,0 = £ , / , ( x , ) where E {x ) t t (2.20) dx, 2 is Young's modulus and 7,(x ) is the 2 nd ( moment of area of the link cross section about the Z. axis. By substituting equation (2.19) and equation (2.20) into equation (2.17), we obtain the Bernoulli-Euler beam equation d w,-(s Q 2 dx; + A(x,) f> 5x, 2 By assuming /? -(x.) and the flexural rigidity EJfa) dt 2 =0 (2.21) to be constant along the length of the ( link, we obtain the Bernoulli-Euler equation for a uniform beam E I 5 w,(x„0 , dx,' 4 ; 2.2.2 ; d w (x„t) = 0 dt 2 n t 2 (2.22) B o u n d a r y Conditions In order to solve the Bernoulli-Euler beam equation for a flexible-link robotic manipulator, realistic and proper boundary conditions have to be imposed at the joint and end of each link. 22 The commonly used boundary conditions are given below. 1. Free end: Bending moment: EJ, ^ (*"^ = fj ' ' dx w, 2 a 3 i (2.23) Shear force: EJ, ' ^ ' ^ = Q dx d w X 3 2. Simply supported (pinned) end: Deflection: w .(x.,£) = 0 ( d w(x,t) '—- — = 0 dx (2-24) 2 Bending moment: EJ, ' ' 1 2 3. Fixed (clamped) end: Deflection: w (x ,r) = 0 ; S l o p ( e: ^ M . O ( 2 ' 2 5 ) dx For a flexible-link robotic manipulator, the link inertia is small compared to the hub inertia, so the constrained boundary conditions can be used. It is usually assumed that boundary conditions for each link are clamped-free; i.e., the flexible link is fixed (clamped) at the x = 0 end and is free of dynamic constraints at the x. = /, end. This assumption is made t due to the difficulty of accounting for the time-varying or unknown masses and moments of inertia. In the present work we use realistic and more accurate boundary conditions representing the balance of bending moment and shear force at the x = /. end of the flexible t link i (clamped-mass). From the free body diagram of the link end element (see Figure 2.3), we have the following boundary conditions for link i: At x. = 0, W ,(0.0 = 0 , M M = 0, (2.26) ox i 23 Atx. =/,., Bending moment: d w,( ,t)\ 2 ( ill Xl dw,(x,,r) &/ E , I t V d w (x ,t) 2 -(MO), dx, i i dt; ' x,=l. (2.27) Shear force: E d\(x„t) J 3 i where J Li = m ^(w (x,,t)\ __ ) dt Ll dx, x,=l, l Xj 2 + (MO) l f d l \ 9w .(x,.,0 dt dx. ( 2 and m n. Li are the equivalent moment of inertia and mass at the end of link i, respectively, and (MO) represents the contributions of the masses of payload and link ; i +1, • • •, n. due to the mechanical offsets. Link i+1 ... Link n and Payload + (MO\ 9w,(x /) ) m ^(w (x ,t)\^y(MO) U (J u l i l Joint i Figure 2.3 Free body diagram of the link end element. 2.2.3 Solution of the Flexible Beam Equation The solution of the Bernoulli-Euler equation of link i can be found using the method of separation of variables. Specifically, for modal motion, the solution can be separated into a time function and a space function as w (x ,t) = 0 (x )S (t) i i i i i (2.28) 24 Then the beam equation (2.22) can be rewritten as E,I, d *,(x,)_ p,0,(x,) dx^ 4 - 1 d 8,(f) 2 =(o} S,(t) ( 2 2 9 ) dt where co, is a constant since it is simultaneously equal to a completely spatial function and a completely temporal function. The solution of the temporal part of equation (2.29) is 6fit) = A, cos(co,t) + B, sm(co,t) (2.30) where A, and B, are constants which are determined by the initial conditions of motion. The solution of the spatial part of equation (2.29) is ^(x,.) = C (cosh(/J,x,) + ^sinh(/5,x,) + ^cos(/?,x,) + ^ i n ( / 5 , x , ) ) u s (2.31) 2 where C ., C . , C . and C . are constants, and /?." = ^ EJ, i<X>i x 2 3 4 . Also, as clear from equation (2.30), co, is the natural frequency of vibration. The function <j),(x,) is known as the mode shape function (or eigenfunction) of the beam and describes the shape of each natural mode of motion of the beam. Application of the clamped-mass boundary conditions (equation (2.26) and equation (2.27)) allows the determination of the constant coefficients in equation (2.31). The clamped conditions at the joint base of link i yield C„=-C ,,., 3 C 2J = -C 4J (2.32) Substituting equation (2.28) into the boundary conditions of the link i: equations (2.26) and (2.27), and using equation (2.29), we obtain 4(0) = 0 <*/(0) = 0 */(',) = —Vutiiit) Pi + (MO)Mh)) (- ) 2 33 <?>: ( / , ) = — K M (i,)+(MO), <t>; (/,)) Pi where a prime indicates differentiation with respect to x,. Substituting equations (2.31) and 25 (2.32) into equation (2.33) yields coshC^) + cos( £ 7 , ) - A (sinh(/?,/,) + sin(/i,./,)) - (cosh(/?,/,) - cos(/?,/,)) (2.34) Pj sinh(#/,) + sin(/?,/,) - -t£- (cosh(#/,) - cos(/?,/,)) J ( M 6 > ) A ' 7 ? ' (sinh( £ / , ) - sin( )) A sinh(/5,7,)-sin(/5,/,) + ^ A ( c o s h ( / 5 , . / , ) - c o s f j f f , / , ) ) ^ ^ > (sinh(/7 /,) + sin(/i,/,)) (2.35) c o s h ( ) + cos(/J,/,) + ^ i t ( c o s h ( £ / . ) - cos(/?,/,)) M0 A ; A (sinh(/?,./,) - s i n ( ) ) + ( A Pi Substituting equation (2.34) into equation (2.35), we obtain the frequency equation l + cos(/5,./,)cosh(/i,./.) uPt (sin(#/,.) cosh(/J,/,.) - cos(/y,.) sinh(#/,.)) m A - — (MO) ft sin(/J,/,.) sinh(/3,/,.) A _ ilM- (2.36) i ( s i n ( / ? /) /) + cosh(/i; / /) c o s ( / ? )) sinh( A KA,-(MO), )^ 2 + ( 1 _ c o s ( A / ; ) c o s h ( A / ; ) ) = 0 P This frequency equation has an infinite number of solutions, j/?^., _/ = l,---,oo|. Each solution {5 is related to one natural frequency^.. The natural frequencies are computed as i} u a = Pu ^ 2 (2-37) Substituting equation (2.32) into equation (2.31) and using equation (2.34) yield the corresponding mode shape function for the jth mode for link / : 26 a (2.38) cosh^x,) - cos(/i x,) + -^(sinh(/5 x,) - sin^x,)) y y C 2,y cosh(/y,) + c o s ( / y , ) - ^ - j s i n h O J / ) + s i n ( / J . / , ) ) - ^ ^ ( Pi SIinh(/y,) + sinC/?/) - C O sh(/? /,) y -cos(/y,)) (2-39) Pi (cosh(/y,) - cos(/y,.)) - ( M ? ) ' ^ (sinh(/5 /,) y sin(/y,•)) Let ^(x.) and 0, (x,) be the mode shape functions corresponding to the natural frequencies A a>y and co (j ^ A:). From equation (2.29), we have ;k ^/"(*,)=<v^(*,) (2.40) A (2.41) A From integration by parts, one has (2.42) Multiplying equation (2.40) by (*,.); equation (2.41) by ^ (x.), subtracting the resulting y equations one from the other, and integrating from 0 to EJ, A K (A 2 -<°* ) 2 £ (*/) " ,M, gives ""(*,))& (2-43) A* j The right-hand side of equation (2.43) can be evaluated using equation (2.42) as 27 = 2^ fa (*/ H '"(*/) - , Y' to '"(*/) + 'to M* " t o ) - 'to H "to))C ( 2 ' 4 4 ) Substituting equation (2.33) and (2.37) into equation (2.44), we obtain the orthogonality relations for the clamped-mass beam mode shape functions: + (MO), {<Py(i,)<t>, '(/,) + Jf ^ ( x , ) 4 ( * > A + mMWM +^ (',M* (',) = o , k MMj'(',)) 0""*) , The constant C, y normalizes the mode shape functions so that £<t>;( )dx,=l, Xi (2.46) In this manner, one obtains an infinite set of mode shape function <j)y(x,) for link / and the corresponding natural frequencies co,j. Hence, according to the solution in equation (2.28), there is a corresponding infinite set of generalized coordinates, 5y(i), / = l,---,co, which satisfy equation (2.29). It follows that the overall response of the link i is w (x ,t) = ^, (x,)Sy(t) i 2.2.4 i j (2.47) The Assumed Mode Method From Section 2.2.3 we notice that the flexible links of a robotic manipulator are distributed parameter systems whose equations of motion may be described by a set of Bernoulli-Euler partial differential equations (PDE). Equation (2.47) states that the exact solution to the Bernoulli-Euler PDE requires an infinite number of modes. For typical applications, however, the higher order modes may be truncated since they represent frequencies that are well outside the operating bandwidth (De Silva, 2006). Furthermore, this modal truncation is required in order to meet the computation time constraints. A finite-dimensional model with link flexibility can be obtained by the assumed mode approach. The deflection of each link can be approximated by using a finite number of modes, and is expressed by a weighted summation 28 of the functions cpAx,); thus n. "m i (2.48) where (x ) are any functions that satisfy the boundary conditions. These are termed ( admissible functions. If the functions #>-,(x,.) are selected to be a set of polynomials in x,., the resulting frequencies of vibration are only approximations to the actual natural frequencies of the system. If the functions <??•, (x ) are chosen as the mode shape functions ^(x,), the ( derived frequencies of vibration are equal the natural frequencies of the system. Therefore, the deflection of link i of the flexible-link robotic manipulator can be approximated by V (2.49) For the flexible link robotic manipulator, the number of modes n , and the admissible m functions ^(x,) determine the accuracy of the approximation. If we increase the number of modes n mi the accuracy of the finite-dimensional model will be improved. But this will also increase the complexity of the analysis and computation. The high-order model will make controller design more difficult. In practice, as noted before, the contribution of the higher order modes to w .(x ,f) is minimal, and n ( ; mi is typically assumed to be 1 or 2. This corresponds to 1 or 2 significant modes. For the same number of modes, the accuracy of the assumed mode approximation is determines by the admissible functions ^ ( x , ) . The goal is to select the admissible functions as close as possible to the exact mode shape functions &ij( i) without increasing the complexity of the system model. From equations (2.36) through x (2.39), we can see that the mode shape functions ^(x,) are influenced by the physical parameters of the system, the boundary conditions, the payload, and the arm configuration. Next we will investigate the influence of these factors on the prototype flexible link manipulator shown in Figure 1.1. The schematic diagram of this planar two-link flexible manipulator is shown in Figure 2.1(a). The links of this experimental manipulator can be interchanged. Two types of manipulator links are used in this research. Type 1 link is a 1 m 29 long, 0.003 m thick, and 0.051 m tall aluminum thin beam. Type 2 link is an aluminum rod that is 2.0 cm in diameter and 1.0 m long. We will use the following configuration: the first (inboard) link is type 2 aluminum rod and the second (outboard) link is type 1 aluminum thin beam. Their physical parameters are given in Table 2.1. For link 1, the equivalent moment of inertia J , mass m n at the end of the link 1, and the LX contributions of the masses of payload and link 2 due to the mechanical offset (M<9), are M =m +m +m LX 2 (MO) l h2 =(m d 2 p + m l ) cos(6> ) 2 p 2 For link 2, the equivalent moment of inertia J , L2 2 mass m at the end of the link 2, and L2 the contributions of the masses of payload due to the mechanical offset (MO) 2 M are = m T1 n L2 p J =J L2 (2.51) p (MO) 2 where m is the mass of link 2, m 2 h2 =0 is the mass of hub 2, m p mass moment of inertia of link 2 about joint 2 axis, J h2 is the payload mass, J is the inertia of hub 2, J p is 0 2 is the payload inertia, l is link length, d is the center of mass, and 9 is the joint angle of link 2. 2 2 2 Table 2.2 and Table 2.3 present the natural frequencies and the link end deflections of the first four modes of link 1 and link 2 under different boundary conditions, payloads and arm configurations. The exact mode shape functions for link 1 is time-varying and depend on the mechanical offset (MO) given x (MO), max -m d 2 2 +m l , p 2 in equation (2.50). The which occurs when 6 =±n 2 maximum value of (MO), is . The minimum value of (MO), is 71 (MO) lmin =0, which occurs when 9 =±—. 2 Figure 2.4 shows the first four mode shapes of link 1 with zero and maximum mechanical offsets and nominal payload. We can see that changes of mechanical offset do not significantly affect the mode shapes of link 1. Since the mechanical offset of link 2 is zero, we will ignore the influence of mechanical offset from 30 now on. Figure 2.5 shows the first four mode shapes of link 1 with clamped-free boundary conditions and clamped-mass boundary conditions with different payloads (zero, nominal, maximum payload) and zero mechanical offset. We can see that clamped-free mode shapes can only be used to approximate the first mode of link 1. For higher modes the differences between clamped-free and clamped-mass mode shapes are too excessive. Furthermore, the clamped-mass mode shapes of link 1 do not significantly change with the payload. Figure 2.6 shows the first four mode shapes of link 2 with clamped-free boundary conditions and clamped-mass boundary conditions with different payloads (nominal, maximum payload) and zero mechanical offset. We can see that like in the case in link 1, only the first clamped-free mode shape is close to the clamped-mass mode shape for link 2. The effect of payload on mode shapes of link 2 is greater than that of link 1. In summary, we can make following conclusions for the mode shapes of the two-link flexible robotic manipulator: • The mode shapes and natural frequencies are dependent on the physical parameters of the link, the payload, and the arm configuration. Because of link flexibility, the resonant frequency is dramatically reduced. This means that the robot has to move relatively slowly to reduce vibration under normal operation. Active vibration controller must be designed and implemented to achieve better performance. • In general, the mode shapes for link 1 are time-varying. They change with the position of link 2. But the influence of the mechanical offset is small and can be ignored for both links. Accordingly the constant mode shape functions may be used in the assumed mode method. • Only the first one or two modes of motion are significant for both links. This is verified using the frequencies given in Table 2.2 and Table 2.3. The high frequency terms in the system dynamics can be dropped in order to reduce the model order. These terms may be treated as model uncertainties in the controller design. • The larger the payload the smaller the natural frequencies. • For the first mode, the difference between the clamped-free and clamped-mass mode shapes is small. For higher modes, the difference cannot be ignored. In order 31 to achieve the same model accuracy using the assumed mode method, the number of modes has to be increased if we use the clamped-free mode shapes. • The effect of payload on the mode shapes of link 2 is greater than those of link 1. The effect of payload on mode shapes is not significant and can be ignored. • The deflections of a flexible link robotic manipulator may be approximated by the assumed mode method. The constant mode shapes with zero mechanical offset and nominal payload, will be used in the assumed mode method. Table 2.1 Parameters of the links. Link 1: rod Link 2: thin beam 0.8451 0.4035 1 1 0.5 0.5 0.8451 0.4035 0.38 0.38 1 1 6.4 6.4 4.2 4.2 0.2817 0.1345 (kg.m ) 4.5 4.5 (kg.m ) 1.9 1.9 Uniform density: p (kg/m) Link length: / (m) Center of mass: d (m) Link mass: m (kg) Nominal payload mass: m (kg) p Maximum payload mass: m x (kg) Link 1 hub mass: m (kg) hl Link 2 hub mass: m h2 (kg) Link moment of inertia: J (kg.m ) 2 0 Hub 1 moment of inertia: J 2 hl Hub 2 moment of inertia: J 2 h2 Nominal payload inertia: J (kg.m ) . 0.001 2 p Maximum payload inertia: J (kg.m ) 2 pnm Link flexural rigidity: EI (N.m ) 2 0.001 0.0026 0.0026 574.024 8.2238 32 Table 2.2 First four modes of link 1. Link 1 (rod) Offset (kg.m) 0 0 Max 0 hi fu 6A ) (Hz) (m) 0 0 Max 0 0 0 Max 0 1 2 3 4 1.8751 0.7065 0.6837 0.6585 0.6529 14.5916 2.0719 1.9397 1.7996 1.7691 2.0000 2.1493 2.1540 2.1516 2.1596 4.6941 1.3602 1.3221 1.3803 1.2719 91.4438 7.6786 7.2546 7.9078 6.7139 -2.000 1.3660 1.3898 1.3769 1.4163 7.8548 4.7697 4.7664 4.7709 4.7622 256.0453 94.4118 94.2847 94.4622 94.1190 2.0000 -0.0736 -0.0682 -0.0737 -0.0609 10.9955 7.8769 7.8750 7.8770 7.8725 501.7467 257.4884 257.3687 257.4955 257.2098 - 2.0000 0.0458 0.0423 0.0449 0.0378 Mode (j) Payload (kg) CI amped-ffee 0 Nominal Nominal Max CI amped-free 0 Nominal Nominal Max CI amped-free 0 Nominal Nominal Max Table 2.3 First four modes of link 2. Link 2 (thin beam) Ay f 2J Ajih) ^z) () m Mode (j) Payload (kg) 0 Nominal Max 0 Nominal Max 0 Nominal Max 1 2 3 4 1.8751 1.2616 1.0240 2.5276 1.1442 0.7537 2.0000 2.0486 2.0554 4.6941 3.9334 3.7406 15.8401 11.1224 10.0587 - 2.0000 -0.3124 -0.1131 7.8548 6.5820 5.9522 44.3526 31.1435 25.4686 2.0000 0.0868 -0.0459 10.9955 8.8400 8.2571 86.9134 56.1767 49.0122 - 2.0000 0.1267 0.0888 33 I - I Zero offset i i i i i i 0.4 i 0.5 Length (m) i 0.6 i 0.7 i 0.8 1 1 r i Maximum offset E 1.5 •fe 0.5- 0 0.1 0.2 i 0.3 i 0.9 1 Length (m) 2 | i 1 1 1 1 Length (m) Length (m) Figure 2.4 Mode shapes of link 1 with zero and maximum mechanical offsets. 34 2.5 |— i Free i 1 1 1 1 1 1 r Length (m) 51 ' 0 i 0.1 I i i 0.2 0.3 0.4 i 0.5 Length (m) I 1 1 1 1 0.6 0.7 0.8 0.9 1 Length (m) Figure 2.5 Mode shapes of link 1 with different payloads (zero, nominal, maximum) compared to a free-end link. 35 2.5 | 1 1 1 1 1 1 1 1 r 1 r Length (m) 2 I 1 1 1 1 1 i 1 Length (m) Figure 2.6 Mode shapes of link 2 with different payloads. 36 2.3 Derivation of Equations of Motion 2.3.1 Closed-form n-link Model The dynamic equations of a planar n-link flexible robotic manipulator shown in Figure 2.1(b) can be derived using the well known energy method of Lagrangian dynamics. First we need to calculate the kinetic energy T and potential energy V of the system and then form the Lagrangian L = T-V . On the basis of the discretization introduced in Section 2.2.4, the Lagrangian L becomes a function of a set of N generalized coordinates {g,(0} > a n d the dynamic model is obtained by satisfying the Lagrange's equations d dL dt dq t where {/X0} a r e m e dL dR dq + i r dq . , i = l,---,N. A r = f., (2.52) i generalized forces and R is the dissipation function. For a point r. on link i inframeF' one has r/(0 = [x, w,( ,t) Xl 0 if (2.53) The link deflection can be approximated by the assumed mode method as given in equation (2.48). Based on the analysis in Section 2.24, we will use the constant clamped-mass mode shape functions with zero mechanical offset and nominal payload as admissible functions. Then ^ ( ^ , 0 = 21^(^)^(0 (2-54) 7=1 Set (MO) = 0 in equation (2.38) and (2.39). We obtain the clamped-mass mode shape i function for the jth mode for link /' as 37 c c o s h ^ x , ) - cos(/^x,.) + —^- (sinh(/^x,) - sin(/^x,)) coshfjy,) + cosC/y,) - (sinh(/J,/,) + sin(/J ./,)) (2.55) y Pi SIW W + sWfiyl,) - - ^ ( c O S h ^ / , ) - COSfjff/)) A From equation (2.36), we have the corresponding frequency equation l + cos(#7.)cosh(;0;/,.) uPi (sin(/5,./,) cosh^./,.) - cos(/?,/.) sinh(£7,.)) Pi m <sm(#/,)cosh(#/,.) + cos(5,./.)sinh(/5,./,.)) / (2.56) i P + (l-cos(/5,./,)cosh( 5,./,.)) = 0 2 / P The position vector r°(t), the velocity vector v°(t), and the absolute angular velocity 0° (equations (2.8) through (2.10)) in Section 2.1 can be used to form the kinetic energy, potential energy, and dissipation function expressions for the flexible link manipulator. The kinetic energy of the hub i is — where m hi is the hub mass and J 1 hi / 0\T Ol , 1 j /^0\2 (2.57) is the hub moment of inertia. The kinetic energy of link i is (2.58) The kinetic energy of a payload with mass m and moment of inertia J located at the end of link n is T =\myjv% _ \j (9\« p ir li+ p df + n (2.59) The total kinetic energy of the system is 38 (2.60) 1=1 1=1 The total potential energy of the system is given by ;=r (2.61) dx, 2 /=i *~ where U is the elastic potential energy of link / . i Assuming that the energy dissipation in the system can be modeled using equivalent viscous damping, the total dissipation function of the system is (2.62) where the subscripted b terms are equivalent viscous damping coefficients. The first term represents the energy dissipated due to friction in the link joints and the second term is the energy dissipated due to structural damping. Substituting equations (2.60) through (2.62) into equation (2.52), the closed-form equations of motion of a planar n-link flexible manipulator are obtained as M (q)q + h(q, q) + Kq + Bq = u where q = \d ,---,0 ,S ,---,S ] n n ,• • • , S ln i n l ,5 n n (2.63) j are the generalized coordinates, 0 are the { joint variables of link i, S are the deflection variables, M is the positive-definite symmetric tj mass matrix, h is the vector of Coriolis and centrifugal forces, K is the stiffness matrix, B is the diagonal damping matrix, and u is the n x i vector of input torques. Since all the links are modeled by uniform Bernoulli-Euler beams having constant clamped-mass mode shapes with zero mechanical offsets and nominal payload, the following integrals are constant parameters in the equations of motion and can be computed offline: (2.64) (2.65) 39 (2.66) (2.67) (2.68) 7 (2.69) 4 = £>,4(*,)A y Recall the normalization of the clamped-mass mode shape functions in equation (2.46). We have (2.70) hijj = {' PA/(x.)dx. = p.l, = m, The orthogonality relations for the clamped-mass beam mode shape functions in equation (2.45) with MO = 0 become i (2.71) From equation (2.68) and (2.42) we have (2.72) (EI\ j f ^ (x, )<f>, ""dx, - U (x, ) 4 "'(X,) k (x, ) 4 " (x,) Substituting equation (2.41) into equation (2.72) and using the boundary conditions in equation (2.33), we obtain hijk = J ' ' ( ^ ) , ^ " ( ^ ) 4 " ( ^ ) ^ = 0 {EI\ | ^ ( x ^ - ^ c o ^ M . y t x , -[^(x,)4 "'(x,) - ^'(x,M,''(x,)' (2.73) =< I M (*, )<j>, (x, )dx, - (EI\ k -mj y (/, )<P, (I,) - JJ' k (/, M , ' (/,) Pi ®* t M (*/ )<t>ik (*,• ) A + mjy (/,- )<p (/,.) + JJ' ik (/,. M / (/,.) 40 Substituting equation (2.70) and (2.71) into above equation we obtain f0 (2.74) (j * k) u = *) co,. The orthogonality relations and normalization of the mode shape functions result in convenient simplifications in the diagonal blocks of the mass matrix M relative to the deflections of each link, due to the particular values attained by I 2jjk in equation (2.67). From equation (2.74) it can be shown that the stiffness matrix becomes diagonal and take the values m + mj^f COy 2.3.2 +JJ '(l ) 2 i i Single-link Model In this section, we develop an explicit finite-dimensional dynamic model for a planar singlelink flexible robotic manipulator shown in Figure 2.7. Figure 2.7 Single-link flexible robotic manipulator. The link deflection can be obtained from equation (2.54) by setting i = 1; thus 41 w,(x„t) (2.75) = Y (t>, (x )8, (t) j j x j 7=1 where 4, (x,) are the constant clamped-mass mode shape functions with zero mechanical y offset and nominal payload. The kinetic energy of the hub is 1 - 2 (2.76) The kinetic energy of link is (2.77) Substituting equation (2.13) into equation (2.77), we have =^ 2 = J o p \[x s x x \ r &{ i [ x +w (x ,0^ } +{[x,c, -s w (x ,t)]0\ +c w (x ,t)]6 x x + w > ( x x x 1 x i> 1 2 ! x x +w (x ,t)c } x x x x dx (2.78) x ^ ^ i ( i ' ) i ^ i ( i ' o} dx + 2 x r x + x Substituting equation (2.75) into equation (2.78), we obtain n = \ i P {l*. + i (*i>OW? + 20,w, (x,, Ox, + w (x,, 0} T 2 w 2 2 An \ x, + _ _ ^ ( x , H , ( 0 2 1 rt 2 0, +20,|;^.(x,)J ,(Ox, 2 (2.79) 1 7=1 dx. = 2A * + V7= The kinetic energy of payload is obtained by setting i = 1 in equation (2.59); thus T =\m (yy\:\ _ ^J (0\° p p xr li+ p + df x (2.80) Substituting equations (2.4), (2.10), and (2.13) into equation (2.80), we obtain 42 T =\my fv\\ ^ p x X x p fn 1 = -J 0?+d f + x m 2 >< m 2 0 + ie\ £ A+ 2 2 ^ (/, )4 {t)ix + .d ; W (2.81) 7=1 4+i>,/(W (o y ' The total kinetic energy of the system is T-T +T +T "w.l x\ + 0 +20 £^,(x )J (Ox 2 1 1 7=1 i y 1 dx, + I Vi=i (2.82) 0?+20^^(1^(1)1, 11 + 2 7=1 V7=l + — mni p + 2 " The total potential energy of the system is given by setting i = 1 in equation (2.61); thus 1 rA V = - 2 (EI) i J o 5x (2.83) 2 Substituting equation (2.75) into equation (2.83), we obtain i 1 rch \ (EI) 2 Jo i V = - y X^/(*.)^(0 CiX, (2.84) 7=1 Use equations (2.82) and (2.84) to form the Lagrangian of the system: L = T-V (2.85) 43 From equation (2.62), the total energy dissipation function of the system is obtained as (2.86) The dynamic model of the single-link flexible robotic manipulator is obtained by substituting equations (2.85) and (2.86) into the Lagrange's equations d dL dL dt dq dq t + i 8R dq . = f, (2.87) i = l,---,l + «„ t The generalized coordinates of the system are q = [q ,---,q J x x+nm = {d ,5 ^i„ ) x x ml • One obtains d dL p x\dx + £ p x dt d6, ['' Z Aj (*, )<?„• ( 0 £ + x 1 A 2 ^ i / ( i ) \ \$\j x x (o+ dx w <r\j Oi ) \j (0 dx. 9 5 x w'=i +2p 9 x x ^ A 0, /, + 2 (2.88) 7=1 7=1 7=1 7=1 "m.l 7=1 5Z =o (2.89) = <fr dS PAMx) x A x dx xj + )£#*(*! A (O^i &=1 (2.90) +™ A (A )!>,* (A A (0 + -^A' (A ) Zrt/ (A A (0 44 dL = - [' PAJ (*• ) Z 4*toi)3* ( 0 ^ # 2 d5 xj -™A(A)£rt*(A)M0<M 2 (2.91) f'l n '' dS tl For the 0, generalized coordinate the generalized force is the torque applied to the joint r,. The rigid body equation for the link is obtained by substituting equations (2.88) and (2.89) into (2.87) and using the constant integrals defined in equation (2.64)-(2.70); thus +0 2X(A)^,(0 dx + m x p V7=l £(Au+VMy(A) + ^;(A))^(0 , V l »„,! i ' A E 4; (*. )3; (OS 4, (*• +20, 7=1 Vi (2.92) ('>& 7=1 V I +^E ^(A)^(0S 7=1^ ( A ) 4 ( 0 7=1 +6,0, =r, The time variation of the y'th mode shape function of the link is given by the generalized coordinate 8 for which the corresponding generalized force is zero. The deflection equation Xj for the/th mode is obtained by substituting equations (2.90) and (2.91) into (2.87) and using the constant integrals defined in equation (2.64)-(2.70); thus 45 "m.l + r ^ Z I Jo P^i ( i M* O i ) A x + m A (A M* (A) + ^A ' (A M*' (A) (2.93) r r'i "Z L M y Oi M* ( i + x m, + / « A ( A ) 2.3.3 w A (A M* (A) + J <r\j (A) p Two-link Model In this section we develop an explicit finite-dimensional dynamic model for the planar twolink flexible robotic manipulator shown in Figure 2.1(a). The link deflection for the first link is (2.94) 7=1 The link deflection for the second link is w 2 (*2>0 = Y<<l>2]{x )8 (i) 2 2J (2.95) 7=1 where <j> (x ) and <f> (x ) are the constant clamped-mass mode shape functions with zero Xj x 2J 2 mechanical offset and nominal payload. The kinetic energy of hub 1 is 1 (2.96) The kinetic energy of hub 2 is 46 1_ 2 1 2 l= " 2 (2.97) fn. # + 24£riy(A)*.,(0A + A' + 2 2^(/,)^(0 V7 7=1 4+4+I>/(A)4(') «2 7=1 The kinetic energy of link 1 is = ^ p \[x + 2<9, w, (x,, t)x + w (x,, t)}6 2 l 2 x\ 2 y + w\ (x, (2.98) ,t)}dx x 4 +20 £^.(x ) J .(Ox 2 + 1 1 1 rt < 1 1 7=1 + >dx. £^.(x,)j (o iy V7=l The kinetic energy of link 2 is 1 rt 2 £ /9 (/ 2 2 2 + (/,, 0 ) 0' + (*2 + 2 ( 2 » 0 ) (3 W \ix 2 + «, + 4 ) X [i,c e\ + w,(i,j)s e, ai2 ai2 + 2 + W, ( / , , 0 + w\ ( X , t)dX 2 2 2 w^,t)c ] ai2 •dx. +2x w (x ,i) — 2w ( x , 0 2 2 2 2 1 rt + • j Pi A#>, (A>0 + ^ 2 (* >0 [h Ai 2 * 2 0 2 2 c 2 ai + w 2 i ( A > ' K „ 4 + w, (A, ' K 2 1 > 2 ] ^. 47 f 2\ 6>, A + Zrty(A)*.y(o U J J V 2 2 = 1 1 f / (" - m 2 2 dx. + — 2 '•m.l (0>Zrt/(A)*.y(o+* ) 2 Z rty (A tfy (t))+\ W=' J Jf A f Z &y (* )*y (0 2 Z 2 2 dx. \J= l +(0>Zrt/(A)*.y(O + 0 ) 2 7=1 /, COS^£rt/(A)*.y(') + *2 0, V7=l -m / 2 2 f«m.l +Z r t y ( W , ( 0 s i n Z r t / ( A ) 4 y ( O + 02 0 + Z . 2 . A / ( 0 7=1 7=1 V>1 J f»m> \ +Zrty(A)4/(0cos Z r t / ( A ) 4 y ( O + 0 / 2 7=i 17=i y l sin Zrty'(/.)4y(O + 0 x 2 "mi /1,, \ - Z ^ A y C O -Zrty(A)4y(0cos Zrty'(A)4y(O + 0 K 2 7=1 7=1 V 7=1 J +Zrty (A )4y (0 Sin { Zrty'(A )4y (0 + * ^ 2 7=1 V7=' +m / 0,Zrty(A)4yW 7=1 2 1 /, cos Zrty'(A)4y(O + 0 e 2 \M 7=1 x (2.99) J +Zrty(A)4y(0sin Zrty'(A)4y(0 + <? V, 7=1 ^7=1 J 2 Z rty (A )4y (0 COS [Z rt/ (A )*,y (0 + 0 2 7=1 The kinetic energy of the payload is *V7=1 ; 48 \™ {[/, + 2 P w (/,,0]fl 2 2 + [l + w (l2,0](fl. +d 0 ) + 2 2 w (l ,t) + w](l ,/)} 2 2 ]+ 2 2 x 2 +2l w (l , t) - 2w (l , t) [l s 6\ - w (/,, t)c 6\ + w, (/,, ;K„ ] j 2 + A A m P (A>0 + ™i m P 1 +-^(fl, +^2 « 1 + + 2 2 x aa x ai2 2 w c « ) 9 2 fl 2 V- 2 (h>0 [Aa„2^i + i (A»0^„2fl+ w, (/,, 0ca„2 ] A + 2X-(A)*u(o 1 2 2 1 — m ^+ *2 + Srty&teyCO 2 (^,+Srty'(A)4y(0 + <92)2 p £rty(A)4y(0 V>1 7=1 + Xrty(*2)4y(0 J V7=l + | ^ ( ^ + 2 r t y ' ( A ) 4 y ( 0 + ^) 7=1 / cos Xrt/(A)4y(0 + *2 t fl V7=1 - Xrty(A )4y (0 S i n £rty'(A )4y (0 + # 2 fl + 2/2Xrt2y(/2)4y(0 2L 7=1 V7' " 1 ( n 7=1 V 7=1 m 7=1 = 1 m + Srty(A )Aj (0 c o s Jrty'(A )4y (0 + fl I s i n Zrty'(A)4y(0 + fl2fl Vi=i -2X^ .(/ )^.(0 -Zrty(A)4y(0cos Xrty'(A)4y(0 + A 2 7=1 2 7=1 fl V7=' +£rty(A)4y(0sin £rt/(A)*.y(0 + # 2 7=1 V 7=1 49 7=1 9, /, COS Vi=i (A)^,7(0 7=1 s i n 7=1 Z 4 /(A)^>7(0 + ^ V 7=1 0 (2.100) +Z^-(A)^(Ocosf|;^;(/ )j (o+ft I 7=1 1 "m.l 2 7=1 iy V 7=1 "m,2 7=1 The total kinetic energy of the system is 7 = 7" + T +T +T +T hl 1 1 T h2 ^ 1 J / l I2 1 T T (2.101) "^/J The total potential energy of the system is given by 1 Ch dx +— (EI) d w (x ,t) 2 x dx x 2 1 x x 2 J o 2 2 dx 2 Xj 2 1 J o 2 dx. 2 dx, + - ('(EI) ^ "(x )S (t) 7=1 Xj x d w (x,,0 2 £^;(x,)^.(o (2.102) dx. 7=1 Use equations (2.101) and (2.102) to form the Lagrangian of the system: (2.103) L = T-V The total dissipation function of the system is (2.104) i=i L z ;=i j=\ The generalized coordinates of the system are ' Ql+n , +n„,J m = (0 ,0 <5' ,-" <5' ,5 ,"-,5 ). 1 2J n J 1Vi 21 2Vi The dynamic model of the two-link flexible robotic manipulator is obtained by substituting equations (2.103) and (2.104) into the Lagrange's equations 50 d dL dL dt dq dq i i | dR dq t i' 1=1. (2.105) The above steps are coded to obtain the dynamic equations of the system using the symbolic manipulation software M A P L E (Maplesoft, 2005). This method protects against errors which are common in manual algebraic manipulation; for example, transcription errors, sign errors and misapplication of the chain rule of differentiation. The derived dynamic equations are given in Appendix A. The M A T L A B (Mathworks, 2005) code and the C code of this model are obtained by using the Code Generation package of M A P L E . This nonlinear model is used to simulate the two-link flexible manipulator. The linear model derived from this nonlinear model is used in the design of the MPC controller as presented in Chapter 5. 2.4 Linearization of the Equations of Motion From Section 2.31 the closed-form equations of motion of a planarrc-linkflexible manipulator are obtained in the form M(q)q + h(q, q) + Kq + Bq = u (2.106) These equations are nonlinear. If a linear model of the nonlinear system can be obtained that is sufficiently accurate over a suitable range of operating conditions, then techniques of linear control analysis and design may be applied to the linear model. In using such a linear model it must be ascertained that it remains valid over a suitable range of operation of the plant. For a wide operating range more than one linear model is needed to cover different regions of the operating range. Here the proper linear model should be used is selected depending on the operating conditions. In this section, local linearization technique is used to derive a linear model for a nonlinear planar n-link flexible manipulator. The resulting linear model is used for controller design and analysis, as presented in the subsequent chapters of the thesis. The operating point of a dynamic system defines its overall state under a specified operating condition. A linearized model is an approximation that is valid in a small region around an operating point of the system. Near the operating point the approximation will be good, while far away it will become increasingly poor. When generating a linearized model from a nonlinear model, the choice of operating point is important as it will determine the 51 accuracy of the approximation. The operating range of motion of a planar rc-link flexible manipulator can be large (e.g., large changes of joint angles). Consequently, in linearization of the equations of motion, often many operating points have to be considered. For this reason, in this section we present an approach for deriving closed-form linearized equations about any operating point. Consider the nonlinear equations of motion given by equation (2.106). For an operating point ( q , q , q , u ) , a linear time-invariant approximation to this 0 0 0 0 system is valid in a small region around this operating point. To derive the linearized model, it helps to first define a new set of variables centered about the operating point of the states, inputs, and outputs, as Aq = q - q ; Aq = q - q 0 Aq = q - q ; Au = u - u 0 0 0 (2.107) where the subscript "0" denotes the operating configuration and " A " indicates the variation from the operating point. By definition, the operating point is a solution of equation (2.106), as given by M(q )q + h(q , q ) + K q + Bq = u 0 0 0 0 0 0 (2.108) 0 The motion near the operating point can be described by M(q + Aq)(q + Aq) + h(q + Aq, q + Aq) 0 0 0 0 (2.109) +K(q + Aq) + B(q + Aq) = u + Au 0 0 0 Perform a Taylor series expansion on equation (2.109). Assume the deviations from the operating point are small so that the Taylor series can be truncated after the first term, resulting in the following equation: M(q ) + 0 8M dq Aq (q + Aq) + h(q ,q ) + 0 0 0 ah 8q Aq + — dq Aq (2.110) +K(q + Aq) + B(q + Aq) = u + Au 0 0 0 Substituting equation (2.108) into equation (2.110) and neglecting the high-order terms, we obtain the linearized equations of motion of the system: 52 M(q )Aq + 0 oh dq dM B Aq + dq q + 0 ! q (1 oh dq + K Aq = Au (2.111) qo.qo In this thesis, the controller design is based on a linearized model of the plant. Specifically, the nonlinear model is linearized about an operating configuration where the each joint angle has a specific value 0 while all the other generalized coordinates, speeds iO and inputs are equal to zero. This is the equilibrium operating point of the system when each link of the planar flexible robotic manipulator rests at a specific joint angle with no input and no deflection. The equilibrium operating point remains steady and constant with time, with all states in the model at equilibrium. It is also known as a steady-state or trimmed operating point. A model that is linearized about a stable equilibrium operating point is likely to remain within the region around the equilibrium value. Such a model will give a good approximation to the nonlinear model. A model linearized about an unstable equilibrium operating point is not likely to remain within the region around the equilibrium value. Such a model will become a poor approximation to the nonlinear model once it deviates considerably from this equilibrium point. So for a robotic manipulator with a large range of movement, a piecewise linear model (linearized at a sequence of equilibrium operating points) should be used to reduce the model error. This is a special case of the general linearized model presented in equation (2.111). For an «-link flexible manipulator, h in equation (2.111) is the vector of centripetal and Coriolis terms which involve products of the generalized velocities. So, each dii term of the derivative — consists of the generalized velocities. In this case then dq dh dh dq dq q<>.q<) dM dq =0 qo.o (2.112) q =o 0 qo By substituting equation (2.112) into equation (2.111), the linearized equations of motion of the system are obtained as M(q )Aq + BAq + KAq = Au 0 (2.113) 53 where q = 0 , • • •, 0 , 0, • • •, 0), and M , B, and K are constant matrices. Also n We assume that the system outputs are the joint angles and the link deflections. The linear state-space equations of the system are X = AX + BU Y = CX (2.114) where X =[Aq,Aq] r A= B I 0 -M"'K - M ' B 0 0 0 M' 0 c= u = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" Au (2.115) <I>, „ 2.5 Non-minimum Phase Characteristic In this section, we investigate the non-minimum phase characteristic of a flexible link robotic manipulator. For a linear continuous-time system, if all the zeros are in the left half of the complex plane, such a system is called a minimum-phase system. A minimum-phase system with a given magnitude curve in the Bode plot will produce the smallest net change in the associated phase angle. If there are system zeros in the closed right half of the complex plane, such a system is called non-minimum phase system. In the linear discrete-time case, the 54 system is non-minimum phase if there are zeros that lie outside the unit circle. The non-minimum phase concept can be extended to a nonlinear system. By using the inverse dynamics (input-output linearization) approach, the dynamics of a nonlinear system are decomposed into an external part and an internal part, as shown in Figure 2.8. The zerodynamics of the system are defined as the internal dynamics of the system when the control input maintains the system output at zero. A nonlinear system is minimum-phase if its zerodynamics are asymptotically stable; otherwise, the system in non-minimum phase. Instability of the internal dynamics implies instability of the overall closed-loop system. The inverse dynamics approach cannot be applied directly to non-minimum phase systems because they cannot be inverted (inverted dynamics is unstable). This is a generalization of the linear system result that the inverse of the transfer function of a non-minimum phase linear system is unstable. Therefore, for such systems, control laws that achieve perfect (asymptotically convergent) tracking error should not be pursued in general. Instead, one should find controllers that lead to acceptably small tracking errors for the desired trajectories. External Dynamics (input-output part) Output y > Input u Internal Dynamics (unobservable part) Figure 2.8 External dynamics and internal dynamics of a nonlinear system. Next we investigate non-minimum phase characteristics of a linear system using the root locus method. The root locus gives the closed-loop pole trajectories as a function of the feedback gain K, assuming negative feedback (or some other variable parameter). Consider a single-input single-output (SISO) system with open-loop transfer function 55 G(s) = ^ D(s) (2.116) The zeros of the system are the roots of N(s) = 0 (2.117) The closed-loop transfer function is G(s) = (2.118) D(s) + KN(s) The closed-loop poles are the roots of D(s) + KN(s) = 0 (2.119) Divided both sides of equation (2.119) by K. We have D(s) K + N(s) = 0 (2.120) From equation (2.120) and equation (2.117), we notice that as the feedback gain increases, the closed-loop poles of the system are attracted towards the open-loop zeros of the system. If the open-loop system is non-minimum phase (i.e., has RHS zeros), then the closed-loop system can become unstable under static output feedback. For multi-input multi-output (MLMO) linear systems, the transfer function G(s) becomes a transfer-function matrix G(s) . The transmission zeros (Maciejowski, 1989) of a controllable and observable m input and r output «th-order linear state-space system X = AX Bu + ( 2 m ) Y = CX + Du are defined as the values of s for which the normal rank of the system matrix drops to rank A-sl n C B D < n + min(r,m) (2.122) It can be shown that the open-loop transmission zeros of the system are the eigenvalues of A - KBC as /T->oo (2.123) 56 The closed-loop characteristic roots when negative feedback of the form Kl is applied to the system are the eigenvalues of the closed-loop ' A ' matrix A = A - KBC (2.124) c From equations (2.123) and (2.124) we. observe that as the static feedback gain K is increased, the closed-loop poles of the system are attracted towards the open-loop transmission zeros of the system. If the open-loop system has non-minimum phase transmission zeros (RHS zeros), then the closed-loop system can become unstable under static output feedback. Controller design for a non-minimum phase system is more difficult than that for a minimum phase system owing to the limited gain margin. The improper controller design can make the instability of the zero-dynamics to have an effect on the closed-loop system stability. The non-minimum phase characteristics of the system limit the loop bandwidth, and the achievable performance of the feedback system is reduced. For example, when using inverse dynamics algorithm, the right hand side (RHS) zeros will become unstable poles in the inverse system. The controller now has unstable poles that can cause the overall system to become unstable. One noticeable characteristic of a non-minimum phase system is the nature of its step response. For a non-minimum phase system, the step response initially starts to move in the direction opposite to final steady-state value. To illustrate the non-minimum phase characteristic of a flexible link robotic manipulator system, consider the single-link flexible manipulator shown in Figure 2.7. The nonlinear dynamic model of the system is given by equations (2.92) and (2.93). Using equation (2.113), the linearized model of the system with a single flexible mode is obtained as M 0,+M 5 (t) u M n + b 0 =T u g i A +M 5 (t) 22 u x x + k,5 (t) + b 8 n n u =0 (2.125) where 57 M 1 2 =M M 2 2 =m, 2 1 = / „ , +m l 0 (l ) p x u J 0'(l ) + ] p 1 (2.126) k = co x ,(/,)' +J <f> '(hf p m.+m^M +J <P '(l f 2 xx u p xx x Assume that the overall system input is the joint torque r, and the outputs are the joint angle 0 and the link deflection w (/, ,t) = <j> (/,)8 ,(£). The transfer function from input torque X x n X T to joint angle 0 is X X T8( ) CJ = s —7T T (s) x (2 127) Ms +b s + k 2 22 s[(M M u -M )s 2 22 3 l2 ]X +(M b u x + M b )s 2 n 22 m + {M k, + b b )s n m + b k] u m The transfer function from input torque r, to link deflection w (l ,t) = (j) (l )S (t) x x n x t is u G (s) = TW (2.128) T ] ( S ) -MJMs = (M M n -M )s 2 2 2 3 X2 +(M b +M b )s 2 ]X u 22 ex + (M k xl x + b b )s + b k ex xx gx x In this case, from equations (2.127) and (2.128) we observe that there are no RHS transmission zeros. The overall system is a minimum-phase system. But there is a zero at the origin of the s-plane (i.e., at s = 0) in equation (2.128). If we assume that the overall system output is the link deflection w,, there is a zero in the closed right half of the complex plane, so this system is a non-minimum phase system. If we assume that the overall system output is the tip position K =%^ ^ k A =3 (2.129) the overall transfer function of the system becomes 58 T (S) 7,7,(5) T (s) X t ^12^1 (A) 22 s[(M M n 22 -M 2 1 2 > +(Af„fe„ + M 3 2 2 (2.130) s + 6, ,5 + A:, 2 6„> +(M k 2 n + b b )s + b A] l m u The zero dynamics of this system depends on the sign of the term C , = M. 22 0 M <t> (/,) n z u in equation (2.130). If this term is negative then the zero dynamics of the system is unstable, and the system is non-minimum phase. For a single-link flexible robotic manipulator without a payload, substituting equation (2.126) into C , , we have z C, =M z M, ^,(/,) 2 2 2 (2.131) m - /,M4,(A) x From equation (2.56), the frequency equation without payload is 1 + cos(#7,) cosh(/J./,) = 0 (2.132) The clamped-free mode-shape function is obtained from equations (2.38) and (2.46) as 4,(s,) = cosh(Ax,) -cos(/J,x ) 1 ^ ; } ° , f \ [sinh(/V,) -sin(flx,)] (2.133) sinh(p,/,)-i-sin(/5,/,) C 0 S l + C S ( l ) 7 By using equations (2.132) and (2.133), the closed form of the integral parameter in equation (2.131) is found as (2.134) (AIM / By substituting equation (2.134) into equation (2.131), we have zl 1 (AA) (A) (AA) (2.135) 2 59 where /?,/, is obtained by solving frequency equation (2.132), and it has the constant value /J,/, =1.8751 (2.136) From equation (2.133), we see that the first clamped-free mode shape rtn( i) i x s always positive and is an increasing function. Substituting equation (2.136) into (2.133), we have rt.('.) = 2 (2-137) Substituting equation (2.136) and (2.137) into equation (2.135), we have 1 (1.8751) <0 (2.138) 2 If the system output is the tip position, the single-link flexible robotic manipulator without a payload is always a non-minimum phase system. The non-minimum phase condition in this case is a result of the non-collocated sensor and actuator positions. For a system with payload, the non-minimum phase characteristic will also depend on the payload. If we assume the single link to be an aluminum rod or an aluminum thin beam with the parameters given in Table 2.1, we can calculate the system zeros using equation (2.130). Figure 2.9 and Figure 2.10 show the pole-zero maps of these systems. We can see that both systems have RHS zeros, so the systems are non-minimum phase. For the two-link flexible manipulator system with the parameters given in Table 2.1, we can find the system zeros and poles by using the nonlinear model developed in Section 2.3.3 and linearizing it about an operating point. We assume that the system outputs are the tip positions of link 1 and link 2. Figure 2.11 shows the pole-zero map of the system which is linearized at the operating point where all the states are equal to zero. We notice that the system has a RHS zero; so the system is non-minimum phase. 60 Pols-Zero Map Figure 2.9 Pole-zero map of a single-link flexible robotic manipulator (aluminum rod). Pole-Zero Map Figure 2.10 Pole-zero map of a single-link flexible robotic manipulator (aluminum thin beam). 61 Pole-Zero Map 10 O O I •2D - ; I 1 1 1 1 5 1 1 j 1 •10 -8 -b .4 -! 0 3 4 6 8 .-•10 ID Real Axis Figure 2.11 Pole-zero map of a two-link flexible robotic manipulator. 2.6 Summary This chapter presented the derivation of the models for the kinematics and dynamics (kinetics) of a planar flexible link robotic manipulator. A flexible link model was developed based on the Bernoulli-Euler beam theory. Boundary conditions and mode shape selection were investigated. More realistic and accurate boundary conditions were obtained through the balance of moments and shear forces at the end of each link in the dynamic model development of the system. A dynamic model for the manipulator was derived using Lagrange's equations. Closed-form equations of motion for a planar «-link flexible manipulator were established. Detailed nonlinear models for a single-link and two-link flexible manipulator were derived. Local linearization techniques were used to derive a linear state-space model of the system at an equilibrium operating point. Non-minimum phase characteristic of the flexible-link system was analyzed. It was shown that if the overall system output was the tip position, the system would be non-minimum. The non-minimum phase characteristic of a flexible link manipulator system was shown to be a result of the noncollocated sensor and actuator positions. For such a system, perfect or asymptotic convergent 62 tracking would not be achieved, and controllers should be designed that would lead to acceptably small tracking errors for the trajectories of interest. 63 Chapter 3 Intelligent Model Predictive Control In this chapter an intelligent model predictive control (IMPC) approach is developed for the motion control of a flexible-link robotic manipulator. First, in Section 3.1, overall structure of the IMPC algorithm and its underlying strategy are given. Main components of the IMPC system are developed in the subsequent sections. In Section 3.2, a multi-stage, unconstrained, model predictive control (MPC) scheme with guaranteed nominal stability is developed. Application of the IMPC algorithm for a robotic system with an unknown payload is presented in Section 3.3. Fuzzy rule-based intelligent auto-tuning of the M P C controller, which constitutes the IMPC, is addressed in Section 3.4. 3.1 Overall Structure of I M P C Figure 3.1 shows a schematic diagram of the intelligent model predictive control (IMPC) system. The IMPC is based on a two-level hierarchical control architecture. This control structure is used to combine the advantages of conventional M P C control and knowledgebased soft control, resulting in the IMPC for control of the plant, which is a flexible-link robotic manipulator in the present application. The top level of the two-level architecture is a fuzzy rule-based intelligent decisionmaking system. The bottom level consists of two modules: System identification module, which accommodates the model parameter variations in the system, and M P C module, which generates the control inputs based on the linear model generated by the system identification module. The upper-level intelligent fuzzy rule-based tuner interacts with the bottom level modules. The upper-level fuzzy tuner automatically adjusts the tuning parameters of the MPC controller based on the output feedback. Proper tuning parameters are selected by the fuzzy tuner in order to achieve the desired closed-loop stability, and performance while satisfying the input and output constraints. The fuzzy tuner is also able to adjust the model structure of 64 the system identification module, if necessary, for large model errors, and as a result improves. the robustness of the controller. Design and development of each component of the LMPC for motion control of a flexible-link robotic manipulator system are presented in the following sections. Desired System Performance Input and Output Constraints Fuzzy Tuner Model Structure Update Tuning Parameters Linear Internal Model Refer enc e Trajectories Linear MPC Controller Model Parameters < Control Inputs Real Time System Identifier Plant (Flexible-link Robotic Manipulator) Outputs Figure 3.1 Structure of the intelligent model predictive control (IMPC) system. 3.2 M P C Controller Design A computationally efficient multi-stage M P C algorithm with guaranteed nominal stability is developed in this section. It will be used as the lower-level direct controller of the flexiblelink robotic manipulator system. Among the reasons for choosing M P C for low-level direct control of the flexible manipulator are the following: • M P C deals with multivariable systems in a systematic way. The design of an MPC is based on a plant model and a cost function (i.e., performance index). This results in more systematic design and analysis than with traditional proportional-integralderivative (PID) control. Also this is an effective way to deal with dynamic interaction (dynamic coupling) in multivariable systems and gives good overall closed-loop performance. 65 • It can take account of actuator limitations, and can systematically handle input and output constraints. This represents a major difference between M P C and other popular multivariable control techniques (e.g., Linear-Quadratic-Gaussian or L Q G method). M P C controllers explicitly consider constraints and allocate the available plant resources intelligently as the system evolves over time. It makes the plant operate closer to the constraints, and hence provides better performance, which can lead to more profitable industrial operation. • The design objectives can be specified in a flexible manner by changing the cost function of MPC. • It can effectively control systems with time delays, nonminimum-phase characteristics, and instabilities. As shown in Chapter 2, the flexible-link robotic manipulator system has nonminimum-phase characteristics. M P C can deal with these characteristics through proper setting up of the cost function of the controller. A nonminimum-phase system has a shorter term response in .one direction and a longer term response in the opposite direction. The MPC optimization should focus primarily on the longer-term behavior in order to avoid system movements in the wrong direction. • 3.2.1 It takes full advantage of the power available in modern control computer hardware. Basic Principles of MPC Model predictive control (MPC) is a model based control technique. It is generates the control input signals to the plant by combing a prediction and a receding-horizon control strategy. It uses an explicit internal model to generate predictions of the future plant behavior. Usually, an approximate, linear discrete-time plant model is used to predict the plant behavior over a future prediction horizon. A cost function (i.e., performance index) which represents the desired system performance over a future horizon has to be defined. The control strategy determines the future control inputs to the plant so as to minimize the cost function while taking into account the plant constraints at each time instance. Such constraints can include the physical limits of the actuators, boundaries of safe operation, and allowable lower limits for product quality. In the receding horizon control framework, only the first computed 66 control action is implemented. At the next sampling time, the optimization is solved again with new measurements from the plant. The length of the prediction horizon remains the same as before, but slides forward by one sampling interval at each step. The on-line optimization can be typically reduced to either linear programming or quadratic programming. The purpose of taking new measurements at each time step is to compensate for unmeasured disturbances and model inaccuracies, both of which cause the system output to be different from the one predicted by the model. This also introduces a feedback element into the controller. If the exact measurements of the states are not available, a state observer should be designed to estimate the states at each sampling time. Figure 3.2 shows the basic strategy of predictive control for a single-input, single-output (SISO) plant. We assume a discrete-time setting. Integer k represents the current time instant. The measured latest plant output y(k) and the previous plant outputs y(k-l), y(k-2), are known, and are shown by the filled circles in the upper segment of Figure 3.2. The previous moves of the controller are shown by the filled circles in the lower segment of Figure 3.2. The control input will only change at the time instants k, k +1, • • •, k + H -1, u and will remain constant after that. At the current sampling instant k, we need to calculate the next control move u(k). The prediction horizon H is the number of control intervals over which the p outputs are to be optimized. The control horizon H sets the number of control intervals over u which the manipulated variables are to be optimized. M P C may be considered an open-loop control design procedure where at each sampling time k, plant measurements are obtained, and an internal model of the plant is used to predict the future outputs of the system over the prediction horizon. (Note: The feedback comes implicitly by way of plant measurements used here.) Using these predictions, the future control actions Au(k + i\k), i = 0,1,-••H -1,are computed by minimizing a cost function. u The cost function usually is a quadratic function that is indicative of the desired performance over the considered horizon. Once the future optimal moves are chosen, only the first control move u(k) is sent to the plant. The plant operates with this constant input until the next sampling instant. Then the entire cycle of output measurement, prediction, and optimal input trajectory determination is repeated at each future sampling period. Since the horizons remain to be of the same length as before, but slide along by one sampling interval at each step, this 67 method of controlling a plant is often called a receding horizon strategy. Reformulation at each sampling instant is essential for achieving good closed-loop system performance. The predictions made during the optimization stage are not perfect due to the model errors and unmeasured plant disturbances. Periodic measurement feedback allows the controller to correct for this error and for unexpected disturbances. Past Future Output Setpoint o _O O O o -o o Prediction rforizon, H - K 0 o 0 >: B • Measured O Predicted J I I I [_ _l i I I l_ i l l l Time Input • Past Moves O Planned Moves Control Horizon, H u J I I l_ J I l_ Time Figure 3.2 Illustration of the strategy of SISO M P C at M i sampling instant. The basic structure shown in Figure 3.3 is used to implement the M P C . The inputs to the MPC controller are the references (target values for the outputs) and the measured plant outputs. The M P C controller consists of an internal model and an optimizer. The purpose of the internal model is to predict the future behavior of the plant. It can be linear or nonlinear. We will use a discrete-time, linear, state-space internal model in the present work. The reason for using a linear model is that the optimization problem of linear M P C is always convex, and this will guarantee termination of the optimization problem. The optimizer of the MPC is an optimization algorithm that minimizes a user defined cost function. The main purpose of the regulator mode of M P C is to hold the plant outputs at the reference values by adjusting the manipulated variables while satisfying all the constraints. The optimizer will guarantee that at 68 each time instance optimal manipulated variables are obtained to control the plant. Cost Constraints function Plant outputs Manipulated variables > Optimization Plant Unmeasured disturbances Past plant inputs and ! planned future inputs Measured outputs; Internal Model Predicted Outputs MPC Controller Figure 3.3 Basic structure of M P C . 3.2.2 State-space Model MPC Formulation For motion control of a flexible-link robotic manipulator, we assume the internal model of the MPC to be a linearized, discrete-time, state-space model of the form x(/c + l) = Ax(/V) + Bu(&) (3.1) y(k) = Cx(k) In Section 2.4 of Chapter 2, we have developed a linear, time-invariant (LTI) continuous-time state-space model of a planar n-link flexible manipulator in the following form: i(0 = Ax(f) + Bu(0 (3.2) y(0 = Cx(0 A discrete-time model can be obtained by converting the continuous-time model using zeroorder hold on the inputs at the sampling instants, and a sample time period of T seconds. s Accordingly, the control inputs are piecewise constant over the sampling period T ; thus s u(kT ) = u[(k + l)T ] s s (3.3) The solution of equation (3.2) is 69 (3.4) x(0 = e 'x(0) + Jf e '- Bu(r)cir A A( T) At t = kT, the solution is x(kT ) = e °x(0) + £ ' e AkT r A(A7; s (3.5) - Bu(r)cir r) At / = (& +1) 7^, the solution is x[(* + 1)7;] = e ^ > x ( 0 ) + [ ' e ^- Bu(r)dT A( T +Ts) A T) (3.6) By using equations (3.4) and (3.5), equation (3.6) can be expressed as *[(* +1)7;] = e < M0) A(kT = Ar e ^ ^x(0) + e A MT = ^ x ( ^ A7; + + f ' e ^- Bn(T)dT T +T,) A(kT r) [ " e ^Bu(T)dr AT e *x(0)+ =e +T Ts+T pe A ( i 7 ; ]] A(kT - Bu(r)Jr r ) r A(tr -r) 5 Bu(r)<ir (3.7) JkT, j ^ x(A:r ) + £ e <zYBu(M;) s Ar Let kT.->k. We have x(fc +1) = e *x(k) + £ e c7rBu(J:) AT Ar (3.8) = Ax(k) + Bu(k) where A = e AT, (3.9) B=£e dr Ar Using equation (3.8), we can convert the continuous-time model to a discrete-time one. Note that matrix C remains the same in the discrete-time model. We define the cost function of the MPC controller to be J = £ | y ( * + i\k)- r(k + + i=i Q(i) X | A f i ( * +1' -11 *)|| 1=1 (3.10) R(i) 70 where H is the prediction horizon, H is the control horizon, Q(z) is the tracking error u weight matrix (or output weight matrix), and R(z') is the control penalty weight matrix (or input rate weight matrix). We assume both Q(i) and R(z) to be positive semi-definite diagonal matrices. Also " k + i \ k " denotes the value predicted for time k + i based on the information available up to time k. The notation y(k + i\k) indicates the predicted outputs, and Au(k + i-l\k) deviations denotes the future control moves. The cost function J penalizes of the predicted controlled output y(k + i\k) from a reference trajectory r(k + i | k). The following input and output constraints are used: " ^Uj(k + y in^yj(k + i\k)<y Jmin i\k)<u jmm i= jmiiK Jm 0,-,H p where the subscript " ()." denotes the y'-fh component of a vector, and u m a x and u are the min vectors that contain the maximum and minimum control inputs for each joint of the flexiblelink robotic manipulator. In order to reduce the link vibrations we assume the deflections for each link to be constrained, and y . m a x and y . min denote the vectors that include the maximum and minimum link deflections. The M P C control action at time k is obtained by solving the optimization problem min J ( ) 312 AU(t|t),--,AU(t + // -l|t) u with the constraints given in equation (3.11). At time k the control inputs to the plant (robotic manipulator) are u(fc) = u(* -1) +AU(/V) = u(* -1) +Au(k | k)* (3.13) where AU(& | k)* is the first element of the optimal control input sequence. The remaining samples AU(/V +11 k)* are discarded, and a new optimization problem based on the newly measured outputs y(k +1) is solved at the next sampling step k+1. 3.2.3 Prediction In order to solve the predictive control problem, we have to compute the predicted values of 71 the controlled variables y(k + i\k) in equation (3.10), from our best estimate of the current plant state x(k | k) , the latest inputs u(k -1) , and the assumed future input changes Au(A: + i -11 k). The discrete-time model, given by the state-space model in equation (3.1), is used as the internal model of the M P C for the plant output prediction. The details are given next. Here we assume that the full state vector x(k) is available. If the full state vector is not available, a state observer has to be designed to estimate the state vector from the measured output y(k). Then, x(k) has to be replaced by x(k \ k) , in the following prediction equations. At current time k, the control inputs u(k) are not known. We have to use u(k \ k) rather than u(k) in the prediction. The internal model of the plant gives the one-step-ahead prediction: x{k + \\k) = Ax(k) + Bn{k\k) (3.14) y{k + \\k) = Cx(k + l\k) = CAx(k) + CBu(£ | k) We can find the predicted plant outputs in the prediction horizon by iterating this internal model; thus x(k + 2\k) = Ax(k + l\k) + Bu(k + l\k) =A x(k) + ABu(£ | k) + Bu(k + \\k) 2 y(k + 2\k) = CA x(k) 2 + CABii(& | k) + CBu(k + l\k) (3.15) x(k + i | k)=A'x(k) + A'' Bu(A: | £ ) + ••• + Bu(k + i -11 k) -1 y(k + i\k) = CA'x(£) + C A ' - ' B u ^ \k) + --- + CBu(£ + i-l\k) x(k + H H -l\k) \k)=A x(k) Hp p y(k + H \k) p + A ~ Bii(k\k) Hp l = CA * x(k) + CA ~ Bu(k W Hp l + --- + Bu(k + p | *) + ••• + CBu(£ + We assume that the inputs will change only at times k,k + \,---,k + H —\, H -\\k) p u and will remain <i<H -\ (3.16) constant after that. Specifically we have u(k + i\k) = u{k + H -\\k) u for H u p At time k, the latest control inputs u(k -1) are known. We have 72 u(k\k) =Au(k\k) + u(k-l) u(k + l\ k) =Au(yt + \\k) + u(k\k) =Au(k + \\k) +&\\(k | k) + u(k -1) i (3-17) u(k + i | k)=AVL(k + i\k) +Au(k + i-l\k) u(k + H -l\k)=Au(k p + H -l\k)+Au(k p + --- +Au(k \ k) + u(k -1) + H -2\k) p + ---+Au(k\k) + u(k-l) The prediction in terms of Au(k + i\k) can be obtained by substituting equation (3.17) into (3.14) and (3.15); thus 73 i(k + \\k) = Ax(k) + Bau(/V I it) + Bu(k -1) y(k + l\k) = CAx(k) + CBau(£ | k) + CBu(/t -1) x(k + 21 k)=A x(k) + A B a u ( / V | k) + ABu(/t -1) 2 + Bau(A: + l\k) + Bau(/V I k) + Bu(k -1) = A x(/t) + (B + AB)au(A: I k) + Bau(£ + \\k) 2 + ( B + AB)u(/V-l) y(k + 2\k) = CA x(/t) + ( C B + C A B ) a u ( £ | k) + CBau(£ +11 k) 2 + ( C B + CAB)u(/t-l) x(k + H | k)=A"» x(k) + ( B + A B + • • • + A " " b ) A U ( * ; | k) _1 u + ••• + Bau(A: + y¥ -11 k) + ( B + A B + • • • + A »~'b) u(k -1) H u y(k + H \k) u = C A " " x(k) + ( C B + C A B + • • • + C A " b ) A U ( * | k) W _ 1 + • • • + C B a u ( A : + H -11 k) + ( C B + C A B + • • • + u CA »- B)u(k-1) H ] £ ( * + # „ + 1 1 k)=A " 'x(k) + ( B + A B + • • • + A " B ) a u ( & | k) H + H + --- + ( B + AB)au(/V + / / „ - \ \ k ) + ( b + A B + --- + A " B ) u ( / V - 1 ) W = CA"» x(/t) + ( C B + C A B + • • • + C A " - b ) A U ( A : | k) y(k + H +\\k) +1 u + --- + ( C B + CAB)Au(yt + //„ - l | / t ) + ( C B + C A B + --- + C A " » B ) u ( A : - i ) x(k + H | k)=A x(k) + ( B + A B + • • • + a " ' b ) A U ( A : | it) Hp -1 p + --- + ( b + A B + --- + A ' ~ " B ) a u ( £ + / / // // u -\\k) + ( B + A B + • • • + A "'B)u(yt -1) WP y(k + H \k) p = CA x{k) + ( C B + C A B + • • • + C A " ' ~ ' b ) a u ( £ | k) Hp b)au(A: + H -11 k) + • • • + ( C B + C A B + • • • + CA ' " Hp H V + (CB+CAB +•••+CA"' (3.18) ' - 1 b ) u(/t -1) For a plant with n states, n measured outputs and n inputs, the vector of output predictions up to a horizon H can be written in the matrix-vector form x p u 74 (3-19) Y(*) = S x(k) + S u(k -1) + S „ AU(fc) x u A where y(k + l\k) y(k + 2\k) A\i(k u y(k + &xi(k + \\k) AV(k) Y(*) = y(k + H \k) I k) H +\\k) u Au(k + (3.20) H -l\k) u Kk + H \k) p CB CB+CAB CA CA 2 //„-i S = Z CA"» C A B (3-21) 1=0 CA H„ + l Z C A B CA Hp H„-\ Z C A B 1=0 CB 0 0 CB+CAB CB 0 H„-\ S.„ = H,-2 Z CAB Z 1=0 1=0 H H -\ u A CB B (3.22) u JCAB i=0 H„-\ Z C Z C A B CB+CAB H„-2 C A B Z 1=0 C A B Z C A B 1=0 Equation (3.19) is the prediction equation. It can be used to predict the future plant outputs. 75 The matrices S ,S and S X U AU are the constant matrices that depend on the internal model (matrices A , B , C ) and the M P C horizons (H ,H ) U only. In order to compute the future prediction at time k, we need the current state vector x(k) and the past input vector u(k -1) of the plant. For the flexible link robotic manipulator system, the plant states are the joint angles ( # , , • • • , # „ ) , the link deflection variables [5 ,---,8 ,---,S ,---,S ^^ u ]nmi n] m j and their derivatives. W e assume the measured system outputs to be the joint angles and link deflections. The derivative terms o f the plant states are not measured directly. This means the full state vector x(k) is not available, and an observer has to be designed to estimate the state vector. Note that i f a state observer is used, still the form o f the output prediction equation (3.19) remains the same, but x(k) has to be replaced b y x(k \k), which is the estimation o f state vector at time k. The state observer is a copy o f the plant (equation (3.1)) with feedback from the measured plant outputs, through the gain matrix L, to correct the state estimation. The equations o f the observer are given below. Predicted output computation: y(k\k-l) = Cx(k\k-\) (3.23) Measurement update: x(k | k) = x(k | k -1) + L'[y (*) = x(k\k-l) + -y(k\k-1)] V[y(k)-Cx(k\k-l)] Time update: x(£ + l|/V) = Ax(k | k) + Bu(k) (3.25) The notation used in these equations is • x(k \k-l) is the estimate o f x(k) given past measurements up to y(k - 1 ) . • x(k | k) is the update estimate o f x(k) based on the current measurements • L ' is the innovation gain. y(k). Given the past state estimate x(k -11 k -1), the time update predicts the state value at the next sample k (one-step-ahead predictor). The measurement update then adjusts this 76 prediction based on the new measurement y(k). innovation, The correction term is a function of the which is the discrepancy between the measured and predicted values of y(k): y (*)-y(k |k-1) = y(k) - C x ( k \k-l) (3.26) B y combining equations (3.23), (3.24) and (3.25), the overall state observer is obtained as x(k + \\k) = A(I - L ' C ) i ( * \ k - l ) + Bu(k) + AL'y (*) = (A - LC)x(£ | k -1) + Bu(k) + Ly(/c) where L = A L ' . This is a stable system i f the eigenvalues of A - L C are within the unit circle. Furthermore, i f we define the state estimation error vector as e(k) = x(k) - x(k \ k - 1 ) , then using equations (3.1) and (3.27) we have e(£ + l) = ( A - L C ) e ( £ ) (3.28) which shows that the state estimation error converges to zero i f the observer is stable, at a rate determined by the eigenvalues of A - L C . If the pair (A, C) is observable, then given an arbitrary set of locations in the complex plane, a gain matrix L exists which places the observer eigenvalues at these locations. The gain matrix L can be chosen to minimize the steady-state covariance of the estimation error with a known noise covariance matrix. This observer is then known as a Kalman filter. We can design the steady-state Kalman described above with the function kalman filter in the Control System Toolbox of Matlab (Mathworks, 2002). 3.2.4 MPC Computation and Constraint Handling In this section we will solve the optimization problem associated with model predictive control ( M P C ) . The cost function which we must minimize is given in equation (3.10). We can rewrite this cost function in the matrix form by using the notations defined in equations (3.20) through (3.22), as J = Y(k)-T(k)\\ + A\J(k) (3.29) where 77 ~r(£ + l) "y(* + i|*) , Y(k) = Au(k | k) , T(*) = r(k + H )_ Kk + H \k)_ Au(k + p p (3.30) AU(*) = H -\\k) u and the weighting matrices are given by o 0 0 Q(2) 0 0 0 'Q(i) Q= R= Q(H ) p R(0) 0 0 0 R(l) 0 0 0 (3.31) From equation (3.19), the predicted system outputs using a state observer are Y(k) = S x(k | k) + S u(k -1) + x u (3.32) S^ AV(k) u Define AT(k) = T(k) - Y(k) + S au AlJ(k) (3.33) = T(k) - S x(k | k) - S \x(k -1) x u We will call AT(Ar) a 'tracking error.' This is the difference between the future plant reference response and the 'free response' of the system, which is the response that would occur over the prediction horizon if no input changes were made ( AU(&) = 0 ). We assume the weighting matrices are diagonal, also Q > 0 and R > 0 . Their 'squareroots' matrices are (3.34) By using equations (3.33) and (3.34), the cost function of the system as given by equation (3.29) becomes J = Y(k) + AU(Jfc) - T(k) 2 Q 2 R : [Y(£) - T(k)J SgS [Y(£) - T(jfc)] + AV(k) S S T T e R S [Y(*)-T(*)' S [S .AU(*)-AT(*)] S A\](k) S AV(k) fl R e R AV(k) (3.35) A R 78 Equation (3.35) indicates that the cost function / is equal to the squared 'length' of vector "S [S AU(*)-AT(*)]' 0 AB (3.36) S AV(k) R For the unconstrained MPC, there is no constraint on the inputs and outputs of the system. The optimal value of AU(/t) is AV*(k) which minimize the cost function J given by equation (3.35). So A\J*(k) is the 'least-squares' solution of the equation , AU(*)-AT(*)J B = 0 (3.37) S,AU(*) or AV(k) •• S AT(k) Q 0 (3.38) The 'least-squares' solution of a set of algebraic equations of the form Ax = b is obtained by minimizing the least-squared performance function: J = min(Ax-b) (Ax-b) r (3.39) By differentiating / with respect to x and equating to zero will yield x*, which is the 'leastsquares' solution of the equations Ax = b , as x*=(A A)~V'b r (3.40) The numerical solution of Ax = b can be obtained in a least-squares sense using the QR' i algorithm. In Matlab® this solution is obtained as x* = A \ b . By using equations (3.40), (3.34) and (3.33), we have the optimal set of future input moves as 79 f -i T r ~S AT(*)~ E A U (/V) = 0 J -ii - i S AT(A:)" 0 0 T C = (S A U 0 A R y l = (SLS S S . + S S H SLS S e e (3.41) AT(^) QS „ + RJ"' S QAT(&) A AU = ( S L Q S . + R)" S 1 A R A U Q [ T ( ^ ) - Sxx(k I k) - S u(k u D] From this result we can see that for the unconstrained predictive control problem, an analytical solution can be obtained by using equation (3.41). The numerical solution of the unconstrained predict control problem can be obtained by using the Matlab notation: S AT(k) Q (3.42) AU*(ifc) = 0 According to the receding horizon strategy of MPC, only the first step of the computed control move in equation (3.41) is applied to the plant at time k. If the number of plant inputs is n , we just use the first n rows of the vector A U (k), that is u u AU(£) =AU(& I k)* -A?„xn„ ' ^ n „ x n „ ( / / „ - l ) -Ai„xn„ '0«„xn >H -\) o u A\]\k) " (sLQS + R ) " S : „ Q [ T ( * ) - Sxx(k \k) - S„u(£ ~ 1)] 1 itt (3.43) K [T(k)-S x(k\k)-SXk-l)] MPC x K AT(k) MPC where I n x n is the n x n identity matrix, and 0 u u Nx n ^ ^ is the n xn (H u 11 u -1) zero (null) matrix. The M P C controller gain matrix K MPC K MPC Here K MPC is defined as ^x„„,0„ „ . ](sLQS „ R)" SLQ , u>< uK 1) I + (3.44) is a constant matrix which depends only on the internal model (matrices A , B , C ) , 80 the weighting matrices Q and R , and the controller horizons (H ,H ). p u The unconstrained MPC control input vector at time k is u(k) = u(k -1) +AU(&) = u(* - 1 ) + K MPC The numerical value of K MPC [T(*) - S , i ( * | k) - S u(k ~ 1)] (3.45) u can be computed using the Matlab notation ' V and the operator ':' to pick out the first n rows of the solution: u 0 (3.46) K MPC = K (1 :»„,:) /U// The structure of M P C controller with no constraints is shown in Figure 3.4. From this figure we notice that the unconstrained M P C controller is a linear time-invariant system (LTD. AT(fc) Au(/fc) u(k) Plant r-1 u(/fc-l) z-'l x(k\k) M P C Controller Figure 3.4 Unconstrained M P C controller structure. Now we will deal with the case where the constraints are present. Recall that for a flexible-link robotic manipulator the constraints are given by equation (3.11). In this case the simple 'linear least-squares' solution of unconstrained M P C has to be replaced by a 'constrained least-squares' solution. The closed-form solution for the constrained M P C cannot be found, and some form of an iterative optimization algorithm must be employed to find the 81 numerical solution. It is can be shown that if the constraints are in the form of linear inequalities, then the constrained M P C problem becomes a quadratic programming (QP) optimization problem (Maciejowski, 2002). If the constraints are inactive, the solution of the predictive controller is the same as that in the unconstrained case. But if the constraints become active, then the M P C controller becomes nonlinear. The QP problem has to be solved at each time step. For fast dynamic systems with very low sampling rates (e.g., a flexible-link robotic manipulator system), the standard QP algorithm may not be efficient enough to find an optimal solution at each time step. Next we will develop a new computationally efficient 'anti-windup' M P C to deal with the constraints of the flexible-link robotic manipulator system. The new 'anti-windup' M P C controller is based on the unconstrained M P C controller shown in Figure 3.4, with an additional constraint-handling strategy. The input moves AU(/V | k)* are computed without taking any constraints into account. This is a computationally efficient algorithm because we have the closed-form solution of the controller as given in equation (3.43). The input constraints for the controller are the minimum and maximum joint torques for each link: u <u(k)<u mm "\'"J " m i n < 0, U ^ — "max M A X 47) > 0 The output constraints are the minimum and maximum link deflections for each link: y <y(k)<y^ (3.48) mn The constraints of the system are handled by using fuzzy rule-based auto-tuning of the unconstrained MPC controller which is developed in Section 3.4. From the structure of the unconstrained M P C controller, we can see that the control input vector u(k) and the plant output vector y(k) depend on the gain matrix K MPC . The gain matrix K can be tuned by MPC adjusting the weighting matrices Qand R , and the controller horizons (H ,H ) p u as given in equation (3.44). It follows that the basic idea of the constraint-handling strategy of the 'antiwindup' M P C controller is to use a fuzzy rule-based auto-tuner to adjust the tuning parameters of the unconstrained MPC controller in order to make sure that the input and 82 output u constraints min < ( ^ ) u < "max a n are satisfied. Q " ymin We will use the M P C parameters that satisfy < W < Ymax • The constraints are not active, so the unconstrained v M P C is equal to the constrained MPC with the constraints within the actual system constraints ( < u(k) < , y ^ < y(k) < y max ). This means that the 'anti-windup' M P C controller will not generate the true optimal solution in general but we will provide a sub-optimal solution. We can make this sub-optimal solution as close as possible to the true optimal solution by adjusting the tuning parameters of the controller. Details of how to tune these parameters are discussed in Section 3.4. The MPC is designed using the tuned parameters. This will guarantee that the system constraints are satisfied. The move that is actually applied to the plant is Au(yt) = { *' [max(Au(& | k)* ,u m i n ( A f i ( / : | A : ) ^~ -u(&-l)) U m a x _ U ( Mn 1 ) ) i f if A f i (*l*)* Au(& | &)* < 0 > 0 (3.49) Equation (3.49) will ensure that the input constraints in equation (3.47) are always satisfied. The same move must be applied to the internal model of MPC. This not only helps to keep the predictions accurate, but also avoids problems analogous to 'integrator wind-up.' The fact that the M P C controller is aware of the input constraints, in particular of the actuator saturation constraints, and never generates input signals that attempt to violate them, removes the problem of 'integrator wind-up.' This problem occurs when conventional controllers are used, if long-duration set-point errors cause integrator outputs to exceed to the saturation limits, and can result in large overshoots and even instability. 3.2.5 Stability Analysis In this section we will investigate the stability of the M P C controller which has been developed for the flexible-link robotic manipulator system. If the M P C controller is designed off line, the nominal stability of the closed-loop system can be obtained by tuning the parameters in the problem formulation. Closed-loop stability is much more of an issue if the MPC controller is used in such a way that requires on-line redesign. Predictive control, using the receding horizon idea, is a feedback control strategy. There is therefore a risk that the resulting closed-loop system might be unstable. Even though the performance of the system is 83 o p t i m i z e d o v e r the p r e d i c t i o n h o r i z o n , a n d even t h o u g h the o p t i m i z a t i o n i s repeated at each t i m e step, each o p t i m i z a t i o n does n o t c o n s i d e r the s y s t e m response b e y o n d the p r e d i c t i o n h o r i z o n . T h i s c o u l d p l a c e the plant i n s u c h a state that e v e n t u a l l y i t w i l l b e i m p o s s i b l e to stabilize the system due to the constraints o n the c o n t r o l i n p u t signals. I n order to d e s i g n a M P C w i t h guaranteed n o m i n a l stability, w e need to introduce the L y a p u n o v theorem a n d related d e f i n i t i o n s . Equilibrium: T h e system equation x(A: + l ) = f(x(k),u(k)) has a n e q u i l i b r i u m at the state x a n d the i n p u t vector u i f x = /(x ,u ) . W e c a n a l w a y s assume that a n vector 0 0 0 0 0 e q u i l i b r i u m i s at (0,0) b y c h a n g i n g o f the coordinates a c c o r d i n g to z(k) = x(k) - x a n d 0 v(*) = u(fc)-v . 0 Stability: F o r n o n l i n e a r systems one has to c o n s i d e r the s t a b i l i t y o f a p a r t i c u l a r e q u i l i b r i u m point. A n e q u i l i b r i u m p o i n t (0,0) i s stable ( i n the sense o f L y a p u n o v ) i f f o r a s m a l l perturbation o f the states o r inputs, g i v e n ||[x(0) ',u(0) ']||<£ 7 7 a n y s > 0 , there then ||[x(£) ',u(/c) ']|<8 f o r a l l k>0. 7 7 i s a 8 > 0 s u c h that i f It i s a s y m p t o t i c a l l y stable i f Lyapunov's Theorem: I f there i s a f u n c t i o n V(x,u) w h i c h i s p o s i t i v e - d e f i n i t e , n a m e l y it satisfies F(x,u)>0 a n d F(x,u) = 0 o n l y i f (x,u) = ( 0 , 0 ) , a n d satisfies the 'decrescent' property (3.50) and i f , a l o n g a n y trajectory o f the s y s t e m x(k + \) = f(x(k),u(k)) i n some neighborhood o f (0,0), the p r o p e r t y V(x(k + l),u(Jt +1)) < V(x(k),u(k)) (3.51) h o l d s , then (0,0) i s a stable e q u i l i b r i u m point. I n a d d i t i o n , i f V(x(k),u(k)) - » 0 as k - » co 84 then it is asymptotically stable. Such a function F(x,u) is called a Lyapunov function. For the purpose of proving stability it is enough to consider the case when the states are to be driven to the origin, from some arbitrary initial conditions. We also assume a 'regulator' formulation of MPC; namely, we want to drive the system outputs to the origin. Suppose that a predictive controller is obtained for the plant x(* + l) = /(x(*),u(*)) (3.52) by minimizing the cost function J(k) = YJy(k + i\k)\\ i=l + ] T | A u ( * + z-l|fc)|| Q(i) 3 R(i) <=1 ( - ) 53 We assume that Q(z) > 0, and R(i) > 0, so the cost function is J(k) positive-definite, and satisfies the 'decrescent' property. Now assume, as usual in proofs of nominal stability, that the plant model is perfect so that the predicted and real u(k + i) = u(k + i | k). Let J\k) Au(k) output trajectories coincide: y(k + i) = y(k + i\ k) if be the optimal value of the cost function at time k, and and y*(k) be the corresponding optimal control moves and optimal outputs. We have 2 & + 0|| J'(*) = i=l 2 + Z | | A u (k + i-1)|| Q(i) (3.54) R(i) (=1 From the definition of the control horizon H of MPC, we have u AU*(/C + 0 = 0 Vi>H u (3.55) The value of the cost function J evaluated at time k+1, while maintaining the same control inputs u* (k) as computed at time k, would be 85 J'(k +1 + /) +1) = jjy'(k 1=1 = E|y*(* + 0|| R(0 '=i + Z||Au*(k + i-1) /=1 Q(0 i=l + J j Au* (k + l + i-1) Q(<) + y*(£ + / f +1) P ' i|2 DIM i - | y ' ( * +1)' + Au* (£ + / / ) i|2 = j \ k ) - y \ k + \) 2 'b(i) -1Au*(kffl(l) R(0 v R(H ) u / - Au(k) 2 (3.56) U +y\k 22 + H +l) n Q(H.) At time £ + 7 the new optimization problem, with initial condition y*(A: + l) is solved. The new optimal cost function is j \ k + l)<J'(k + l) = A * ) - | y * ( * + i)lL -l|Au*Ot)|L ^y\k + H \)f \\Au(k p+ + H )l + (3-57) 2 u Suppose that we add 'terminal constraints' to the MPC formulation, which force the plant outputs to reach the origin at the end of the prediction horizon. The terminal constraints are y(k + H \k) = 0 (3.58) p We have assumed that the plant model is perfect and the equilibrium point is at the origin ( (x,u) = (0,0) , 0 = /(0,0)). If the optimization problem is feasible, so the terminal constraints force the plant outputs to reach the origin at time k + H ,we p y\k + i\k) = Q have (3.59) Vi>H p Using equation (3.59), equation (3.57) becomes j \ k + l)<J'(k + l) = j\k)-\\y\k + \f y\k GO) = j\k)-\\y\k + \) 2 GO) + H +\) p IG(«J (3.60) Au'(jfc) <f(k) So J*{k) is a Lyapunov function for the closed-loop system, and we conclude by Lyapunov's 86 stability theorem that the closed-loop system is stable. With the assumption that the optimization problem has a solution at each step, we have shown that stability of M P C can be achieved by imposing terminal constraints. The problem with this approach is that the general constrained optimization problems can be difficult to solve, and just adding terminal constraints may not be feasible. From equation (3.60) we see that the condition for J*(k) to be a Lyapunov function is y*(A: + l ) ' or y\k J v + l) -Au*(/c) 2 0(1) 2 ' (2(1) ' V +y\k 2 + H +Y) B 'Q(H ) <0 p R(l) + Au'(k) J >y'(k 2 V ' p + H+\) R(\) (3.61) 2 Q(H ) Q(H p P Equation (3.61) shows that imposing terminal constraints to obtain stability is unnecessarily restrictive. We can relax the terminal constraints y(k + H \k) p y(k + = 0 to a terminal constraint set (3.62) H\k)<A(k)y 0 which contains the origin rather than a single point, where y is a constant system output 0 vector. The size of the terminal constraint set can be adjusted by a variable X(k). Based on the idea of terminal constraint set, a multi-stage M P C with guaranteed stability may be developed as follows: • At each time step k, define a terminal constraint set y(A; + H • First stage: at time k=0, choose an initial terminal constraint set such that MPC p \ k) < A(k)y . Q can drive the plant into this set with A(0) = 1. • Gradually decrease A(k) at each time step, until M P C achieves guaranteed system stability for initial conditions within the set with A(k)«1, assuring that the system outputs approach the origin. Figure 3.5 illustrates the basic idea behind multi-stage M P C for a single-input-single-output (SISO) system. At time step k, the terminal constraint y(k + H \ k) is within the terminal constraint set A(k)y The size of the terminal p 0 (the broken-line circle at time k + H ). p constraint set is gradually decreased by adjusting the parameter X at each time step so that 87 X -» 0 . When X = 0 , the terminal constraint set Xy becomes the terminal constraints y(k + H 0 p | k) = 0 . The cost function J\k) becomes a Lyapunov function for the closed-loop system, and by Lyapunov's stability theorem the closed-loop system is stable. Output ^ k Time k+l Hp Hp+i , Figure 3.5 The basic idea of multi-stage M P C . 3.3 System Identification for Unknown Payload In this section we will design the system identification module of the overall M P C scheme for the flexible-link robotic manipulator, as shown in Figure 3.1. A linear dynamic model of the flexible link system has been developed in Section 2.4. The corresponding linear state-space model of the system is x = Ax + Bu y = Cx (3.63) Equation (3.63) gives the model structure of the system. The parameters of the system matrices A,Band C are dependent on the physical parameters of the flexible-link robotic manipulator, the mode shape functions, and the payload. The physical parameters of the flexible-link robotic manipulator, for example the mass, length, and moment of inertia of each link, can be determined off line. From Chapter 2, we know that the effect of the payload on mode shapes is not significant for both one-link and the 88 two-link flexible robotic manipulators. Accordingly we will use the mode shapes corresponding to the nominal payload in the linear state-space model. The payload of the system is usually not known and we need to identify it on line in order to increase the efficiency of system operation. Due to the nonlinearity of the system, the linear model of the system is valid only around the operating point. We will design the system identification procedure as follows. For system identification, move only the link that directly handles the payload and lock the other links at their initial positions for a multi-link system. Design an M P C controller that moves the link with payload at low speed from the initial position with a small angle ( < 1 0 ° ) and then move it back to the initial position. The identification module then estimates the unknown parameters of the matrices A,Band C from the input and output data of the system. The payload mass and inertia can be calculated from the term of matrix A or B . The system model (3.63) is updated using the newly estimated payload value. The identification module uses prediction-error methods (PEM) to find the parameters of the system model. Given a set of measurements from the system: Z N =[y(l),u(l),y(2),u(2),---,y(yV),u(7V)] (3.64) the prediction-error vector is: e(*,P) = y(0-y(f|*-l,P) (3.65) where P is the parameter vector. In our case, it is the vector of unknown payload mass and inertia P = [m p J ~J. p Also y(t\t-LP) data set Z'" . When the data set Z 1 N are the predicted system outputs based on the past is known, the prediction-errors can be computed for t = \,2,---,N. The estimated parameter vector P is then defined by minimizing a quadratic prediction error criterion V (P): N W =£ l W . ( 3 . 6 6 ) P^argminF^P.Z") where ' argmin' denotes the minimizing argument; i.e., the value of P that minimizes V CP). N 89 At time TV , when the data set Z N is known, the function V (P) is just a finite-dimensional N real. parameter vector P. But in general, the function V (P) cannot be minimized by N analytical methods. The numerical solution then has to be found by an iterative search algorithm. Computation of the estimated parameters can be done using the Matlab System Identification Toolbox (Mathworks, 2003). The function 'idss' is used to construct the statespace model structures with various parameterizations. To define the model structure, the so called structure matrices are used. These are 'shadow matrices' to A,Band C , and have the same size and coincide with them at all known matrix elements. The structure matrices are denoted by As,Bs and Cs, and have the entry NaN at those elements that correspond to unknown parameters to be estimated. The unknown parameters are determined by using the function 'pern'. It uses an iterative search algorithm to minimize a prediction error criterion. 3.4 Fuzzy Rule-Based Auto-Tuning In this section we will design the fuzzy rule-based auto-tuning module of the overall IMPC scheme for a flexible-link robotic manipulator, as shown in Figure 3.1. This knowledge-based fuzzy tuner is developed for auto-tuning of the M P C and for adjusting the model structure of the real-time system identifier. In this context we will rely on the step response of the flexiblelink robotic manipulator. The setpoint is a constant value for each link. The desired closedloop response it order to move the manipulator from the initial position to the final position as quickly as possible, without generating undesirable link vibrations at the end of the movement while satisfying the input and output constraints. The ideal goal for the fuzzy tuner is to adjust the tuning parameters of M P C controller to achieve an overdamped system that is as close as possible to the critical-damped system, while not violating the constraints of the system. This will make the closed-loop response of the system as fast as possible without causing an overshoot. Following steps are taken in order to design the fuzzy tuner: • Identify the adjustable parameters in predictive control. Examine the effects of these parameters on the controller performance. • Design the membership functions for the input and output variables of the fuzzy inference system (FIS). 90 • Develop a set of fuzzy rules based on the knowledge that has been gained by studying the problem. This is the knowledge base used by the fuzzy tuner. This knowledge base can be updated and changed based on the experience gained from experiments and simulations of the system. • Develop a fuzzy inference system (FIS) that can easily map the input space to the output space. This FIS will be used for tuning the M P C controller. The first step develops a knowledge base for tuning the M P C controller. In the second step fuzzy logic is used as a tool to transform this knowledge base into an intelligent decision making system that can automatically tune the parameters of the M P C controller in order to achieve the desired closed-loop system performance. 3.4.1 Effects of the Tuning Parameters To date only a few guidelines are known related to tuning the parameters of an MPC. In fact, conventionally, the tuning parameters are determined using the experience gained from simulations and tests of the system. Possible tuning parameters for the present control scheme are: the number of modes which the internal model needs to accurately predict the system response, control horizon H , prediction horizon H , tracking error weighting matrix Q(i), u control penalty weighting matrix R(z), and the parameters of the disturbance model and the observer dynamics. In the present work, we examine the effects of these parameters on the controller performance, and obtain insight into appropriate parameters for on-line tuning. Theoretical analysis, experiments, and simulations are used to investigate this problem. One goal here is to develop a systematic method for adjusting the parameters. The definitions of control horizon, prediction horizon, and weighting parameters are intuitive. Consequently, fuzzy logic is suitable in the design of the knowledge base of controller tuning. Recall that the cost function of the M P C controller for a flexible-link robotic manipulator is: J = ^\\y(k .=1 + i\k)-r(k + i)\\ Q(i) + YJAu(k + i-\\k)\\ i=l (3.67) R(i) This is the cost function that has to be minimized at each time step by selecting a suitable control move Au(k + i-l\k). The control horizon H is the number of future time steps after u 91 which the control inputs will be held constant; that is, all future input moves are set to zero. Increasing H u will result in a more active controller, and will generally increase the magnitude and rate of change of the control input signals. To a certain extent this increased activity will improve the controller performance, but too large a value for H may result in u excessive ringing of the control signals and significant high frequency components in the step response transients. This horizon also has a significant effect on the computational load of the algorithm. It has been recommended that H u should be greater than or equal to the number of unstable or poorly damped zeros in the open loop system (Clark, 1987). In our case, we will use a relatively small control horizon; e.g., 5 —»15. We will pick a suitable H u such that the controller performance is insensitive to small adjustments in this horizon based on simulations and experiments of the system. The H will be fixed to this value, and will not be tuned by u the fuzzy tuner. This will reduce the number of tunable parameters for the fuzzy tuner, simplify the tuning process, and increase the speed of the fuzzy decision making system. The prediction horizon H is related to the stability and the speed of response of the system. It specifies the number of future time steps for which the predicted system outputs will be calculated and included in the control law. From the cost function in equation (3.67), we can see that a cost function with larger H will include greater number of future prediction points. The resulting M P C controller is long-sighted. Given a sufficiently long prediction horizon, the controller can 'see' a potential constraint and can take corrective action immediately to avoid it, or at least minimize its adverse effects. A flexible-link manipulator is a non-minimum phase plant. It has a short-term response in one direction, but a longer-term response in the opposite direction. In this case, the prediction horizon has to be sufficiently long, so the optimization should focus primarily on the longer-term behavior. Otherwise, the controller would move in the wrong direction. Also, H should be sufficiently large to include the negatively moving part of a non-minimum phase system. Too short a prediction horizon can cause the controller to work with insufficient information and the control is likely to be poor or even unstable. In general, increasing H can reduce the overshoot and increase stability for open-loop stable system. On the other hand, increasing H will reduce the speed response of the system, and will also increase the computational 92 load of the algorithm. It is recommended that H be set comparable with the rise time of the open loop system (Clark, 1987). The fuzzy tuner will adjust the H based on the closed-loop response of the system. If the closed-loop response has a large overshoot, the fuzzy tuner will increase the H p to reduce that overshoot. If the closed-loop speed of the response is low, the fuzzy tuner will decrease the H to increase the speed of response. The primary control objective is to force the plants to their setpoints. The controller predicts how much each output will deviate from its setpoints within the prediction horizon. It multiplies each derivation by the output weight. The cost function that is minimized by the controller includes the weighted sum of squared derivations as shown in equation (3.67). The output weighting matrix Q(z') at time step i is a diagonal matrix. We will use a constant output weighting matrix at each time step, that is Q = Q(/) Vi = "e, Q = 0 ••• 0 Q 2 is the number of outputs, and Q ,--,Q y p o ••• o o o ... where n l,...,H x n (3.68) 0 are the constant output weights. The weights must not be negative. Different outputs can have different output weights. If Q » Q a b the controller does its best to track the setpoint r , sacrificing r tracking if necessary. On the a b other hand if Q = 0 , the controller completely ignores the derivation output y from its a a setpoint r . In general, increasing Q can reduce the steady state error and the overshoot or a a undershoot of the output y . But increasing Q will also increase the control input u , and a a a increase the derivations of the other outputs from their setpoints. For the flexible-link robotic manipulator system, the outputs are the joint angle and the deflection of each link. Choosing the output weights is a critical step. We need to tune the controller, varying the weights to achieve the desired behavior. The fuzzy tuner has to adjust the weights of these outputs in order to reduce the overshoots or undershoots of the joint angle and keep the link deflections within acceptable ranges, and the input torques of each joint within the corresponding input 93 constraints. If the controller only focuses on setpoint tracking, it might choose to make larger manipulated-variable adjustments. These could lead to violation of the input constraints and make it impossible to achieve perfect setpoint tracking. These may also accelerate equipment wear or lead to control system instability. Thus one simultaneous objective of M P C is to minimize the weighted sum of controller adjustments as given in equation (3.67). The control penalty weight matrix R(z') at time step i is a diagonal matrix. We will use a constant control penalty weight matrix at each time step; that is R = R(z) R= V i = 1, R, 0 0 0 it, 0 0 0 R. where n is the number of inputs, and R ,---,R^ u X (3.69) are the constant input rate weights. The weights must not take negative values. Increasing the input rate weights has the effect of reducing the control activity. So they are also called move suppression factors for this reason. In general, increasing these weights will force the controller to make smaller and more cautious adjustments. This can bring the control inputs within their constraints. The controller will be less sensitive to prediction errors (i.e., more robust). Increasing these weights indefinitely will reduce the control activity to zero, which will 'turn off the feedback action. Thus with a stable plant, one can expect to obtain a stable closed loop system by sufficiently increasing the input rate weights. But the setpoint tracking of the controller will degrade and the speed of response will decrease, since only small control actions will result. With an unstable plant one can expect an unstable feedback loop, if the weights are increased excessively. For a flexible-link robotic manipulator system, increasing the input rate weights for each link will reduce the input torques. This will reduce the link deflections, but will increase the overshoot of the joint angles. The fuzzy tuner will adjust these weights based on the closed-loop response of the system in order to bring the control inputs and the link deflections within their constraints and reduce the system overshoots. The performance of the MPC controller is also dependent on the accuracy of the output 94 prediction y(k + i\k) as given in equation (3.67). If the prediction is good, minimizing the cost function will reduce the setpoint tracking error and force the plant to its setpoints. But if the prediction outputs are far from the real plant outputs, the controller will take wrong control moves. This will degrade the system performance, and the closed-loop may become unstable. In the current application, output predictions of the flexible-link robotic manipulator depend on the internal model and the observer dynamics of the M P C controller. The accuracy of the internal model depends on the model structure and model parameters. One of the parameters that relates to the internal model structure is the number of flexible modes which must be included in the model. Increasing the number of flexible modes can improve the prediction accuracy, but this will also increase the complexity of the model, make the controller design more difficult, and increase the computational load of the control algorithm. From Table 2.2 we can see that the frequencies for the third mode or higher are much greater than the frequencies of the first two modes for both links. Thus initially we will use only one mode for the internal model. If satisfactory performance cannot be achieved by a single mode model structure, we will include the second mode as well in the internal model. In order to prevent the excitation of the higher modes, we need to modify the input and output constraints. This will reduce the maximum absolute control inputs and the maximum absolute link deflections. Since the flexible-link manipulator is a nonlinear system, the linear internal model is only valid around its operating point. If the there are large setpoint changes, we need to update the internal model. A re-linearized plant model at the new operating point can improve the output predictions of the controller. The fixed interval of re-linearization will be decided by the designer and will not be tuned by the fuzzy tuner in the current application. At the beginning of each sampling instant the controller estimates the current plant state. Accurate knowledge of the state improves the prediction accuracy, which in turn improves the controller performance. It follows that the observer dynamics represent another adjustable factor of the M P C controller. Choosing deadbeat dynamics gives a fast response to disturbances. But this fast-dynamics observer will also react relatively strongly to highfrequency vibrations in the measured output signals. If there is excessive measurement noise in these signals, it may be better to have slower observer dynamics, in order to produce some 95 low-pass filtering of the noise. The optimal trade-off for state estimation can be made by using Kalman filter theory to design the observer as we have shown in Section 3.2.3. In summary, there are many adjustable parameters and factors in an M P C controller which can be tuned to improve the closed-loop system performance. In order to reduce the complexity of the fuzzy tuner design, only a few parameters with large adjustable ranges will be chosen and tuned by the fuzzy tuner. The other parameters will be chosen by the designer, and their values will be fixed for online application of the controller. Table 3.1 gives the adjustable MPC parameters. Those parameters that will be tuned by the fuzzy tuner are also identified in the table. Table 3.1 Adjustable controller parameters. Controller parameters Tuned by fuzzy tuner 3.4.2 Control horizon H No Prediction horizon H Yes Output weight Q Input rate weight R Internal model Observer dynamics Yes Yes No No Fuzzy Inference System In this section we will design a fuzzy inference system (FIS) to tune the M P C controller of a flexible link robotic manipulator system. Fuzzy logic is a convenient way to map an input space to an output space. The fuzzy inference system consists of a knowledge base in the form of a set of rules and an inference mechanism. The tuning actions are generated by applying the existing system performance data to the knowledge base and by using the inference mechanism. The knowledge base and the inference mechanism can handle imprecise and incomplete information, and the knowledge itself will improve and evolve through 'learning' and past experience. 96 Input and Output Variables OS > e a H p > OS.. >Ai?„ Figure 3.6 The fuzzy inference system. Figure 3.6 shows a schematic diagram of the fuzzy inference system for the flexible link robotic manipulator system. The input variables are: OS , OS , and OS . The output e variables are: AH w u AQ AR . W U OS is defined as: g OS =\9 \-\r \ 0 where 9^ max 0 (3.70) is the absolute maximum joint angle of the closed-loop system response, and r is e the absolute desired joint angle. We assume that the initial joint angle for each link is zero. The desired OS value is OS < 0 and \OS \« 0. This means we want the step response of the e g g system to be an overdamped system that is as close as possible to the critical damped system. OS is defined as: w OS =\w \-r w where w m w (3.71) is the absolute maximum link deflection of the closed-loop system response of niax the link and r is the link deflection constraint (maximum allowed link deflection). The w desired OS value is OS < 0. This will make sure that the link deflection stays within its w w bound. OS is defined as: u os»=k.,K <-> 3 72 97 where is the absolute maximum control input of the closed-loop system response of the link and r is the control input constraint (maximum allowed control input). The desired O S u u value is O S < 0 . This will guarantee that the control input stays within its bound. u AH' is defined as: ^ where H P OLD P = ( H P N E W - H P M ) H P S is the prediction horizon before tuning, H P tuning, and H P is a sensitivity parameter. H SEN P SEN E (3.73) N NEW is the prediction horizon after is introduced for adjusting the sensitivity of tuning. AQ W is defined as: *Q = {Q _„ W where Q W OLD W EW ~Q _oid)Qw_s , w (- ) 3 a is the link deflection weight before the tuning, Q W NEW weight after the tuning, and Q W SEN 74 is the link deflection is the sensitivity parameter. We normalize the joint angle weight as Q = 1. The overall output weights are where Q YW AR U is a predetermined constant value. is defined as: AR =(R u where R U OLD \ -R u_new (3.76) ,,)R u_ola J is the input rate weight before tuning, R u_sen tuning, and R U NEW U SEN ^ / is the input rate weight after the is the sensitivity parameter. Fuzzy Membership Functions Next we will design the fuzzy membership functions for the input and output variables. Fuzzy logic starts with the concept of a fuzzy set. A fuzzy set is a set without a precise and clearly defined boundary, and it can describe non-precise or qualitative concepts. It may contain 98 elements with only a partial degree of membership. A membership function is a curve that defines how each point in the input space is mapped to a membership value (or degree or grade of membership) between 0 and 1. The membership function associated with a given fuzzy set maps an input value to its appropriate membership value. The main condition a membership function must satisfy is that its values must lie between 0 and 1. The function itself can be an arbitrary curve. We will use two types of membership functions: 1. functions formed by straight line segments, 2. Gaussian functions. The first type of function has the advantage of simplicity. The Gaussian membership function obeys the Gaussian distribution curve whose main advantage is its smoothness. Figure 3.7 and Figure 3.8 show the membership functions for the input and output variables. These membership functions depend on common knowledge, experience, judgment, and so on. The numerical values are used to define the memberships only in a relative sense. A n appropriate physical meaning should be attached to each value. These numerical values will depend on the hardware of the system. They must be scaled and converted to achieve physical and dimensional compatibility for the particular practical application. The ranges of the membership function are normalized as [0 10]. The notation used in the figures showing membership functions are given below: VS = Very small value S = Small value M = Moderate value L = Large value 99 Fuzzy Knowledge Base The fuzzy rules for tuning the controller are developed next. The required expert knowledge for tuning an M P C has been established in Section 3.4.1. Direct knowledge on tuning the controller can also be obtained through computer simulations and experiments of the system. In Chapter 4, we will investigate through simulations the effects of the tuning parameters on the system performance. A basic reasoning for adjusting the M P C control parameters can be expressed linguistically as given in Table 3.2. Table 3.2 General linguistic rules for tuning an M P C controller. //the joint angle response has no overshoot and the link deflection and control input are within their constraints, then do not change the control parameters. When the control input is within constraint, if the joint angle response has a large overshoot and the link deflection constraint violation level is not small, or if the joint angle overshoot is moderate, and the link deflection constraint violation level is large, then increase the prediction horizon by a large value. When the control input is within constraint, if the joint angle overshoot is moderate, and the link deflection constraint violation level is moderate, then increase the prediction horizon by a moderate value. When the control input is within constraint, if'the joint angle overshoot and the link deflection constraint violation value are not zero, and at least one of them is small, then slightly increase the prediction horizon. When the joint angle response has no overshoot and the link deflection is within constraint, if control input constraint violation level is large, then slightly increase the prediction horizon and moderately increase the input rate weight, or if control input constraint violation level is not large, then slightly increase the prediction horizon and the input rate weight. When the joint angle response has an overshoot and the link deflection is within constraint, and control input constraint violation level is very small, then slightly increase the prediction horizon. When the joint angle response has no overshoot, if'the link deflection constraint violation level is moderate or large and the control input constraint violation level is large, then moderately increase the link deflection weight. When the joint angle response has no overshoot, if'the link deflection constraint violation level is not very small and the control input constraint violation level is large, then slightly increase the link deflection weight. 101 When the joint angle response has no overshoot, if'the link deflection constraint violation level is not large and the control input constraint violation level is not large, then increase the link deflection weight by a very small value. These linguistic rules reflect the actions of a human expert in tuning an MPC controller by observing the response of the closed-loop system. More rules can be added, and also these rules can be modified to improve the tuning accuracy. Fuzzy Inference Mechanism Fuzzy inference is the process of mapping the input space to the output space using fuzzy logic. The mapping provides a basis from which decisions can be made. Figure 3.9 shows the block diagram of the fuzzy inference process which will be used to tune the M P C controller. There are five parts in the fuzzy inference process: fuzzification of the input variables, application of the fuzzy operator (AND or OR) in the antecedent of the fuzzy rules, implication from the antecedent to the consequent, aggregation of the consequents across the rules, and defuzzification. Next we will discuss each step in more detail. Response Measurements (Crisp) 1. Fuzzification 2. Fuzzy operator 3. Implication 4. Aggregation •>l 5. Defuzzification Tuning Action (Crisp) Figure 3.9 Fuzzy inference process. Step 1. Fuzzification The inputs to the FIS are the measured response of the closed-loop system which is controlled by M P C with the initial set of tuning parameters. These are crisp numerical values limited to the universe of discourse of the input variables (in the current application within the interval between 0 and 10). The first step of the fuzzy inference process is to generate membership values for a fuzzy variable using membership functions. 102 Step 2 . Apply Fuzzy Operator The fuzzy rule base is a set of if-then rules. A rule in a fuzzy knowledge base is generally a relation of the form: IF X j is A\ A N D (OR) y. is B. T H E N C, (3.77) where A) B and C, are fuzzy sets. The 'if-part' of a fuzzy rule is called the antecedent, and ! the 'then-part' is called the consequent. After the inputs are fuzzfied and their membership values are generated in step one, the next step is to present these membership values to the fuzzy operator. If there are multiple parts to the antecedent, we need to apply fuzzy logic operators and resolve the antecedent to a single number between 0 and 1. This is the degree of support for the rule. The fuzzy operators are defined as follow: A. A N D T S . ==min(4,y3.) " A. ORB; ==max(A ,B ) V i (3.78) i where ' A N D ' corresponds to a 'minimum' operation, and 'OR' corresponds to a 'maximum' operation. Step 3. Apply Implication Method Interpretation of an if-then fuzzy rule involves: evaluating the antecedent (which requires fuzzification of the input and application of the necessary fuzzy operators), and applying that result to the consequent (known as implication). A consequent is a fuzzy set represented by a membership function (C. in (3.77)). The input to the implication process is a single number given by the antecedent, and the output is a fuzzy set. The implication process modifies the fuzzy set C to the degree specified by the antecedent. The most common method for t modifying the output fuzzy set is truncation using the 'minimum operation.' Implication is implemented for each rule in the fuzzy rule base. Step 4. Aggregate All Outputs Since the decisions are based on the testing of all the rules in the fuzzy rule base, the rules must be combined in some way in order to make a decision. Aggregation is the process by 103 which the fuzzy sets that represent the outputs of each rule are combined into a single fuzzy set. The 'maximum operation' will be used to aggregate the output fuzzy sets for each rule into a single output fuzzy set. Step 5. Defuzzification In the last step, the resulting fuzzy set from the aggregation process is defuzzified. The output is a crisp single number. The centroid method is used for the defuzzification process. The centroid method returns the center of area under the membership function curve. 3.4.3 Overall Scheme of the Fuzzy Tuner We may consider the fuzzy tuner as a nonlinear function that maps the input variables to the output variables. The inputs to the fuzzy tuner are the measured closed-loop system response, and the outputs are the tuning action for adjusting the M P C controller parameters. In order to simplify the tuning process, we set the M P C parameters to some relatively small values. In the fuzzy tuner these parameters are gradually increased based on the measured system responses until the desired system performance is achieved. In this thesis, we mainly focus on tuning an MPC controller with respect to the step response of the system. The goal is to adjust the MPC controller parameters such that the closed-loop response of the system reaches the following characteristics: the joint angle step response for each link is underdamped and is as close as possible to the critical damped system, and the link deflection and control input for each link are within their design limits. In this way, we will obtain a closed-loop system that has a fast response with no overshoot and all the constraints satisfied. Overall scheme of the fuzzy tuner for a flexible-link robotic manipulator is shown in Figure 3 . 1 0 . First, we input the setpoints for each link, initial values of the controller parameters (H , H , Q, R), and the input and output constraints of the system. The setpoints u are the desired final joint angles of the manipulator, and we assume that the initial joint angle of each link is zero. The prediction horizon H is a tuning parameter. We will start with a relatively small H . The closed-loop system will produce an underdamped step response with large joint angle overshoots. The fuzzy tuner will increase H p until the system has no joint angle overshoot. We will use a relatively small control horizon; e.g., 5 — » 1 5 . Note that Q is 104 the vector that includes the output weights for all the links. For each link the output weight is QyJ\S Qw\ a n ( l t n e joint angle weight is normalized to 1. Here Q y w is a predetermined constant value, and is the overall weight for joint angle and link deflection. Furthermore Q w is a tuning parameter. A large value of Q will reduce the link deflection, but the joint angle w tracking error will be increased. The parameter Q will start with a relatively small initial w value and will be increased by the fuzzy tuner. The vector that includes the input rate weights for all the links is R . For each link, the input weight R is a tuning parameter, which starts u with a relatively small initial value and is increased by the fuzzy tuner. After the initialization step, the M P C controller with the initial parameter values will control the flexible-link robotic manipulator system. The measured system outputs are sent to a signal preprocessor. This signal preprocessor generates the values of OS , OS , and OS e w u for each link, based on the system outputs. The ranges of OS , OS , and OS are normalized g w u in order to match the ranges of their membership functions. We set the range for each variable from 0 to 10. The preprocessor first calculates the values of the variables by using the following equations: OS =\w \-r w max (3.79) w OS =\u \-r u max u The preprocessor then normalizes these values in the range [0 10] using the following relationships: If OS > 10 then set OS = 10 g If OS <s g g g then set OS, =0 IfOS >10then set OS =10 (3.80) I f O 5 < 0 then set O5 = 0. w M> If OS > 10 then set OS =10 u u I f O £ < 0 t h e n set OS = 0 B u where s is the absolute tolerance of joint angle, OS < 0 means the link deflection is within g w its limit, and OS < 0 means the control input is within its limit. u 105 If the following conditions are satisfied, then the tuning process will stop, and we will have a closed-loop system with fast response, no joint angle shoots, and all the constraints satisfied: OS =0 OS =0 g OS =0 W (3.81) U If the above termination conditions are not satisfied, OS , OS , and OS will be sent to the e w u fuzzy inference system. The fuzzy inference system will decide the tuning actions based on its knowledge base, and the tuning parameters will be updated using the following equations: H =H pmw +max(AH ,-,*H _ )/H _ pold Qw_new pJ Qw _old u_new = u_old R R ~^~^Qw + A U R p n p iai (3.82) ^ Qwsen '' u_sen R where the subscript 'new' denotes the updated value, and 'old' denotes the previous value. The sensitivity parameters H P , Q SEN W SEN , and R U SEN are introduced for adjusting the sensitivity of tuning. They can also be used to scale the tuning actions to proper numerical values. For a multi-link robotic manipulator, the tuning process is carried out on each link separately at the same time, and the maximum value of the overall tuning action for the prediction horizon (max(A.r7 ---,AH U P ) ) will be used for updating the prediction horizon. N In the next step, the M P C controller will use the updated parameters to test the system again. The entire tuning process will be repeated until the desired closed-loop performance is achieved. 106 Start 1. Input Initial values and M P C parameters. 2. Setpoints. 3. Input and output constraints. Setpoints, Hp new s Qw new ' Ru M P C controller Control Inputs Update tuning parameters Flexible-link robotic manipulator system n =0 _^eu» „ w _old IQ K^W zZ-w _sen System outputs Signal preprocessor AH ,AQ ,AR» P K os , os , os e w u os ,os , os $ w u Fuzzy inference system Stop Figure 3.10 Overall scheme of the fuzzy tuner. 107 3.5 Summary In this chapter a knowledge-based intelligent model based predictive control strategy was developed for the motion control of a flexible-link robot manipulator. The new control scheme, called intelligent model predictive control (IMPC), combined the advantages of conventional model predictive control (MPC) and knowledge-based soft control. Overall structure of the IMPC algorithm and its underlying strategy were presented. The following main components of the IMPC system were designed: a computationally efficient MPC module with guaranteed nominal stability, a system identification module for handling systems with unknown payload, and a fuzzy rule-based intelligent auto-tuning module for adjusting the M P C controller parameters. 108 Chapter 4 Control of a Single-link Flexible Manipulator In this chapter, the intelligent model predictive control (IMPC) scheme developed in Chapter 3 is applied for motion control of a single-link flexible robotic manipulator. The link of the manipulator is a 1 m long aluminum thin beam and its physical parameters are given in Table 2.1. This link is identical to the link 2 (outboard link) of the two-link flexible manipulator described in Chapter 2. A dynamic model for the system is developed in Section 4.1. Model predictive control (MPC) approach for the system is designed in Section 4.2. A system identification module was designed to identify the unknown system payload in Section 4.3. The knowledge for tuning the M P C controller is established in Section 4.4, and using the resulting fuzzy rule base a fuzzy tuner is designed. In Section 4.5 the performance of the IMPC scheme for the single-link system is evaluated using computer simulations. 4.1 Dynamic Model We have developed the dynamic equations for a single-link flexible robotic manipulator in Section 2.32 using the assumed mode method. The dynamic equations are given in equations (2.92) and (2.93). These equations are nonlinear and include a finite number of flexible modes. In this section we develop a model for this system that is suitable for controller design and simulation. 4.1.1 Flexible Modes Using computer simulations we investigate the number of flexible modes that are needed in order to adequately represent the elastic behavior of the single-link flexible robotic manipulator. From Table 2.3 we notice that the natural frequencies of the first four modes of the system with a nominal payload are: / , =1.1442 H z , / 2 =11.1224 H z , / = 31.1435 Hz , and / 3 4 = 56.1767 Hz 109 The natural frequency of the third mode is much higher than that of the first two modes. In view of this, we now investigate the behavior of a model with just the first mode in comparison to a model with the first two modes. In the following simulations, we assume the system carries a nominal payload corresponding to m = 0.38 kg and J p = 0.001 kg.m . 2 p Case 1: In this case there is no control input to the system, and the system starts with the following initial position: 0,(0) = 0 , ^ ( 0 ) = 51.2 mm (4.1) The initial joint angle is zero and the initial tip deflection is 51.2 mm. The simulation results are shown in Figure 4.1 and Figure 4.2. From the simulation results we see that there is very little difference between the responses of the single-mode model and the two-mode model, in this case. Case 2: In this case the system starts with the following initial position: 0,(O) = O,w,.(O) = O (4.2) Both the initial joint angle and the initial tip deflection are equal to zero in this case. A symmetric bang-bang input torque of magnitude of 6 N.m is given to the system as shown in Figure 4.5. The system responses under this input torque are shown in Figure 4.3 and Figure 4.4. In this case as well, the system responses of the single-mode model and the two-mode model do not deviate significantly. In summary, for the single-link flexible manipulator, the simulation results suggest that the fundamental mode alone is able to capture the flexible character of the system response quite accurately. Accordingly, we will use the model with just the first flexible mode for the design of M P C controller. The nonlinear model of the plant is represented using the first two flexible modes, however. Furthermore, in order to prevent the higher modes being excited by the M P C controller, we will impose constraints for the system input and output, in the MPC controller design, as follows: 110 |tt,|<6N.m w where u is the joint input torque and w ri i 0 I tip (4-3) < 25 mm is the deflection of the link tip. i i i i i i i \ 1 2 4 6 8 10 12 14 16 18 1 20 Time (seconds) Figure 4.1 Case 1: Joint angle responses of 1-mode model and 2-mode models with an initial tip deflection of 51.2 mm. Ill 60 • 1 mode • 2 modes 40 A h 20 111! -20 -40 -60 10 Time (seconds) 12 14 16 20 Figure 4.2 Case 1: Link tip deflection responses of 1-mode model and 2-mode models with an initial tip deflection of 51.2 mm. 80 -1 mode 2 modes 70 60 h 50 CD 40 20 10 Time (seconds) Figure 4.3 Case 2: Joint angle responses of 1-mode model and 2-mode models under a bangbang control input (0, (0) = 0, w (0) = 0). tip 112 150 -1 mode • 2 modes Time (seconds) Figure 4.4 Case 2: Link tip deflection responses of 1-mode model and 2-mode models under a bang-bang control input (0 (0) = 0, w (0) = 0 ). X tj Time (seconds) Figure 4.5 Case 2: Bang-bang control input. 113 4.1.2 Nonlinearity From equations (2.92) and (2.93) we obtain the dynamic model of the single-link flexible robotic manipulator using the first flexible mode as {[J hl +J ol p [2m, +2m <fi (l ) ~\S (t)S 2 p m l n ] u u where 7 U1 and 7 2 p 3111 °\ + P + m </> (l ) ]S (t)0 u l n 2 ] (t)0\ u 2 u m +I S 3m (4-4) + b 0 =r, e x + p t>\i(A) + phi'(A) m J P -[m, 2 p h \ii + Ai(A) + <t>i(A) l +m 0 (lo ]S (t)}0\ + [n p + V,rt,(/,) + ^n'(A))^i(0 + (/,„ + + J +m ll] \ < 2 J 2 (4.5) +bj =0 u u are constant parameters which depend on the mode shape function of the first flexible mode, and are defined as J m = l'Mi(*i)V i x , (4.6) n = {'(^irtr^i)^ 2 From these equations we notice that the dynamic model of the system is nonlinear. The nonlinearity of the system is due to the following terms in the dynamic equations: S (t), 8 (t)8 (t)0\, and S (t)0 . In the development of the nonlinear dynamic equations of the 2 u 2 u n u system in Chapter 2, we have assumed that the link deflection is small. This implies that the higher order terms involving products of deformations can be neglected. It follows that if the joint angle velocity is not very large, the nonlinearity of the system is not significant and can be neglected. A linear model for the single-link flexible robotic manipulator can be obtained using the techniques presented in Section 2.4. Assuming that the equilibrium operating point of the system is at the initial position of the link (6>, = 0, S =0), u the linear model of the system is given by 114 + (/,„ +m l <f> (l,) + J^,,'(/,)) ^,,(0 + ^ 0 , =r, p x n (4.7) + m.+mJM 2 +JJ '(l f u l S (t) + I S u 3U] u +bj n =0 In Chapter 2 we have found that the effect of payload on the mode shapes is not significant. Accordingly, the system model will use a constant mode shape for the first flexible mode. A linear state-space model for the system is obtained from equations (4.7), (2.114) and (2.115) as x = Ax + Bu (4-8) y = Cx where x = ^6>,,S ,&\,S J u u is the state vector and y = is the output vector. The system input u is the joint torque. The outputs are the joint angle 6 and the deflection w at X H> the tip of the link. The numerical values of the system matrices A, B , and C are given in Appendix A. 1.2. Next, computer simulations are used to compare the linear and nonlinear system models. Two cases are considered. The control input and initial states of the first case are the same as those of case 1 in Section 4.1.1. There is no control input to the system. The initial joint angle is zero and the initial tip deflection is 51.2 mm. The simulation results are shown in Figure 4.6 and Figure 4.7. The control input and initial states for the second case are the same as those of case 2 in Section 4.1.1. Both the initial joint angle and the initial tip deflection are equal to zero. The input to the system is a symmetric bang-bang torque with the magnitude of 6 N.m, as shown in Figure 4.5. The simulation results are shown in Figure 4.8 and Figure 4.9. From the simulation results we observe that the system responses for the linear model and the nonlinear model are very close in both cases. In summary, the nonlinearity of the single-flexible link manipulator considered here is not significant and can be neglected when the link deflection is small and when the velocity terms are not very large. Accordingly, the linear model in equation (4.8) will be used in the 115 MPC controller design. 11 0 i i i i 2 4 6 8 i 10 Time (seconds) i i i i 1 12 14 16 18 20 Figure 4.6 Case 1: Joint angle responses of the linear and nonlinear models with an initial tip deflection of 51.2 mm. 10 12 Time (seconds) Figure 4.7 Case 1: Link tip deflection responses of the linear and nonlinear models with an initial tip deflection of 51.2 mm. 116 2 3 Time (seconds) Figure 4.8 Case 2: Joint angle responses of the linear and nonlinear models under a bang-bang control input ( 6> (0) = 0, w (0) = 0 ). tip 4 5 6 Time (seconds) Figure 4.9 Case 2: Link tip deflection responses of the linear and nonlinear models under a bang-bang control input (0 (0) = 0, w (0) = 0). X ti 117 4.1.3 Effects of Payload The linear model of the single-link flexible robotic manipulator given by equation (4.8) is dependent on the system payload (m , J ). p A and B are functions of m andJ , p p p Specifically, the elements of the system matrices as shown in Appendix A. 1.2. Now the effects of the system payload on the linear dynamics of the robotic system are investigated through computer simulations. Two cases are considered. The control input and the initial states of the first case are identical to those of case 1 in Section 4.1.1. In this case there is no control input to the system. Also, the initial joint angle is zero and the initial tip deflection is 51.2 mm. The simulation results are shown in Figure 4.10 and Figure 4.11. The control input and the initial states of the second case are identical to those of case 2 in Section 4.1.1. In this case, both the initial joint angle and the initial tip deflection are equal to zero. The input to the system is a symmetric bang-bang torque with the magnitude 6 N.m, as shown in Figure 4.5. The simulation results are shown in Figure 4.12 and Figure 4.13. From the simulation results it is observed that the payload has a significant effect on the system dynamics. Under the same input and initial-state conditions, increasing the system payload will increase the link deflection. Increasing the system payload reduces the natural frequencies of the system as given in Table 2.3. This corresponds to a system that is less stiff, resulting in increased deflection (flexibility). In summary, the effect of the payload on system dynamics is significant and cannot be neglected. If the system payload is not known and if direct measurement is not available, a system identification module has to be designed and incorporated in order to obtain the correct linear model of the system. A system identification module for the single-link flexible manipulator will be designed in Section 4.3. 118 4 5 Time (seconds) 6 9 10 Figure 4.10 Case 1: Joint angle responses of the linear model for different payloads with an initial tip deflection of 51.2 mm. 4 5 Time (seconds) 6 9 10 Figure 4.11 Case 1: Link tip deflection responses of the linear model for different payloads with an initial tip deflection of 51.2 mm. 119 Figure 4.12 Case 2: Joint angle responses of the linear model for different payloads under a bang-bang control input (0 (0) = 0, w (0) = 0 ). X lip 300 200 -200 4 5 Time (seconds) Figure 4.13 Case 2: Link tip deflection responses of the linear model for different payloads under a bang-bang control input (6>, (0) = 0, w (0) = 0). tip 120 4.2 M P C Controller In this section, we will develop a model predictive control (MPC) scheme for the single-link flexible manipulator using the techniques presented in Chapter 3. The M P C is a model-based control algorithm. The controller performance is directly related to the accuracy of the internal model of the controller. In Section 4.1, we have shown that the linear continuous-time state-space model with just the first flexible mode is adequate to accurately capture the flexible dynamics of the robotic manipulator. First we develop a discrete state-space internal model for the M P C controller. In Chapter 2 we established that the effect of payload changes on the mode shapes was not significant. Accordingly, the internal model will use a constant first flexible mode. With a data sampling period of T = 10 ms and a nominal payload, by using equations (3.8) and (3.9) s we obtain the numerical discrete-time state-space internal model of the M P C controller as x(k +1) = Ax(k) + Bu(k) y(k) = Cx(k) where x(/t) = [0, (k), 5,, (it), 6\ (it), S , (it)] ( 4 ' 9 ) is the state vector and y(it) = [0, (k), w (/t)] is the x tip output vector. The system input u(k) is the joint torque. The outputs are the joint angle 0,(/c) and the deflection w (k) at the tip of the link. The numerical values of the system matrices ti A , B, and C are given in Appendix A. 1.3. The cost function of the M P C controller is ff H ^=zM^ * * *] ( +/| )_r 2+e (=1 »^ (4 - 10) 1=1 where r is the setpoint for joint angle. The setpoint for link deflection is zero. g We take the input and output constraints to be -6 N.m <u(k + i\k)<6 1 N.m -25 mm < y (k + i \ k) < 25 mm (4.11) 2 A computationally efficient 'anti-windup' M P C controller is designed using the strategy developed in Chapter 3. This controller is an unconstrained M P C controller. The fuzzy tuner 121 handles the constraints. The control input at time k of the unconstrained M P C is calculated using the analytical equation (3.45). The fuzzy tuner adjusts the M P C parameters such that the constraints are satisfied. Next we will compare the performance of this computationally efficient 'anti-windup' MPC controller with the constrained M P C controller. The constrained M P C controller solves a QP optimization problem at each time step. The constrained M P C controller is designed using the Model Predictive control toolbox in M A T L A B (Mathworks, 2005). We use Simulink® to perform the simulation. The Simulink block diagram is shown in Figure 4.14. Both constrained and unconstrained MPC controllers can be tested in the MPC control block to generate the control input signal. The nonlinear dynamic model of the singlelink flexible robotic manipulator with the first two flexible modes is used as the plant. The saturation block is used to limit the control input signal to the upper and lower saturation values. Two cases are tested. The MPC controller parameters are as given in Table 4.1. The joint angle setpoint is — for both cases. In case 1, the M P C controllers have the same parameters. Figure 4.15 through Figure 4.17 show the simulation results. In this case the constraints are inactive. Both the control input and the link deflection are within their ranges |w|<6N.m , |j/ |<25mrn . The 2 simulations results verify that the constrained and unconstrained M P C solutions are identical when the constraints are inactive. In case 2, the input constraint is active, as shown in Figure 4.18. The constrained MPC considers the constraints in the solution, so the control input for constrained M P C is within its range |w| < 6 N.m and reaches its maximum value in the first 3 time steps. If the unconstrained M P C uses the same set of control parameters as the constrained MPC, the calculated control input will exceed its maximum range as shown in Figure 4.18. In order to satisfy the input constraint, the unconstrained M P C has to increase the value of the input rate weight R from 3 to 5. This will be done by the fuzzy tuner. Figure 4.18 through Figure 4.21 u show the simulations for the constrained and unconstrained M P C controllers with different input rate weight values. The simulation results show that the responses of the unconstrained 122 MPC are very close to those of the constrained M P C when the constraints are active. In summary, the developed computationally efficient 'anti-windup' M P C controller has the same optimal solution as the constrained M P C when the constraints are inactive; and has the sub-optimal solution when the constraints are active. The system response performance of the unconstrained M P C is comparable to that of the constrained M P C response. Table 4.1 M P C controller parameters. H TC Constrained M P C 7 Case 1 Tl Unconstrained M P C 7 n Constrained M P C 7 Case 2 TV Unconstrained M P C 7 K P 160 9 20 30 8 160 9 20 30 8 160 9 20 30 3 160 9 20 30 5 Output Feedback • Radians to Degrees mo Joint Angle - MPC Joint Angle Setpoint Link Deflection Setpoint ref mv- Input Torque Unk Deflection MPC Controller Flexible-link Manipulator System 1000 ^> •^l ^ Link Deflection Figure 4.14 Simulation block diagram. 123 Time (seconds) Figure 4.15 Case 1: Joint angle responses for the constrained and unconstrained MPC. 10 1 Constrained M P C Unconstrained M P C 5h 0E" E, tz o 'XJ jo -5 • -10 -15K Time (seconds) Figure 4.16 Case 1: Link tip deflection responses for the constrained and unconstrained MPC. 124 • Constrained M P C Unconstrained M P C 12 10 Time (seconds) Figure 4.17 Case 1: Control inputs for the constrained and unconstrained MPC. • Constrained M P C Unconstrained M P C 10 12 14 Time (seconds) Figure 4.18 Case 2: Control inputs for the constrained and unconstrained M P C with the same parameters. 125 • Constrained M P C Unconstrained M P C • 10 12 , 14 Time (seconds) Figure 4.19 Case 2: Control inputs for the constrained and unconstrained M P C with different parameters. Time (seconds) Figure 4.20 Case 2: Joint angle responses for the constrained and unconstrained MPC with different parameters. 126 Time (seconds) Figure 4.21 Case 2: Link tip deflection responses for the constrained and unconstrained MPC with different parameters. 4.3 Payload Identification In Section 4.1.3 we have shown the effect of the payload on system dynamics is significant and cannot be neglected. If the system is not known, and if direct measurement is not available, we need to develop a system identification module to find the unknown payload. We will use the techniques developed in Section 3.3 to design the system identification module for the single-flexible link robotic manipulator. The continuous-time state-space model of the system is given in Appendix A. 1.2. The system matrices A and B are dependent on the payload. We assume that the nominal model is the one with a nominal payload. The structure matrices as denoted by As and Bs have the entry NaN at those elements that correspond to the unknown parameters which have to be estimated. The structure matrices are defined by 127 As = "0 0 1 0 0 0 0 1 0 NaN NaN NaN 0 NaN NaN NaN 0 , 0 Bs = NaN (4.12) NaN The unknown parameters of the structure matrices are determined by using the system identification module and the input and output data of the system. The system payload m, J p p can be calculated by solving the following equations using the elements of the identified system matrix B: 0.404 + 4.197m +9.167J - - p = B(3) p 0.769 + 17.669J + 8.0m „ + 0.959Jm P -2.049m - 0.229 -3.028J„ - P P - p 0.769 + 17.669^ + 8.0m + 0.959J m p p ( 4 1 3 = B(4) p p Next computer simulations are carried out to test the accuracy of the system identification module. An M P C controller moves the link with a payload at low speed from the initial position to 5° and then moves it back to the initial position. The nonlinear model of the singlelink flexible robotic manipulator with the first two flexible modes is used as the plant model. The Simulink block diagram in Figure 4.14 is used to generate the input and output data for the system. The simulation results for two different system payloads are presented below. Case 1: In this case, the payload is nominal, and we assume that there are no disturbances and measurement noise in the system. First the Simulink model of the system is tested. The input and output responses of the system are shown in Figure 4.22. The input and output data are placed in the Matlab workspace. We split the data record into two parts. The first part is used to identify the system model and the second part is used to verify the accuracy of the identified model. Figure 4.23 shows that a perfect fit is achieved by the model. In this case the numerical values of the system matrix B are 128 ) 0 B= 0 (4.14) 0.524358 -0.263886 By solving equation (4.13) the unknown system payload is obtained as: m = 0.38kg j =9.794391e-004kg.m . 2 p Case 2: In this case the payload is equal to double the nominal payload, and we assume that there are no disturbances and measurement noise in the system. The input and output responses of the system are shown in Figure 4.24. Figure 4.25 shows that a perfect model fit is achieved. By solving equation (4.13) the unknown system payload is obtained as m = 0.765593kg , p J =0.001766kg.m . 2 p u 1 1 0 I 1 I 2 I I 3 4 I 5 6 Time (seconds) I I 7 I 8 l 9 1 10 Figure 4.22 Case 1: Input and output responses of the single-link flexible manipulator (nominal payload). 129 Measured Output and Simulated Model Output Figure 4.23 Case 1: Measured outputs and simulated model outputs (nominal payload). 4 ntrol inpu E z o U 1 5 Time (seconds) -1 6 r 05 0 -0.5 -1 _i I I i_ 4 5 Time (seconds) 6 10 Figure 4.24 Case 2: Input and output responses of the single-link flexible manipulator (double the nominal payload). 130 Measured Output and Simulated Model Output 5 9 9.5 10 Figure 4.25 Case 2: Measured outputs and simulated model outputs (double the nominal payload). 4.4 Fuzzy Tuner A fuzzy tuner for the single-link flexible robotic manipulator is designed using the procedures presented in Chapter 3. Matlab fuzzy logic control toolbox is used to build the fuzzy inference system (FIS). Figure 4.26 shows the FIS input-output diagram of the system. Figure 4.26 FIS input-output diagram. 131 The membership functions for the input and output variables are defined in Section 3.42, and are shown in Figure 3.7 and Figure 3.8. The link deflection constraint (maximum allowed link deflection) is r = 25 mm and the control input constraint (maximum control input w allowed) is r = 6 N.m. u Based on the analysis in Section 3.4.1 and through extensive computer simulations, the primary functions and the side effects of the tuning parameters H , Q , and R w u are determined. These are summarized in Table 4.2. Table 4.2 Effects of the MPC tuning parameters. Controller Parameters Undesired Side Effects Functions Reduces joint angle overshoot; increases stability. Can slow down the system response. Increases the computational load. Q Reduces link deflection and control input. Increases joint angle tracking error and joint angle overshoot. K Reduces control input and link deflection. Can slow down the system response. Increases joint angle overshoot. w The rule base of the FIS is developed using Table 4.2, the general linguistic MPC tuning rules in Table 3.2, and the knowledge gained through computer simulations. The fuzzy rule base has 32 rules as given in Table 4.3. Table 4.3 Rule base of the FIS. IF 1 2 3 4 5 6 os. os L L L M M M L M S L M S os w B L L S L M S THEN IF THEN 17 18 19 20 21 22 os os M S S S S vs w vs u L M S VS L VS S VS VS vs vs 132 IF 7 8 9 10 11 12 13 14 15 16 L M S L L L L M M M S S S 4.5 23 24 25 26 27 28 29 30 31 32 S S s L M S VS L M S THEN IF THEN M s vs vs M S VS VS VS VS VS L M S vs vs vs vs vs s s s M S VS L M S VS S S S M s s vs s Computer Simulations of I M P C The developed intelligent model predictive control (IMPC) algorithm is now simulated for motion control of the single-link flexible robotic manipulator. The system payload is taken to be nominal. The nonlinear dynamic model of the single-link flexible robotic manipulator with first two flexible modes is used as the plant. The internal model of M P C is the linear model at the zero initial position with the first flexible mode. Three different cases of motion configurations are tested. Table 4.4 shows the predetermined M P C parameters for both cases. Here T is the time step; r is the link deflection constraint; r is the control input constraint; s H s e n , Q w w s e n , and R u control horizon; and Q sen u are the sensitivity parameters of the tuning actions; H u is the is the overall weighting for the joint angle and link deflection. The joint angle setpoints and the tuning parameters for the three cases are given in Table 4.5. Here r is the joint angle setpoint; H e ini is the initial prediction horizon; H p prediction horizon generated by the fuzzy tuner; Q w deflection weight; Q w end is its tuned value; R u ini ini end is the final is the initial value for the link is the initial input rate weight; and R u end is its tuned value. Figure 4.27 through Figure 4.29 show the system responses of Case 1. The initial, intermediate, and final system responses are shown in these figures. It is observed that the desired system performance cannot be achieved by using the initial set of M P C parameters. The joint angle response has a large overshoot, and the link deflection and the control input 133 exceed their limits. The IMPC tunes the controller using the fuzzy knowledge until the desired system performance is achieved. The results show that the system responses using the tuned parameters from IMPC meet the design specifications. There is no joint angle overshoot, and the link deflection and the control input are within their limits. The system responses for Case 2 and Case 3 using the IMPC control algorithm are shown in Figure 4.30 through Figure 4.35. In Chapter 2 we have shown that if the system output is taken as the link-end deflection, then the system is a non-minimum phase one. For a non-minimum phase system, the step response initially starts to move in the direction opposite to the final steady-state value. This behavior is verified by the deflection responses for the two cases shown in Figure 4.28, Figure 4.31 and Figure 4.34. In these figures we observe that initially the tip response takes up negative values. The simulation results verify that the IMPC control technique is quite effective in controlling the tip position of a single-link flexible robotic manipulator. Table 4.4 Predetermined parameters of the M P C controller for the single-link manipulator. T s (ms) 10 r (mm) r (N.m) 25 6 w u TJ p _sen 4.8 D Q-w sen 4.6 Qyw u _sen 9.6 20 9 Table 4.5 Tuning parameters of the MPC controller for the single-link manipulator. e r Case 1 Case 2 Case 3 Tt ~6 Tt 3~ n ~1 p_ini H Hp_end Qwini Qw _end u_ini R R _end u 100 530 l 7.8 1 3.0 100 584 l 14.4 1 6.8 100 728 l 19.8 1 9.8 134 Time (seconds) Figure 4.27 Case 1: Joint angle responses with IMPC. 250 Figure 4.28 Case 1: Link tip deflection responses with IMPC. Figure 4.29 Case 1: Control input with IMPC. Time (seconds) Figure 4.30 Case 2: Joint angle responses with LMPC. 30 20 h 10 h I 0 I I 1 2 I 3 I 4 5 Time (seconds] I I 6 I 7 I 8 Figure 4.31 Case 2: Link tip deflection responses with IMPC. Time (seconds) Figure 4.32 Case 2: Control input with IMPC. 137 Time (seconds) Figure 4.33 Case 3: Joint angle responses with IMPC. 301 1 1 1 1 1 1 1 1 20 r- 101- I 0 I 1 I 2 I I 3 4 I 5 6 Time (seconds) l i I 7 8 I 9 Figure 4.34 Case 3: Link tip deflection responses with LMPC. I 10 8 6 4fr -4 - _ 6 o I 0 I 1 I I 2 3 I 4 I 5 6 Time (seconds) I I 7 I 8 1 9 10 Figure 4.35 Case 3: Control input with IMPC. 4.6 Summary In this Chapter we designed an intelligent model predictive control (IMPC) scheme for the motion control of a single-link flexible robotic manipulator. A system model that is suitable for the controller design and simulation was developed. The simulation results indicated that the fundamental mode alone was able to quite accurately capture the flexible dynamics of the system response. The nonlinearity of the single-flexible link manipulator was found to be insignificant and could be neglected when link deflection and the velocity terms were not very large. The linear model with the first flexible mode model was used in the M P C controller design. The effect of the payload on system dynamics was fund to be significant and could not be neglected. A system identification module was designed to identify the unknown system payload. The fuzzy rule base and the fuzzy tuner were developed to tune the parameters of the MPC controller. The performance of the IMPC scheme was evaluated through computer simulations. The 139 simulation results showed that the I M P C control technique was quite effective in auto-tuning of the M P C controller parameters for achieving the desired system performance and for manage the input and output constraints in the motion control o f a single-link flexible robotic manipulator. 140 Chapter 5 Control of a Two-link Flexible Manipulator In this chapter the intelligent model predictive control (IMPC) algorithm developed in Chapter 3 is applied for the motion control of a two-link flexible robotic manipulator. The first link of the manipulator is a 1 m long aluminum rod, and the second link a i m long thin aluminum beam. Its physical parameters are as given in Table 2.1. The internal dynamic model design of the model predictive controller (MPC) is presented in Section 5.1. The IMPC scheme for the system is presented in Section 5.2. The performance of the IMPC scheme for the two-link system is evaluated using computer simulations in Section 5.3. 5.1 Internal Model In Section 2.33 we have developed the dynamic equations for a two-link flexible robotic manipulator using the assumed mode method. The dynamic equations are given in Appendix A.2. These equations are highly nonlinear and incorporate a finite number of flexible modes. In the present section we develop a linear internal model for the model predictive controller (MPC). First we investigate how many flexible modes are needed to adequately represent the flexible dynamics of the two-link robotic manipulator. From Table 2.2 and Table 2.3, the natural frequencies of the first four modes of link 1 and link 2 with nominal payload, are given by Link 1: f , = 1.9397 Hz , f x Link2: / 2 1 n =1.1442 H z , f n = 7.2546 H z , f n = 11.1224 H z , / = 94.2847 Hz , / 2 3 I 4 = 31.1435 H z , / = 257.3687 Hz 2 4 = 56.1767 Hz For both links, the natural frequency of the third mode is much larger than those of the first two modes. Consequently, it is reasonable to use only the first two flexible modes in the internal model. The natural frequency of the second flexible mode for link 1 is low (/ 12 = 7.2546 Hz ), and it is likely to be excited during the robot motion. We will verify this in 141 Section 5.3 using computer simulations. Accordingly, the internal model of MPC will include the first two flexible modes. Next, we investigate the nonlinearity of the system model. From the nonlinear dynamic equations of the system as given in Appendix A.2, it is seen that the nonlinearity of the system comes from the following terms in the dynamic equations: Coriolis and centrifugal terms, higher order terms of link deflection, and ' sin ' and ' cos' terms of 6 . In Chapter 2 we have 2 assumed that the link deflection is small, in the development of the nonlinear dynamic equations of the system. This implies that the higher order terms involving products of deformations can be neglected. Accordingly, if the velocity terms are not very large, the equilibrium point of the system may be taken as x = [0 0 6 0 ] . In this case the r 2 nonlinearity of the system is mainly due to the movement of link 2. The nonlinearity of the system is significant and cannot be neglected when the movement of link 2 is large. We will verify this in Section 5.3 using computer simulations. In order to deal with the nonlinearity of the system, we will re-linearize the system at time intervals of one second. In summary, the M P C internal model is a piecewise linear model (linearized every second) incorporating the first two flexible modes. The piecewise linear model can be obtained using the techniques presented in Section 2.4. 5.2 I M P C Controller Design The process of LMPC controller design for the two-link flexible robotic manipulator is similar to that for the single-link case as presented in Chapter 4, and its details are not repeated here. In this section we will outline the major aspects of the controller design process for the twolink problem. The physical parameters of the outboard link of the two-link flexible robotic manipulator are the same as those for the single-flexible manipulator presented in Chapter 4. The system identification module for the two-link system is also the same as that for the one-link case presented there. In the system identification stage, we lock joint 1 and only move link 2 to identify the unknown payload. The discrete-time state-space internal model of the MPC controller is given by 142 x(k +1) = Ax(k) + Bu(k) y(k) = Cx(k) ( 5 - 1 ) where x(AO = [ 0 , ( * ) , 0 ( * ) . * i i ( * X ^ 2 is the state vector, y(k) = ^9 (k),0 (k),w x u (k) 2 2 u(k) = [u (k),u (k)f x (k),w tip x is 2 the input 2 6 (k) x (k),w tip x (k) tip and (k)~J is the output vector. The system inputs w,(A:)and tip are the joint torques. The outputs are the joint angles 0 (k), deflections w vector, 2 and the link at the ends of the links. 2 The cost function of the MPC controller is +Z^_2 +m - i=i r J +Q 9i w2 [y (k 4 + /1 k)f +Jj_R ^ Au (k + i-\\k) +R 2 u x (5.2) ' x u Au (k + 2 2 i-l\k) j 2 i=i where r and r 0< di are the setpoints for the joint angles. The setpoints for the link deflections are zero. The input and output constraints are taken as -6 N.m < M, (k + i | k) < 6 N.m -6 N.m <uJk + i\k)<6 N.m ' -5 mm < y (k + i | k) < 5 mm 2 V 1 (5.3) 3 -20 mm <y (k + i\k)< A 20 mm Note that the maximum allowed tip deflection of link 1 is smaller than that of link 2. The reason for this is that the link vibration in link 1 has a significant effect on link 2, and the third mode nature frequency of link 2 f u =31.1435 Hz may be excited if the link 1 vibration is excessive. Limiting the maximum allowable tip deflections can prevent the excitation of the higher system modes. A computationally efficient 'anti-windup' M P C controller is designed for the two-link flexible manipulator using the approach presented in Chapter 3. The fuzzy inference system for the two-link manipulator uses the same membership 143 functions and the rule base as for the single-link manipulator presented in Chapter 4. Each link can be considered as a single flexible-link system, and its M P C parameters can be adjusted separately. The tuning actions for each link can be scaled to the proper level by adjusting the sensitivity parameters H Ru sen 2 , H _ p s e n J psen 2 , Q_ w senJ , Q_ _ w sen , R 2 u s e n J , and The larger values o f the prediction horizon tuning actions o f the two links are used in the controller tuning; specifically AH =max(AH ,AH ) p 5.3 pJ (5.4) p2 Computer Simulation of I M P C The developed intelligent model predictive control (IMPC) scheme is now simulated for motion control o f the two-link flexible robotic manipulator. The system payload is taken to be nominal. Figure 5.1 shows the Simulink simulation block diagram o f the system. The plant is represented by a nonlinear dynamic model o f the two-link flexible robotic manipulator incorporating the first two flexible modes. Initial set of M P C controller parameters is used to generate the system responses. The fuzzy tuner then adjusts the controller parameters until the desired system performance is achieved. Radian* to Deo,'"* Joint Angle2 1 Llnkl Deflection Link! Deflectk Link2 Dal taction Control Input Two-link Flexible Manipulator System mode w i l h 2 m to mm1 Unk2 D*flectioi Figure 5.1 Simulation block diagram of the two-link flexible manipulator system. 144 First the internal model selection analysis is done as presented in Section 5.1. The Simulink simulation block diagram in Figure 5.1 is used to perform the simulations. Three different internal model M P C controllers are tested and their closed-loop system responses are compared. The first M P C controller uses a linear model linearized at the initial link positions, incorporating only the first flexible mode. The second M P C controller uses a linear model linearized at the initial link positions, and incorporating the first two flexible modes. The third M P C controller uses a piecewise linear model linearized at every second and incorporating the first two flexible modes. The joint angle setpoint is — for both links. Figure 5.2 and Figure 5.3 show the system responses for these three internal model M P C controllers. From Figure 5.3 it is seen that if M P C uses a first-mode internal model, both links exhibit constant vibrations. Including the second mode in the internal model will reduce the link vibrations. Due to the nonlinearity of the system, however, the link deflections for the two-flexible-mode model remain large, and the joint 2 angle response is rather slow. Linearizing the system at every second improves the system performance. In view of this, the piecewise linear internal model (linearized every second) incorporating the first two flexible modes is used in the MPC controller. 145 35 Time (seconds) Figure 5.2 Joint angle response with three different internal models. 4 i 1 i : ^ :' ; ;''. '. \ [ftTTii f >; ;! i! ii il -6 ;l 0 Ii; '.; './ - ' 10 2 I -1 \ I / I 3 1— 1 \ i II Ii 1 Ii 1 1 i 1 i 1 i I 4 5 Time (seconds) 6 1 7 1 — 1 / 2-mode piecewise linear f 1 8 - • 1-mode linear • 2-mode linear 11 0 !I 1 1 I1 2 I 3 1 I 4 5 Time (seconds) Ii 1I 6 iI 7 8 1 Figure 5.3 Link tip deflection responses with three different internal models. Next, three different cases of motion configurations are tested in order to evaluate the performance of the TMPC algorithm. Table 5.1 gives the predetermined M P C controller parameters for both cases. The joint angle setpoints and the M P C tuning parameters for the three cases are given in Table 5.2. Figure 5.4 through Figure 5.9 shows the system responses for Case 1. Here the initial, intermediate, and final system responses are shown. It is noted that the desired system performance cannot be achieved by using the initial set of M P C parameters. For both links, the joint angle response exhibits a large overshoot, and the link deflection and the control input exceed their limits. The IMPC tunes the controller using the fuzzy knowledge base until the desired system performance is achieved. The results show that the system responses using the parameters tuned by IMPC meet the design specifications. There are no joint angle overshoots, and the link deflections and the control inputs are within their limits. The system responses for Case 2 and Case 3 with the TMPC scheme are shown in Figure 5.10 through Figure 5.15. The simulation results demonstrate that the IMPC control technique is quite effective in controlling the tip position of the two-link flexible robotic manipulator. Table 5.1 Predetermined parameters for the MPC controller of the two-link manipulator. Linkl Link 2 D (mm) (N.m) 5 6 w_2 r u_2 p sen 1 7.8 Qw Qyw _\ u sen 1 sen 1 2.5 2 5 40 r (mm) (N.m) 20 6 ^ p sen 2 7.8 Q *^ w sen 2 3.2 R u sen 2 1.05 Q , 40 147 Table 5.2 Tuning parameters for the MPC controller of the two-link manipulator. Linkl Case 1 Case 2 e_\ r e_i r n n ~6 ~6 TV n ~6 T n Case 3 3~ Qw _ini _\ Qw_end _\ 100 594 l 11.6 1 8.1 100 845 5 25.7 5 22.4 200 1100 10 34.1 10 36.1 p Link 2 Qw ini 2 u_ini_\ R _end_\ H _end pjni H R Qw _end _2 -^u _/•«/_ 2 U D u_end_2 lx Case 1 l 14.6 1 8.0 Case 2 5 19.4 5 43.0 Case 3 10 37.4 10 53.1 40 Initial response ntermediate responses Final tuned response 3 4 Time (seconds) Figure 5.4 Case 1: Joint angle responses of link 1 with IMPC. 148 Figure 5.5 Case 1: Joint angle responses of link 2 with EVIPC. |L! 0 I 1 I 2 I 3 I 4 5 Time (seconds) I 1 I I 6 7 8 Figure 5.6 Case 1: Link tip deflection responses of link 1 with IMPC. 200 •Initial response Final tuned response Intermediate response -200 Time (seconds) Figure 5.7 Case 1: Link tip deflection responses of link 2 with TMPC. Input constraint -p- 10 7 <-> -10 Final tuned M P C input -40 Time (seconds) Figure 5.8 Case 1: Control input for link 1 with IMPC. 50 T 40 30 20 Input constraint Initial input Intermediate input Final tuned M P C input Time (seconds) Figure 5.9 Case 1: Control input for link 2 with IMPC. Time (seconds) Figure 5.10 Case 2: Joint angle responses of link 1 and link 2 with TMPC. 25 20 • Link 1 • Link 2 15 10 B ^ 5 tz O / tt I 0 A-10 -15 -20 \f\l -25 10 12 Time (seconds) Figure 5.11 Case 2: Link tip deflection responses of link 1 and link 2 with IMPC. c o Time (seconds) Figure 5.12 Case 2: Control inputs for link 1 and link 2 with IMPC. 152 Link 1 Link 2 10 12 14 16 Time (seconds) Figure 5.13 Case 3: Joint angle responses of link 1 and link 2 with LMPC. 25 20 - Link 1 • Link 2 15 10 h E £ 5 / -10H -15 -20 -25 10 12 14 16 Time (seconds) Figure 5.14 Case 3: Link tip deflection responses of link 1 and link 2 with IMPC o U -2 :i g I 0 : I I I 2 4 6 I 8 Time (seconds) I I I 10 12 14 16 Figure 5.15 Case 3: Control inputs for link 1 and link 2 with TMPC. 5.4 Summary In this Chapter we developed an intelligent model predictive control (IMPC) scheme for motion control of a two-link flexible robotic manipulator. The internal model for model predictive control (MPC) was developed. The simulation results showed that the first flexible mode alone was unable to accurately capture the flexible dynamics of the system. Also, the nonlinearity of the system was found to be significant and could not be neglected. Consequently, a piecewise linear internal model (linearized every second) and incorporating the first two flexible modes was used in the MPC. A fuzzy rule base and a fuzzy tuner were developed to tune the M P C parameters. The performance of the TMPC scheme was evaluated through computer simulations. The simulation results showed that the TMPC control technique was quite effective in auto-tuning the MPC parameters, in achieving the desired system performance and in managing the input and output constraints in motion control of the two-link flexible robotic manipulator. 154 Chapter 6 Experiments with Flexible-link Manipulator In this chapter we focus on physical experimentation with a flexible-link manipulator. A prototype flexible-link robot manipulator system has been designed and developed in our laboratory at the University of British Columbia. It is suitable for validating and investigating the performance of various motion/force control strategies and algorithms which have been developed in the present research. In Section 6.1, the experimental test bed is described. The system components of the experimental apparatus, and the software design and operation of the overall system are presented there. In Section 6.2, implementation of the developed intelligent model predictive control (IMPC) scheme on the test-bed is described. Experiments using the prototype robot are outlined and experimental results are presented. The performance of the IMPC scheme is evaluated using the experimental results. 6.1 The Experimental Test-Bed In order to investigate the dynamics and control of flexible manipulators, the prototype flexible link manipulator system (FLMS) shown in Figure 6.1 has been designed and developed in our laboratory. A realistic model of this prototype robotic system has been used in the simulation studies carried Out in the present work. The prototype F L M S forms the testbed for experimental studies of the IMPC scheme developed in the present work. The prototype manipulator is composed of two revolute joints having a vertical axis of rotation so that they can move in a plane that is perpendicular to the field of gravity. A relatively long link is attached to each of these revolute joints. Two types of links are available, one being more flexible than the other. The detailed assembly drawings of joint 1 and joint 2 are found in Appendix B . l . Four rolling ball transfers are attached to the bottom of the second joint. The rolling support is important as it can reduce the axial loading of the motor shaft and provide a mobile base so that link 2 is free to move with respect to joint 1. 155 Without the rolling support, the lengthy link and the heavy weight of the motor will introduce a permanent bending stress on the motor shaft of joint 1, which may eventually damage the motor. The links of the experimental manipulator can be interchanged. This allows one to investigate the dynamic characteristics of the robot and test the performance of the developed motion/force control algorithms, for different physical parameters. As mentioned in Chapter 2, two types of manipulator links are used in this research. Type 1 link is a 1 m long, 0.003 m thick, and 0.051 m high aluminum thin beam. Type 2 link is an aluminum rod 2.0 cm in diameter and 1.0 m in length. In addition to the flexible links, all other machined parts such as motor mounts, joint supports and shaft couplings are made of Aluminum 6061 due to its light weight (density PAI = 2710 kg/m ), high strength (yield strength = 255 MPa) and ease of 3 machining. The numerical values for the physical parameters of the manipulator are given in Table 2.1. Figure 6.1 The prototype flexible link manipulator system (FLMS). A PC-based control system is used as it allows different control strategies to be implemented easily using software, and modifications to the control algorithms can be made conveniently in the investigation. The electrical system of the F L M S manipulator may be 156 classified into three main subsystems: the actuation subsystem, the measurement subsystem and the data acquisition subsystem. The major components of each of these subsystems are summarized in Table 6.1. The schematic diagram of the overall electrical system is shown in Figure 6.2. The detailed electrical wiring diagram of the system can be found in Appendix B.2. We describe these subsystems in the subsequent sections. Table 6.1 FLMS system components. System components Manufacturer Model No. H D Systems RHS-20-3012E050DO RHS-32-3018E050DO Actuation subsystem: • 2 Harmonic-drive motors with optical encoders • 2 P W M amplifiers Advanced Motion Control 12A8 25A8 • 1 D C Power supply Advanced Motion Control PS16L72 Futek L I 6 0 5 (251b) Measurement subsystem: • 1 B r i d g e type loadcell • 1 Signal conditioner Transducer Techniques TMO-1 • 1 Power adapter Transducer Techniques APD-12VDC • 2 Optical encoders H D Systems E050DO • 1 Analogue ultrasonic proximity sensor Honeywell PK104015-11 Servo-To-Go STGII-8 National Instruments CB-50LP Data acquisition subsystem: • 1 M o t i o n control interface card ( I S A bus) • 2 50-pin screw terminal blocks • 1 Pentium III personal computer • Operating system Microsoft W i n d o w s N T 4.0 Workstation • C++ software Microsoft V i s u a l C++ 6.0 L C F Advanced Technology 157 Ultrasonic Proximity Sensor Graphic User Interface Software Package Developed using Visual C++ Transducer Tecnhiques APD-12VDC Power Adaptor Pentiumlll 733MHz Servo-To-Go STGII-8 8-Axis ISA Bus Motion Control Interface Card National Instruments CB50-LP 50-Pin Screw Terminal Block (ToP2) a Amplified Sensor Signal Transducer Techniques TMO-1 Signal Conditioner 8V Excitation Milli-Volt Sensor Signal Futek L1605 (25LB) Load Cell Position Feedback Signal National Instruments CB50-LP 50-Pin Screw Terminal Block (To P3) +5V Power Line Position Feedback Signal Advanced Motion Control 25A8 PWM Amplifier H.V. Driving Signal HD Systems Harmonic Drive Gearing Motor RHS-25-3018-E050DO Built-in Optical Encoder H.V. Driving Signal HD Systems Harmonic Drive Gearing Motor RHS-20-3012-E050DO Built-in Optical Encoder Advanced Motion Control PS16L72 Unregulated Power Supply Advanced Motion Control 12A8 PWM Amplifier Figure 6.2 Schematic diagram of the electrical system of the manipulator. 6.1.1 Actuation Subsystem The actuation subsystem includes two D C servomotors, two matched pulse-width modulation (PWM) amplifiers and a D C power supply. A D C servomotor is located at each joint of the manipulator. These motors are used to control the motions and contact forces of the manipulator. D C motors are used as the actuators in this experimental setup due to their high precision, easy control, low power, and high-speed capabilities. Two motors with harmonic drive gearing, RHS-20-3012-E050DO and RHS-32-3018-E050DO, from H D system Inc., are chosen for our application. The harmonic drive gearing provides zero backlash (de Silva, 1989 and 2007), high positional accuracy and stiffness, and low torque/mass ratio. This makes them particularly suitable for applications that call for precise motion control. The motor unit comes in a compact package consisting of a servomotor, a harmonic drive gear-head, and an optical encoder for motion sensing (de Silva, 1989 and 2007). Their specifications are summarized in Table 6.2. A power amplifier is required to translate the low energy control signals from the 158 controller into high-energy signals (e.g., motor voltage or current) in order to drive the D C motor. Two P W M amplifiers, 12A8 and 25A8, from Advanced Motion Control are selected to drive the H D harmonic-drive motors. The specifications of the P W M amplifiers are summarized in Table 6.3. A D C power supply is required to provide the energy for the amplifiers. It can be an unregulated one because the PWM amplifiers can compensate for the power supply output variations and the A C ripples. A single unregulated D C power supply, PS16L72, from Advanced Motion Control is selected to complement the P W M amplifiers. The specifications of the power supply are summarized in Table 6.4. Table 6.2 Specifications of the harmonic-drive motors. Model Number RHS-20-3012-E050DO RHS-25-3018-E050DO Manufacturer HD Systems HD Systems Rated voltage 75 V 75 V Rated current 2.7 A 3.9 A Peak current 5.0 A 8.3 A Rated output torque 30 N.m 60 N.m Rated output speed 3000 rpm 3000 rpm Max. continuous stall torque 43 N.m 72 N.m Peak torque 84 N.m 160 N.m Torque constant 21.0N.m/A 22.9 N.m/A Actuator accuracy 1 arc-minute 1 arc-minute Gear ratio 100:1 100:1 Encoder resolution 500 ppr 500 ppr Weight 4.2 kg 6.4 kg 159 Table 6.3 Specifications of the P W M amplifiers. Model Number 12A8 25A8 Manufacturer Advanced Motion Control Advanced Motion Control DC Supply Voltage 20-80 V 20-80 V ±12 A ±25 A +6 A ±12.5 A Switching Frequency 33 kHz 33 kHz Bandwidth 2.5 kHz 2.5 kHz Peak Current (2 sec. max.) Max. Continuous Current Table 6.4 Specifications of the D C power supply. 6.1.2 Model Number PS16L72 Manufacturer Advanced Motion Control Input Voltage 120V A C Output Voltage 72VDC Nominal Output Current 10A Measurement Subsystem The measurement subsystem consists of feedback elements including a force sensor, a signal conditioner and its associated power adapter, two optical encoders, and an analog ultrasonic proximity sensor. The force sensor is for detecting the contact force at the end-effector. The signal conditioner is for impedance matching, signal amplification and noise filtering. There is an optical encoder at each joint, which gives the position measurements from the manipulator joints for feedback into the robot controller. A n ultrasonic proximity sensor is used for measuring the link tip position. A stain gage load cell (force sensor) is located at the end of the second link to measure the contact force. A stain gage load cell is a transducer which senses the load/force acting on 160 using strain gage elements, and converts the measurement into an analog electrical signal. This conversion is achieved by the physical deformation of the strain gages that are wired in a wheatstone bridge configuration. In our application, a compression type force sensor is required in order to measure the contact force at the tip of the end-effector. The load cell LI605 from Futek is selected for our application because it is thread mounted, which simplifies the design of the end-effector. Its specifications are summarized in Table 6.5. A force sensor usually has high output impedance and produces a low output signal in the millivolt range making further processing difficult. In view of this, a signal conditioner is connected between the force sensor and the data acquisition system. It has a low output impedance and a high input impedance (de Silva, 1989 and 2007). As a result it consumes little power from the force sensor and avoids electrical loading errors. This is referred to as impedance matching. It also consists of a high gain amplifier which can step up the signal level to a useful range. The signal conditioner TMO-1 from Transducer Techniques is selected due to its low cost and dedicated conditioning features. The signal conditioner plus its associated power adaptor APD-12VDC are required for the force sensor. The specifications of this unit are given in Table 6.6. Table 6.5 Specifications of the load cell. Model Number L1605 Manufacturer Futek Force range (Compression) 25 1b Excitation 10VDC, 18VDC max Bridge resistance 350 Q Rated output (RO) 2mV/V Non-linearity ±0.2% to 0.5% RO Weight 0.16 kg 161 Table 6.6 Specifications of the force sensor signal conditioner. Model Number TMO-1 Manufacturer Transducer Techniques Gain range 75 to 1000 Input sensitivity 1 mV/V min. for 8 V D C output Output voltage 0 to ±8 V D C Accuracy ±0.05% of FS Frequency response D C to 220 Hz Excitation voltage 8 V D C ± 0.25 V Power required 12 V D C Sensor resistance 120 Q min., 1000 Q max. The optical encoder E050DO from HD Systems is used to measure the actual angular position of the motor shaft and hence the rotation angle of the joint. The encoder comes assembled with the harmonic-drive motor; hence the mounting problems are avoided. The optical encoder is composed of light emitting diodes (LED), a code wheel and detectors (de Silva, 1989 and 2007). As the code wheel rotates, the light beam is interrupted and two pulsating signals are generated. The angular position of the shaft is measured by counting the number of pulse while the direction of rotation is indicated by the relative phase angle between the two output signals. Usually, there is one additional output channel Z that gives an index pulse corresponding to one full shaft revolution. As the optical encoder is a digital transducer, analog-to-digital (A/D) conversion is not required and the quantization error does not exist. The chosen encoder E050DO has a resolution of 500 PPR (pulse/rev.), with a gear reduction ratio of 100:1. The smallest joint angle that it can measure is 360° 360° ^x500xl00 4x500x100 6L„ =• = (l.8xl0~ )° 3 (6.1) 162 where y = 4 is the encoder multiplier. An analog ultrasonic proximity sensor from Honeywell is used for measuring the link tip position. It is necessary in evaluating the performance of the developed motion control algorithms, which is performed by measuring the link-end vibration when it reaches the final desired position. Table 6.7 lists the relevant parameters of the ultrasonic device. Table 6.7 Parameters of the ultrasonic sensor. 6.1.3 Model Number PK104015-11 Manufacturer Honeywell Type Analog ultrasonic proximity sensor Range 10 cm to 75 cm Input power 10-30 V D C , 50 mA Output 0-5 V D C Response speed 50 ms Bandwidth 20 Hz Repeat accuracy 1% of full scale Resolution 1 mm Data Acquisition Subsystem The data acquisition subsystem consists of a motion control interface card, two 50-pin screw terminal blocks, and one personal computer. A motion control interface card is needed to manage the data transfer between different hardware components and the computer. Motion control interface STGII-8 from Servo-To-Go is selected and used in the system. Its specifications are summarized in Table 6.8. The hardware installation guide of this card can be found in Appendix C. This card is a PC-based motion control card. When compared to a DSP based card, it offers more flexibility to the user, to experiment with different control algorithms. It is a general purpose, motion control input/output board which can control up to 163 eight motors simultaneously from an ISA-bus based computer such as IBM compatible PC. This board is simply and efficiently accessed by the set registers located in the I/O space of the PC. The card consists of four 50-pin connectors and one 2-pin connector for connection to the external hardware devices. The connector designations are as follows: • PI: 24 bits of opto-22 compatible digital I/O. • P2: 8 channels of analog input, 8 bits of user I/O, and 8 motor direction bits. • P3: encoder input and analog output for 1-4 axes. • P4: encoder input and analog output for 5-8 axes. • P5: battery backup input. In our application, only two (P2 and P3) out of the five connectors are used to acquire the encoder inputs, the force sensor input, the ultrasonic sensor input and the control signal outputs. Two 50-pin CB-50LP screw terminal blocks from National Instruments are used to make all the connections to the encoders, force sensor, ultrasonic sensor and the P W M amplifiers. Because optical encoder is a digital transducer, analog to digital (A/D) conversion is not required here. Two optical encoders are connected to the encoder input port of the motion control card, and the joint position feedback signals are transmitted to the computer. With an encoder multiplier of 4, a gear reduction ratio of 100:1, and an encoder resolution of 500 PPR, the joint angle 0 can be obtained as . 0 =i 360° FNC E N C where i ENC 4x100x500 (6-2) is the number of encoder counts. The analog inputs can be configured as ±5 V span to match the outputs of the selected signal conditioner of the force sensor and the ultrasonic sensor. With 13-bit resolution, the count to voltage constant p cv is given by P P c v =—^— 4096 (6.3) The measurement signal of the force sensor is sent to the signal conditioner and the 164 output signal from signal conditioner is supplied to the motion control card. The motion control card then uses an analog to digital converter (ADC) to convert the analog signal into a digital signal. The resulting digital signal is then supplied to the computer. The force can be calculated according to F = ^ADcPcvPvlb 5 ADC l where i ADC 25 (6-4) 4096 8 is the number of A D C counts and p is the voltage to lb constant. vlb The analog measurement signal from the ultrasonic sensor is supplied to the motion control card. The motion control card then uses A D C to convert the analog signal into a digital signal. The resulting digital signal is then supplied to the computer. The link-end position is calculated according to y, = iADcPcvPvcm ip where p vcm +y - y c (-) 6 r 5 =7.965 cm/V is the centimeter to voltage constant, y =22.61 cm is a constant c value obtained from calibration of the sensor, and y = 30 cm is the distance between the r final link tip position and the sensor reference surface. The analog output voltage range of the card is ± 1 0 V and the range of the 13bit digital to analog converter (DAC) is -4095 to 4096. The control inputs calculated from the control algorithms are the joint torques (u , u ) for each joint. Following equations are used to . x 2 convert the joint torque inputs into digital control signals: i =409.6V DACl +0.5 = 409.6^- + 0.5 ml 6 / , D where i DAC x V in 2 and i DAC 2 C 2 (6.6) 0 =409.6^_ +0.5 = 4 0 9 . 6 ^ + 0.5 2 are the D A C counts for joint 1 and joint 2, respectively. V , and in are the analog output voltages. Their values can be calculated from the torque inputs as V inj g' V =— 2 (6 7) '»_2 165 The digital control signals (i DAC signals (V in ,,i DAC 2 ) from the computer are converted into analog ,, V ) through the D A C of the motion control card. The resulting analog signals in 2 are then sent into the P W M Amplifier to generate the control torques (w, ,u ) which drive the 2 D C motors. A personal computer is needed for processing the input signals and generating the control signals. A Pentium III 733 MHz PC with Windows N T 4.0 Workstation operating system is chosen from LCF. Microsoft Visual C++ 6.0 is installed for the control software design. Table 6.8 Specifications of the motion control interface card. Model Number STGII-8 Manufacturer Servo To Go Encoder input Up to 8 channels of encoder input A, B, I input 24bit counters Single-ended or differential (RS422 compatible) input signals Analog input Analog output Digital input and output Up to 8 channels of analog input 13 bit resolution Configurable as ± 1 0 V or ±5 V spans Up to 8 channels of analog output +10 V to-10 V span 13 bit resolution 32 bits, configurable in various input and output combinations Opto-22 compatible Interval timers Capable of interrupting the PC Timer interval is programmable to 10 minutes in 25 u,s increments Battery backup input Used to maintain encoder counting capability in the event of power failure 166 6.1.4 Software Design A graphical user interface (GUI) software package is developed for the prototype flexible link manipulator system (FLMS) using Visual C++ in order to illustrate the satisfactory operation of the experimental setup and to test different motion/force control algorithms developed in the present research. The pull down menu of the FLMS is shown in Figure 6.3. g^Two Flexible I ml- M.mi[»ul.itfir Hyslrni File gpard Test Control Manual Control MPC Control > Iwiilli rtilili link " I . I I U I J H I . I I I I I Sy-leni Ne ijoard Test JHI*I Control ADC DAC Encoder Figure 6.3 Pull down menu of the FLMS software package. The 'Board Test' option is developed to verify the accuracy of the data acquisition of the motion control interface card. It consists of ' A D C , ' ' D A C , ' and 'Encoder' dialog boxes. By choosing ' A D C from the pull down menu, an analog-to-digital dialog box as shown in Figure 6.4 appears. The dialog box displays the analog input voltage of all the 8 A / D conversion channels simultaneously. By selecting the radio button in the graphic display group box, the graph in the middle of the dialog box can keep tracks of the voltage in one of the A / D channels. The sampling rate is 100 Hz. The accuracy of the A / D conversion can be checked by connecting a variable D C power supply to each channel and then comparing the reading displayed on screen with the terminal voltage measured from the digital voltmeter. The second board testing function available in the software package is the digital-toanalog conversion. By choosing ' D A C from the pull down menu, the digital-to-analog dialog box as shown in Figure 6.5 pops up. The output voltages of all the 8 D/A channels can 167 be set on the screen by first picking the corresponding check boxes and then pressing the 'Send to Axis' button. The accuracy of the conversion can be verified by measuring the voltages at each D / A channel using a digital voltmeter. The third board testing function is provided for testing the correctness of the encoder input. The corresponding dialog box is shown in Figure 6.6. To test the accuracy of the encoder readings, the up-down counters of the motion control interface card are first reset to zero by pressing the 'ZeroEncoderAll' button. Then the encoder is connected to one of the encoder channels via the screw terminal block. A low voltage reference signal (e.g. 0.5 VDC) is sent to the actuation subsystem so as to instruct the motor to rotate by a certain angle 0 in degrees. The rotated angle 6 should be equal to that calculated using equation (6.2) based on the encoder counts. Analog to Digital Conveision Axisl Graph™ •••MMm«B—«BEa • ••H• H• •H•EnI BnKuJ IH oHnnra HH |0 0073 Axis 2 [0 0183 A M 3 {3 6145 |01757 Axis 5 PS" Axis 7 rc C ! Count - Graphic Display j r Axis 2 Q025 tslll C% Axis 4 0 825 f -1 25' Axis 6 - <• Voltage [+A5V] C Axis 1 I 875 1 25 Axis 4 A D C Conversion * ( Axis 5 C Axis 6 •I 875 C Axis 7 2 5 :• a P Axis 6 - -3 75 -4 375 •5 71 6 73 Time in seconds 72 4 txit -w isiiiij Figure 6.4 Analog-to-digital conversion dialog box. 168 Digital to Analog Conversion Output [Volt]' Axis 1 F Axis 2 I Axis 3 F Axis 4 I Axis 5 - - r Axis S I Send to Axes - Axis 7 r~ Axis B Change/Step • r Exit gure 6.5 Digital-to-analog conversion dialog box. Encodei Readings Ell Encoder Counts Axis 1 10584194 Axis 2 Axis 3 Axis 4 • Axis 5 83B8736 ji -Axis 6 • jj" Axis 7 0= ZeroEncodersAII j;''' Axis 8 Figure 6.6 Encoder count dialog box. Encoder Cnt Angle |deg] Axis 1 |10584194, Axis 2 lisiiilMi Speed mm , . „• F ~ ' s [rj (0— • . . y ' .' ' .' (5 |1905 Axis 3 |o F ~ Axis 4 |0 , Axis 5 |8 . ' Axis 6 Output |V] , , max ' ' ' , , , , , , , • • • i ID™ ' • • • y • • Jl509 |0 ' ' • ,<) • • • lliiiiiiil r | 0 — [5 1 i°. 1 Axis 7 jo 'F~ F " Axis 8 ID F ~ IT" •>' • • • s - • • Emergency Stop j 1 1 1 • 1 1 1 1 . 1 1 ' ' 1 ' ' ' 1 1 ••• -orwrl 1 | , Reverse * Forward | Reverse Forward Reverse Forward j Reveise Forward | Reverse Forward 1 Reverse Forward j Forward j ZeroEncodersAII j Reverse Reverse Exit Figure 6.7 Manual control dialog box. The 'Control' option on the pull down menu of the F L M S software package contains the 'Manual Control' and 'MPC Control' operations. The manual control dialog box shown in Figure 6.7 is used to test the motion operation of the manipulator. It consists of control buttons for all 8 axes in which both speed and direction of rotation can be controlled manually. The motion can be stopped by pressing the same button again so that it returns to its 'release' state or by pressing the 'Emergency Stop' button. The dialog box also displays the encoder count, its equivalent angle, and the output voltage for all 8 axes sampled at 100 Hz so that their accuracy can be verified. The M P C motion control dialog box is developed to investigate the performance of the IMPC control strategy. The experimental results are presented in Section 6.2. The M P C motion control dialog box can be found from the pull down menu and is shown in Figure 6.8. The dialog box provides real-time plots of the system response and the control action. All input parameters are shown on the screen. Their definitions are given in Table 6.9. The MPC controller parameters can be determined by using the fuzzy tuner which has been developed in Chapter 4 based on the dynamic model of the system. In addition, the output data can be stored in a file in text format by specifying the file name in the save dialog box as shown in Figure 6.9. The output data text file can be imported into Matlab for further data analysis and to plot the system responses. 170 ~ Parameters Setup — ' Manuevei T me [sec] [ experiment Time [:ec]. Sarrc!ing Period [tis] | j ». j Control Axrt • ^ Prediction Horizon f Control Horizon f Output V DIXJL _•••••••[: . Input Rate Weight "j [ Stewtng Angle (deg] | MaK-Mai* rv.je [ ! S^PIolPoW ]••••••• XJLJDL • • • n n •••• . „,]| ft, ••••• •••• •••••• ..it I • • • a u a n a n n . ":JL3L jqnn ••••••• ••••••• • • • • • • • • • • • • • • • • • • • • • • • • a • • • c a r : ^••••••1 ••••••• ••••••• j m d g u n r x • • • • • n p ••••••••••bduuLiD JUULiUUi] • • • • c u j-,.Slo Figure 6.8 MPC motion control dialog box. Save to File: No of Skip points : |0 Cancel I OK Figure 6.9 Save dialog box. Table 6.9 Description of the input parameters of the M P C controller. Input Parameters Description Maneuver Time (s) The desired time taken for the manipulator to move to the specified slewing angle. Experiment Time (s) The total duration of closed loop control. Sampling Period (ms) The time period at which sensor signals are sampled and control action is generated. 171 Description Input Parameters Control Axis Axes 1 through 8 can be selected for control. Prediction Horizon Prediction horizon H Control Horizon Control horizon H of the M P C controller. Output Weight The link deflection weight Q Input Rate Weight Input rate weight R of the M P C controller. Slewing Angle (deg) The desired angle of rotation. Max-Min Y Range Maximum and minimum plot range of the system response in the v-axis of the graphic display. Skip Plot Point, n The number of sampling points skipped for plotting; i.e., the data are plotted at a rate of (n+l)Ts ms. Save Button To activate the Save Dialog Box at which the name of the output data file and the number of skipped data points can be specified. of the M P C controller. u w of the M P C controller. u The F L M S software package is composed of several dialog boxes that operate within the main application program. Each dialog box belongs to an individual class with its implementation statements contained in the 'xxx.cpp' file and its declaration statements contained in the 'xxx.h' header file. Figure 6.10 shows the structure of the overall software program. To ensure that the data acquisition functions provided by the motion control card can be used within the main application, all the header files and the C++ files in the 'stgconap.zip' should be added to the project workspace as has been done. The 'stgconap.zip' folder can be downloaded from the Servo To Go Website (http://www.servotogo.com). Moreover, the 'stgconap.cpp' file, which is a demo program running under the DOS prompt, should be modified and incorporated into our Visual C++ main application in order to have input and output displays in the Windows environments. A l l the global variables in the files should be added to the 'GUI.cpp' file and all the existing files should be included in the 'GUI.h' header file. The purpose of this modification is not only to have a user-friendly interface but also to 172 increase the operating speed of the control loop. It takes time for the data to pass from Windows to DOS for display; so, the original demo program can only have a maximum sampling rate of approximately 200 Hz. A polling function is implemented using the highresolution performance counter provided by Visual C++. It keeps on polling for the next sampling interval before allowing the control loop to execute again. Since the counter has a very high resolution, the control cycle rate can be controlled accurately. By using this polling function, and by putting the control algorithm and the plotting function in a single control loop, fast real-time control is possible up to a sampling frequency of 1000 Hz. The 'GUIDlg.cpp' file consists of the 'CGUIDlg' Class, which is derived from the builtin Microsoft Foundation Class 'Cdialog'. It is responsible for displaying the FLMS Main Dialog Box with pull down menu, to monitor if there is a menu item being selected and generate the corresponding ' C O M M A N D ' event. Each ' C O M M A N D ' event triggers the corresponding subroutine to display the functional dialog box by calling the 'DoModal( )' member function of the 'Cdialog' Class. The flow diagram of the F L M S Dialog Box is shown in Figure 6.11. The menu item is linked to five dialog boxes including ' A D C , ' ' D A C , ' 'Encoder,' 'Manual Control,' and 'MPC Motion Control' with a unique ID. These dialog boxes are described in a separate C++ file in which the data flow of the control algorithms and the operating mechanisms of the onscreen controls are defined. With this software structure, the program is easy to maintain and can be extended to include additional software modules for testing different control algorithms. 173 Servo To Go Motion Control Card Driver Main Application Program Funcgen.h Galliv.h Ntdrvr.h GUI.h GUI.cpp Offset.h Omnisem.h Pidalg.h Portio.h Stg_comn.h Stg_io.h Sigcmd.h Pcloud.h Stgdefs.h Trajgen.h Triwave.h Stgjo.cpp Trlwave.cpp Gallilv.cpp FLMS Dialog Box with pull down menu Class name: CGUIDIg GUIDIg.h GUIDIgxpp A/D Conversion Dialog Sox Class name: ADCDig AOCDIg.h AQCDlg.cpp Encoder Readings Oialog Sox Class name: CENCODERDIg ENCODEP.Olg.ll ENCO0EP.Dlg.cpp D/A Conversion Dialog Box Class name: COACDIg DACOIg.h DACDIg.cpp Manual Control Dialog Sox Class name: ManuaiControlOlg ManualControlDlg.h ManualControtDlg.cpp MPC Motion Control Dialog Box Class name: MPCOlg MPCDIg.h MPCDIg.epp Save Dialog Box Class name: SAVEOIg SAVEDIg.h SAVEDIg.cpp Advanced Sotpoint Settings Dialog Box Class name: AdvSetpointDIg AdvSetpolntDlg.h AdvSetpoint.cpp Figure 6.10 Program structure of the FLMS software package. C l a s s CGUIDIg Detect if any menu item is selected Send the corresponding COMMAND event Catltrw subroutine; Call th* subroutine: CGUIDIg ;:OnB«:ardt«*tAtl c(} C<3UtOl9::On80artitMitOicO Cail to ditpiay th* ADC Dialog B o * : C*H to dmplay the DAC Dialog Bo* : ro_dacdlg.QoModa! Q Call me subrwrtifw CGttf Gig; i OrsB«» Wto slEm wfc t{) Cst! the eubrouti(W: Cat! tNumtKOUtliw: COUtOlg: :On Soil fttts*tManw»tcontrot}j Cat! to display Iho Encoder Dialog Box: CaB to display the Manual Control Dialog Box r Cat) to display the MPC Motion Control Oialog Box Tn_«n.coderdl9,DoMod atf J mja anuatctridtg .DoModa Ifl mjnocdig .DoModalfl Figure 6.11 Flow diagram of the FLMS dialog box. 174 6.1.5 Operations of the Overall System How the overall system operates is described now. First the user inputs the desired position through the GUI of the computer. Based on the control algorithm installed in the computer, the digital control signals are generated and sent to the motion control interface card. The motion control interface card then converts the digital control signals into analog signals. The resulting analog control signals for the joints are sent to the corresponding P W M amplifiers. The P W M amplifiers generate the necessary voltage signals to drive the two harmonic-drive motors. As a result, the manipulator moves toward the target location. Built-in optical encoders measure the angular displacements of the links. These digital position signals are fed back to the control computer through the motion control interface card. The force sensor measures the contact force at the end-effector. The signal conditioner processes the sensor signal. The amplified analog sensor signals are compatible with the motion control interface card. The ultrasonic sensor measures the end-effector position and sends the corresponding analog signal to the motion control interface card. The motion control interface card converts these analog signals into digital signals and sends them to the computer. The computer processes the position and force signals based on the control algorithm and generates the control signals for the robot actuators. The update control signals then sent to the actuator system to adjust the motion of the manipulator until the desired values are reached. 6.2 Experimental Results Now we present the experimental results from the developed IMPC algorithm. The prototype FLMS has two flexible links; however, only the outboard link is used for the experiments. Joint module 2 is fixed by placing iron blocks on its sides. This system setup is identical to the single-link flexible manipulator shown in Chapter 4. The physical parameters of the manipulator are shown in Table 2.1. The input to the system is the motor voltage. The system outputs are the joint angle and the link tip position. The joint angle is measured using the encoder. The link tip position is measured using the ultrasonic sensor. Only the measured joint angle is fed back into the MPC controller. The link tip position measurement is not used as a feedback for the controller, and is used only to evaluate the controller performance. 175 We assume that the link tip position at the desired final joint angle is zero. The reference target surface of the ultrasonic sensor is placed parallel to the final position of the link, at a distance of y =30 cm. The link tip position can be obtained by using equation (6.5). The r maximum inclined angle of the ultrasonic sensor is about 7°. Consequently we are able to use the ultrasonic sensor measurement data for link tip positions up to y tip measured < 12 cm. Two different cases of motion configuration are tested on the F L M S . The desired joint angle for Case 1 is 30° and for Case 2 it is 60°. First, the M P C controller parameters are determined based on the dynamic model of the system using the fuzzy tuner, as we have done in Chapter 4. The M P C controller parameters are given in Table 6.10. Next, these controller parameters are imported into the FLMS MPC controller to control the motion of the system. The experimental and computer simulation results are shown in Figure 6.12 through Figure 6.17. From the experimental results we observe that good system responses are achieved in the motion control of the FLMS using IMPC control algorithm. The joint angle response has no overshoot, the control input is within its constraints (input voltage |v(/)| < 2 V or joint torque \r(t)\ < 6 N.m), and the end-effector reaches its final position with no vibration and no steady-state error. Note that in the physical experiments, the measurement of the tip position response of Case 1 shown in Figure 6.13 starts from 2 seconds, and that of Case 2 shown in Figure 6.16 starts from 3 seconds. These delays in measurement are due to the limitation of the ultrasonic sensor. Specifically, in view of the inclined angle, we are able to accurately measure the link tip position only when the tip is close to the final position. Consequently, the non-minimum phase 'dip' in the initial tip response is not shown in these figures. The experimental results are somewhat different from the simulation results. In particular, the joint angle and tip position responses of the prototype system are more sluggish than the corresponding simulated responses for both cases. The discrepancy of simulation and experimental results comes mainly due to the model errors and unmeasured disturbances. The model errors are caused primarily by inaccurate viscous and structural damping coefficients of the joint and the resulting inaccurate friction forces in the nonlinear model. In the computer model, we assume that the viscous damping coefficients are = 0.2 and the structural damping coefficients are b , = 0.1. Model error is unavoidable because these are not the true x 176 values in the experimental system. Also, the nonlinear model used in computer simulations does not include the friction force of the rolling ball transfer at the end of the link. Due to these factors, the nonlinear model used in computer simulations is not an exact representation of the real manipulator. Even with the model error, it is clear from the experimental results that good system performance can be achieved by using the IMPC controller. In this sense the experimental results exhibit robustness of the controller with respect to model error. We can further improve the system performance by fine tuning the M P C controller parameters on line. Table 6.10 MPC controller parameters. e r Case 1 Case 2 7 n 6~ Q K w 530 9 20 7.8 3.0 584 9 20 14.4 6.8 Figure 6.12 Case 1: Joint angle responses (experiment and simulation). 177 - Experiment • Simulation Time (seconds) Figure 6.13 Case 1: Tip position responses (experiment and simulation). - Experiment • Simulation 10 Time (seconds) Figure 6.14 Case 1: Control input (experiment and simulation). 12 Time (seconds) Figure 6.15 Case 2: Joint angle responses (experiment and simulation). 120 - Experiment • Simulation 100 80 •S 60 h 40 20 7 8 Time (seconds) 10 12 Figure 6.16 Case 2: Tip position responses (experiment and simulation). Experiment Simulation 1-5 h -0.5' 0 ' 2 ' 4 1 8 Time (seconds) 1 8 1 10 1 12 Figure 6.17 Case 2: Control input (experiment and simulation). 6.3 Summary In this chapter we presented the development of the prototype flexible-link robot manipulator system (FLMS) in our laboratory, to investigate the performance of various motion/force control strategies and algorithms. The implementation of the developed IMPC control algorithm on the robot test-bed was described. Experimental results from the robot were presented under the developed EVIPC scheme. The experimental results demonstrated that the IMPC control technique developed in the present research was quite effective in controlling the tip position of a prototype flexible-link manipulator. 180 Chapter 7 Conclusion 7.1 Primary Contributions The main contributions of this research are summarized below: • Kinematic and dynamic models for a class of flexible link robotic manipulators were developed. A n accurate nonlinear dynamic model of a flexible-link manipulator system (FLMS) was development using the assumed mode method. More realsitic boundary conditions that represent the balance of moments and shear forces separately were incorporated in the analysis and simulation of the system. Effects of the payload on the mode shapes and the dynamics of the system were systematically analyzed. The non-minimum phase characteristics of the system were studied. Based on the model analysis and computer simulations, a linear model suitable for controller design was established. The developed model is rather simple to implement and analyze, yet capable of capturing the process dynamics accurately so as to properly predict the future outputs for use in the control scheme. • An intelligent model predictive control (IMPC) strategy for motion control of the flexible link robot manipulator was developed based on a two-level hierarchical control architecture. This control structure was used to combine the advantages of conventional model predictive control (MPC) and knowledge-based soft control incorporating fuzzy logic. • A computational efficient multi-stage MPC algorithm with guaranteed stability was developed. This MPC algorithm is used by the M P C module of the control structure for real time implementation of the overall adaptive scheme. In the developed scheme, the input constraints are not managed through optimization 181 but using a local anti-windup scheme and an intelligent fuzzy tuner. This reduces the optimization of a quadratic programming (QP) problem to a simple least square (LS) problem. • Real time system identification module was designed to estimate an unknown payload carried by the robotic manipulator. • A knowledge-based fuzzy tuner for auto-tuning the M P C controller was developed based on analysis, simulation, and experimentation of the prototype FLMS. • Implementation of the LMPC scheme in a prototype robotic system was investigated. A flexible link manipulator system (FLMS) was designed and constructed in our laboratory. This system was used to evaluate and refine the developed modeling and control strategies. The performance of the developed EVIPC scheme was evaluated using computer simulations and experimentation with the prototype FLMS. The results show that the EVIPC developed in the present work is able to effectively control the motion of a flexible link robot manipulator. 7.2 Recommendations for Future Research The present subject of research has not been exhausted in the work presented in this thesis. There is still work to be done on the study of flexible-link robotic manipulators. Some aspects of possible future research are summarized below: • Develop a path planning technique for the motion control of the manipulator. This may result in reduced link vibrations and improved performance of the system. • Develop an efficient nonlinear M P C controller. The controller may use the nonlinear model of the system as developed in the present work, for prediction and optimization. The nonlinear MPC controller can be used for highly nonlinear flexible-link manipulator systems. • Refine the fuzzy knowledge of the fuzzy inference system based on physical experimentation using the prototype robotic system. • Integrate intelligent learning techniques into the control architecture of the robotic 182 system. The system will be able to improve its knowledge base using offline training and online learning. Extend the developed IMPC technique to include contact force control of flexiblelink manipulator systems. 183 Bibliography Astrom, K J . and B. Wittenmark, Computer-Controlled Systems: Theory and Design, 2nd Edition, Prentice-Hall, Inc., Englewood Cliffs, NJ, 1990. Astrom, K.J. and B. Wittenmark, Adaptive Publishing, Inc., Reading, M A , 1995. Control, 2nd Edition, Addison-Wesley Bai, M . , D.H. Zhou, and H. Schwarz, "Adaptive Augmented State Feedback Control for an Experimental Planar Two-Link Flexible Manipulator," IEEE Transactions on Robotics and Automation, Vol. 14, No. 6, pp. 940-950, 1998. Banavar, R.N. and P. Dominic, "An LQG/7/^, Controller for a flexible Manipulator," IEEE Transactions on Control Systems Technology, Vol. 3, pp. 409-416, 1995. Bellezza, F., L. Lanari, and G. Ulivi, "Exact modeling of the slewing flexible link," IEEE International Conference on Robotics and Automation, Cincinnati, OH, pp. 734739, 1990. Benosman, M . , F. Boyer, G. Le Vey, and D. Primault, "Flexible Links Manipulators: from Modelling to Control," Journal of Intelligent and Robotic Systems, Vol. 34, pp. 381-414, 2002. Book, W.J., "Recursive Lagrangian Dynamics of Flexible Manipulator Arms," International Journal of Robotics Research, Vol. 3, No. 3, pp. 87-101, 1984. Book, W J . , "Control Motion in an Elastic World," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 115, pp. 252-261, 1993. Book, W.J., "Structural Flexibility of Motion Systems in the Space Environment," IEEE Transactions on Robotics and Automation, Vol. 9, No. 5, pp. 524-530, 1993. Cannon, R.H. and Jr. E. Schmitz, "Initial Experiments on the End-Point Control of a Flexible One-Link Robot," International Journal of Robotics Research, Vol. 3, No. 3, pp. 62-75, 1984. 184 [11] Caswara, F . M . and H . Unbehauen, "A Neurofuzzy Approach to the Control of a Flexible-Link Manipulator," IEEE Transactions on Robotics and Automation, Vol. 18, No. 6, pp. 932- 944, 2002. [12] Cetinkunt, S. and W. Yu, "Closed-Loop Behavior of a Feedback-Controlled Flexible Arm: A Comparative Study," International Journal of Robotics Research, Vol. 10, No. 3, pp. 263-275, 1991. [13] Choi, B.O. and K. Krishnamurthy, "Unconstrained and Constrained Motion Control of a Planar Two-Link Structurally Flexible Robotic Manipulator," Journal of Robotic Systems, Vol. 11, No. 6, pp. 557-571, 1994. [14] Clarke, D.W., C. Mohtadi, and P.S. Tuffs, "Generalized Predictive Control - Part I and H," Automatica, Vol. 23, No. 2, pp. 137-160, 1987. [15] Clarke, D.W. and C. Mohtadi, "Properties of Generalized Automatica, Vol. 25, No. 6, pp. 859-875, 1989. [16] Culter, C R . and B.L. Ramaker, "Dynamic Matrix Control - a Computer Control Algorithm," Proc. Automatic Control Conference, Paper WP5-B, San Franciso, C A , 1980. [17] De Luca, A . and B. Siciliano, "Trajectory Control of a Non-Linear One-Link Flexible Arm," International Journal of Control, Vol. 50, No. 5, pp. 1699-1715, 1989. [18] De Luca, A . and B. Siciliano, "Closed-Form Dynamic Model of Planar Multilink Lightweight Robots," IEEE Transactions on Systems, Man, and Cybernetics, Vol. 21, pp. 826-839, 1991. [19] De Luca, A . and B. Siciliano, "Regulation of Flexible Arms Under Gravity," IEEE Transactions on Robotics and Automation, Vol. 9, No. 4, pp. 463-467, 1993. [20] De Silva, C.W., Control Sensors and Actuators, Prentice Hall, Englewood Cliifs, NJ, 1989. [21] De Silva, C.W., "An Analytical Framework for Knowledge-Based Tuning of Servo Controllers," Engineering Applications of Artificial Intelligence, Vol. 4, No. 3, pp. 177189, 1991. [22] De Silva, C.W., Intelligent Raton, FL, 1995. [23] De Silva, C.W., Mechatronics—An Boca Raton, FL, 2005. Control—Fuzzy Logic Applications, Predictive Control," C R C Press, Boca Integrated Approach, Taylor & Francis/ CRC Press, 185 [24] De Silva, C.W., Vibration—Fundamentals C R C Press, Boca Raton, FL, 2006. and Practice, 2" Edition, Taylor & Francis/ [25] De Silva, C.W., Sensors and Actuators—Control Francis/ C R C Press, Boca Raton, FL, 2007. [26] Demircioglu, H . and D.W. Clarke, "Generalized Predictive Control with End-Point State Weighting," IEE Proceedings-d Control Theory and Applications, Vol. 140, No. 4, pp 275-282, 1993. [27] Fan, T. and C W . de Silva, "Intelligent Model Predictive Control of a Flexible-Link Robotic Manipulator," Proc. ASME International Mechanical Engineering Congress and Exposition, Orlando, FL, Paper FMECE2005-81899, 2005. [28] Fan, T. and C W . de Silva, "Model Predictive Control of a Flexible-Link Robotic Manipulator," Proc. International Symposium on Collaborative Research in Applied Science, Vancouver, B.C., Canada, pp. 166-173, 2005. [29] Feliu, V., J.A. Somolinos, C. Cerrada, and J.A. Cerrada, "A New Control Scheme of Single-link Flexible Manipulators Robust to Payload Changes," Journal of Intelligent and Robotic Systems, Vol. 20, pp. 349-373, 1997. [30] Formalsky, A . M . and E.K. Lavrovsky, "Stabilization of Flexible One-Link Arm Position: Stability Domains in the Space of Feedback Gains," International Journal of Robotics Research, Vol. 15, No. 5, pp. 492-504, 1996. [31] Garcia-Bentiez, E . , S. Yurkovich, and K . M . Passino, "Rule-Based Supervisory Control of a Two-Link Flexible Manipulator," Journal of Intelligent and Robotics Systems, Vol. 7, pp. 195-213, 1993. [32] Ge, S.S., T.H. Lee, and G. Zhu, "Improving Regulation of a Single-Link Flexible Manipulator with Strain Feedback," IEEE Transactions on Robotics and Automation, Vol. 14, No. l,pp. 179-185, 1998. [33] Geniele, FL, R.V. Patel, and K. Khorasani, "End-Point Control of a Flexible-Link Manipulator: Theory and Experiments," IEEE Transactions On Control Systems Technology, Vol. 5, No. 6, 1997. [34]. Green, A. and J.Z. Sasiadek, "Dynamics and Trajectory Tracking Control of a TwoLink Robot Manipulator," Journal of Vibration and Control, Vol. 10, pp. 1415-1440, 2004. [35] Gutierrez, L . B . and F.L. Lewis, "Implementation of a Neural Network Tracking Controller for a Single Flexible Link: Comparison with PD and PID Controllers," IEEE Transactions on Industrial Electronics, Vol. 45, No. 2, pp. 307-318, 1998. System Instrumentation, Taylor & 186 [36] Karray, F. and C W . de Silva, Soft Computing and Intelligent Systems Design, AddisonWesley Publishing, Inc., New York, N Y , 2004. [37] Khalil, H.K., Nonlinear Systems, 3nd Edition, Prentice-Hall, Inc., Upper Saddle River, NJ, 2002. [38] Konno, A . , D. Liu, and M . Uchiyama, "A Singularly Perturbed Method for Pole Assignment Control of a Flexible Manipulator," Robotica, Vol. 20, pp. 637-651, 2002. [39] Kouvaritakis, B. and M . Cannon, Nonlinear Predictive Control: Theory and Practice, The Institution of Electrical Engineers, London, U K , 2001. [40] Kothare, M . V . , V. Balakrishnan, and M . Morari, "Robust Constrained Model Predictive Control Using Linear Matrix Inequalities," Automatica, Vol. 32, No. 10, pp. 1361-1379, 1996. [41] Kubica, E . and D. Wang, "A Fuzzy Control Strategy for a Flexible Single Link Robot," Proc. IEEE International Conference on Robotics and Automation, pp. 236-241, 1993. [42] Lee, H . H . , "A New Trajectory Control of a Flexible-Link Robot Based on a Distributed-Parameter Dynamic Model," International Journal of Control, Vol. 77, No. 6, pp. 546-553, 2004. [43] Lee, J.H. and Z . H . Yu, "Tuning of Model Predictive Controllers for Robust Performance," Computers & Chemical Engineering, Vol. 18, No. 1, pp. 15-37, 1994. [44] Lee, K.S. and Y . Park, "Residual Vibration Reduction for a Flexible Structure Using a Modified Input Shaping Technique," Robotica, Vol. 20, pp. 553-561, 2002. [45] Lee, S.H. and C W . Lee, "Hybrid Control Scheme for Robust Tracking of Two-Link Flexible Manipulator," Journal of Intelligent and Robotic Systems, Vol. 34, pp. 431452, 2002. [46] L i , Y . F . and X . B . Chen, "End-Point Sensing and State Observation of a Flexible-Link Robot," IEEE/'ASME Transactions on Mechatronics, Vol. 6, No. 3, pp. 351-356, 2001. [47] Liu, W. and G. Wang, "Auto-Tuning Procedure for Model-Based Predictive Controller," Proc. IEEE International Conference on Systems, Man, and Cybernetics, Vol. 5, pp. 3421 -3426,2000. [48] Ljung, L., System Identification Upper Saddle River, NJ, 1999. [49] Luo, Z. H . , "Direct Strain Feedback Control of Flexible Robot Arms: New Theoretical and Experimental Results," IEEE Transactions on Automatic Control, Vol. 38, No. 11, pp. 1610-1622, 1993. - Theory for the User, 2nd Edition, Prentice-Hall, Inc., 187 Luo, Z. H. and B. Guo, "Further Theoretical Results on Direct Strain Feedback Control of Flexible Robot Arms," IEEE Transactions on Automatic Control, Vol. 40, No. 4, pp. 747-751, 1995. Maciejowski, J.M., Multivariable Reading, M A , 1989. Feedback Design, Addison-Wesley Publishing, Inc., Maciejowski, J.M., Predictive Control: With Constraints, Pearson Education Limited, Harlow, England, 2002. Madhavan, S.K. and S.N. Singh, "Inverse Trajectory Control and Zero Dynamics Sensitivity of an Elastic Manipulator," International Journal of Robotics and Automation, Vol. 6, No. 4, pp. 179-192, 1991. Magee, D.P. and W.J. Book, "Eliminating Multiple Modes of Vibration in a Flexible Manipulator," Proceedings of the IEEE Conference on Robotics and Automation, pp. 474-479, 1993. Maplesoft, Maple 10 User Manual, Waterloo Maple, Inc., Waterloo, ON, Canada, 2005. Mathworks, Control System Toolbox: For Use with Matlab - User's Guide, Version 5, The Mathworks, Inc., Natick, M A , 2002. Mathworks, Fuzzy Logic Toolbox: For Use with Matlab - User's Guide, Version 2, The Mathworks, Inc., Natick, M A , 2002. Mathworks, Model Predictive Control Toolbox: For Use with Matlab - User's Guide, Version 2, The Mathworks, Inc., Natick, M A , 2005. Mathworks, System Identification Toolbox: For Use with Matlab Version 6, The Mathworks, Inc., Natick, M A , 2003. - User's Guide, Moallem, M . , K. Khorasani and R.V. Patel, "An Integral Manifold Approach for Tip Position Tracking of Flexible Multi-Link Manipulators," IEEE Transactions on Robotics and Automation, Vol. 13, No. 6, pp. 823-837, 1997. Moallem, M . , R.V. Patel, and K. Khorasani, Flexible-Link Robot Manipulators: Control Techniques and Structural Design - (Lecture Notes in Control and Information Sciences; 257), Springer-Verlag, London, U K , 2000. Morris, A.S. and A . Madani, "Quadratic Optimal Control of a Two-Flexible-Link Robot Manipulator," Robotica, Vol. 16, pp. 97-108, 1998. 188 [63] Moudgal, V . G . , K . M . Passino, and S. Yurkovich, "Rule-Based Control for a FlexibleLink Robot," IEEE Transactions on Control Systems Technology, Vol. 2, No. 4, pp. 392-405,1994. [64] Nemir, D . C , A J . Koivo, and R.L. Kashyap, "Pseudolinks and the Self-Tuning Control of a Nonrigid Link Mechanism," IEEE Transactions on Systems, Man, and Cybernetics, Vol. 18, No. 1, pp. 40-48, 1988. [65] Nho, H . C and P. Meckl, "Intelligent Feedforward Control and Payload Estimation for a Two-Link Robotic Manipulator," IEEE/ASME Transactions On Mechatronics, Vol.8, No. 2, pp. 277-283, 2003. [66] Prett, D., G. Garcia, and C. Cutler, "The Dynamic Matrix Control Method," US Patent 4349869, 1982. [67] Pistikopoulos, E.N., V . Dua, N.A. Bozinis, A . Bemporad, and M . Morari, "On-Line Optimization Via Off-Line Parametric Optimization Tools," Computers and Chemical Engineering, Vol. 24, pp. 183-188, 2000. [68] Rao, S.S., Mechanical Reading, M A , 1995. [69] Rawlings, J.B. and K.R. Muske, "The Stability of Constrained Receding Horizon Control," IEEE Transactions on Automatic Control, Vol. 38, No. 10, pp. 1512-1516, 1993. [70] Rossiter, J.A., Model-Based Boca Raton, FL, 2000. [71] Rossi, M . , D. Wang, and K. Zuo, "Issues in the Design of Passive Controllers for Flexible-Link Robots," International Journal of Robotics Research, Vol. 16, No. 4, pp. 577-588, 1997. [72] Ryu, J.H., D.S. Kwon, and Y. Park, "A Robust Controller Design Method for a Flexible Manipulator with a Large Time Varying Payload and Parameter Uncertainties," Journal of Intelligent and Robotic Systems, Vol. 27, pp. 345-361, 2000. [73] Shaheed, M . H . and M . O . Tokhi, "Dynamic Modelling of a Single-Link Flexible Manipulator: Parametric and Non-Parametric Approaches," Robotica, Vol. 20, pp. 93109, 2002. [74] Siciliano, B., W.J. Book and G. De Maria, "An Integral Manifold Approach to Control of a One-Link Flexible Arm," Proc. 25th IEEE Conference On Decision and Control, pp. 1131-1134, 1986. Vibrations, 3rd Edition, Addison-Wesley Publishing, Inc., Predictive Control: A Practical Approach, C R C Press, 189 [75] Siciliano, B. and W J . Book, "A Singular Perturbation Approach to Control of Lightweight Flexible Manipulators," International Journal of Robotics Research, Vol. 7, pp. 79-90, 1988. [76] Siciliano, B., J.V.R. Prasad, and A J . Calise, "Output Feedback Two-Time Scale Control of Multi-Link Flexible Arms," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 114, pp. 70-77, 1992. [77] Singer, N . C . and W.P. Seering, "Preshaping Command Inputs to Reduce System Vibration," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 112, pp. 76-82, 1990. [78] Slotine, J.-J.E. and W. P. Li, Applied Nonlinear Control, Prentice-Hall, Inc., Englewood Cliffs, NJ, 1991. [79] Song, B. J. and A J . Koivo, "Nonlinear Predictive Control with Application to Manipulator with Flexible Forearm," IEEE Transactions on Industrial Electronics, Vol. 46, No. 5, pp. 923-932, 1999. [80] Spong, M.W., "Modeling and Control of Elastic Joint Robots," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 109, No. 3, pp. 310-319, 1987. [81] Spong, M.W., K . Khorasani and P.V. Kokotovic, "An Integral Manifold Approach to the Feedback Control of Flexible Joint Robots," IEEE Transactions on Robotics and Automation, Vol. 3, No. 4, pp. 291-299, 1987. [82] Spong, M.W. and M . Vidyasagar, Robot Dynamics and Control, John Willey & Sons, Inc., New York, N Y , 1989. [83] Subudhi, B. and A.S. Morris, "Dynamic Modelling, Simulation and Control of a Manipulator with Flexible Links and Joints," Robotics and Autonomous Systems, Vol. 41, No. 4, pp. 257-270, 2002. [84] Subudhi, B. and A.S. Morris, "Singular Perturbation Approach to Trajectory Tracking of Flexible Robot with Joint Elasticity," International Journal of Systems Science, Vol. 34, No. 3, pp. 167-179,2003. [85] Talebi, H.A., R.V. Patel, and K. Khorasani, Control of Flexible-Link Manipulators Using Neural Networks - (Lecture Notes in Control and Information Sciences; 261), Springer-Verlag, London, U K , 2001. [86] Tokhi, M.O. and A . K . M . Azad, "Design and Development of an Experimental Flexible Manipulator System," Robotica, Vol. 15, pp. 283-292, 1997. [87] Tokhi, M.O., Z. Mohamed, and M . H . Shaheed, "Dynamic Characterisation of a Flexible Manipulator System," Robotica, Vol. 19, pp. 571-580, 2001. 190 [88] Tondel, P., T.A. Johansena, and A. Bemporad, "Evaluation of Piecewise Affine Control Via Binary Search Tree," Automatica, Vol. 39, pp. 945-950, 2003. [89] Wai, R J . and M . C . Lee, "Intelligent Optimal Control of Single-Link Flexible Robot Arm," IEEE Transactions on Industrial Electronics, Vol. 51, No. 1, pp. 201-220, 2004. [90] Wang, F.Y. and Y. Gao, Advanced Studies of Flexible Robotic Manipulator Modeling, Design, Control and Applications, World Scientific Publishing, River Edge, NJ, 2003. [91] Wang, D. and M . Vidyasagar, "Transfer Functions for a Single Flexible Link," Proc. IEEE International Conference on Robotics and Automation, pp. 1042-1047, 1989. [92] Wang, D. and M . Vidyasagar, "Control of a Class of Manipulators with a Single Flexible Link - Part I: Feedback Linearization," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 113, No. 4, pp. 655-661, 1991. [93] Wang, D. and M . Vidyasagar, "Control of a Class of Manipulators with a Single Flexible Link - Part II: Observer-Controller Stabilization," ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 113, No. 4, pp. 662-668, 1991. [94] Wilson, D.G., R.D. Robinett, G.G. Parker and G.P. Starr, "Augmented Sliding Mode Control for Flexible Link Manipulators" Journal of Intelligent and Robotic Systems, Vol. 34, pp. 415-430, 2002. [95] Wu, Q.M. and C W . de Silva, "The Effect of Fuzzy Resolution in Servo Tuning," Proc. Second IEEE Conference on Control Applications, Vol. 1, pp. 77-82, Vancouver, B.C., 1993. [96] Yim, W., "Modified Nonlinear Predictive Control of Elastic Manipulators," Proc. IEEE International Conference on Robotics and Automation, Minneapolis, M N , pp. 20972102, 1996. [97] Yurkovich, S. and A.P. Tzes, "Experiments in Identification and Control of FlexibleLink Manipulators," IEEE Control Systems Magazine, Vol. 10, No. 2, pp. 41 - 46, 1990. [98] Zhu, G., S.S. Ge, and T.H. Lee, "Simulation Studies of Tip Tracking Control of a Single-Link Flexible Robot Based on a Lumped Model," Robotica, Vol. 17, pp. 71-78, 1999. 191 Appendix A Dynamic Models This appendix presents the dynamic models for the flexible-link robotic manipulators which have been studied in the course of the research presented in this thesis. A.l Single-link Flexible Manipulator Model A.l.l Nonlinear Model The rigid body equation for the link: Jo A ^ 0 + p zX-CW/o m (A.1) ; "m,\ AZ +20, 7=1 (*i Vl ) \J S w E hj ( i ftj x 7=1 + b 0 =r, e 7=1 x 7=1 The deflection equation for they'th mode of the link: 192 Vi r Z + 4=1 J I' pAj • (*i M* to (A.2) " ' T r'i m1 A (A M* (A) A ' (A M*' (A) +y + m I' M ,to,M* to + A "Z +0) 2 {J (A M* (A) m *.,(0 + M m, + m <t> (/, f + J frj' (/, ) 2 p Xj p ; = 0 A.1.2 Continuous-time State-space Model The continuous-time state-space model of the system with first flexible modes is: x = Ax + Bu y = Cx (A.3) The numerical values of the elements of the system matrix A are: ,4(1,1) = 0, ,4(1,2) = 0, ,4(2,1) = 0, ,4(2,2) = 0, ,4(3,1) = 0, ,4(3,2) = ,4(1,3) = 1, ,4(1,4) = 0 ,4(2,3) = 0, ,4(2,4) = 1 212.32m „ + 23.708 + 313.804./.. 0.769 +17.669J + 8.0m + 0.959J m p ,4(3,3) = p -0.081-0.839m -1.833./ 0.769 +17.669J + 8.0m, + 0.959J m p p p p ^4(3 4 ) p p p 0.205m +0.023 +0.303J p = I 0.769 + 17.669J, + 8.0m, + 0.959J m p ,4(4,1) = 0, ,4(4,2) = p -210.861-103.643J -103.643m 0.769 +17.669J + 8.0m, + 0.959J m p ,4(4,3) = p p 0.41m +0.046 + 0.606/ " 0.769 + 17.669./, + 8.0m, + 0.959J m p A(4,4) = n -0.203 -0AJp-0. p Imp 0.769 + 17.669J, + 8.0m, + 0.959J,m, The numerical values of the system matrices B and C are: 193 0 0 B= 0.404 + 4.197m +9.167J n p C= p 0.769 + 17.669/ + 8.0m,, + 0.959J m p p -2.049m -0.229 -3.028J p p D 1 0 0 0 0 2.049 0 0 0 0 0 0 0 0 0 0 p 0.769+ 17.669J +8.0m + 0.959J m n p p P For the nominal payload (m = 0.38kg ,J p P = O.OOlkg.m ), the numerical values of the system 2 p matrices A , B and C are: A= "0 0 1 0 0 0 0 0 1 0 27.350 -0.105 0.026 0 -65.394 0.0528 -0.063 B= 0 0.524 -0.264 C= "1 0 0 0 0 2.049 0 0 0 0 0 0 0 0 0 0 A. 1.3 Discrete-time State-space Model The discrete-time state-space model of the system with just the first flexible mode and the nominal payload is: x(k +1) = Ax(k) + Bu(k) (A.4) y(k) = Cx(*) The numerical values of the system matrices A , B and C are: 1 0.001366 A= C= 0.009995 5.873e-006 0 0.9967 2.636e-006 0.009986 0 0.273 0.999 0.001629 0 -0.653 0.0005268 0.9961 1 0 0 0" 0 2.049 0 0 0 0 0 0 0 0 0 0 2.62e-005 B -1.318e-005 0.005239 -0.002634 194 A.2 Two-link Flexible Manipulator Model Rigid body equation for link 1: 'T +J +J +J +J hx h2 oi o2 p [/, + wf (/,, r)] +m/ +(m +m +m ) 2 2 h2 2 p + (m + 2m ) l [w, (/,, 0 sin (a, + 6 ) + /, cos (a, + 6 )] 2 p 2 2 2 2 [/, sin (a, + 6 ) - w, (/,, 0 cos (a, + 6 )] £ [ / 2 I r'i + 2 I , + /w ^ . (/ )] £ (0 p I "'"' 2 (0 i 1 ' A iZ ^; (*i 4 2 dx 2 6>, 2 j dx. f A Z &y (*2 )<?,- (0 + y 2 Z^(' )^(o 2 i=l - m 1 / + m 2 p [ W j ( / j , /) sin 2 (a, + 6 * 2 ) + / , cos (or, ''m,2 - [/, sin (a + 6 ) - w (/,, 0 cos (or, + 9 )] £ [ ^ 2 , + x + I 2 0 2 x 2 A^Z^(^)^2;(0 /, (w +/w 2 A2 2 p +/n ,) + ^ 7 w + / w j / c o s ( a , + # ) / p 2 2 2 "„,2 7=1 7=1 - sin (a + 6>) X [ 4 2 , + Aj (h)] ^ 2 , (0 x m 7 2 P + —w + m ) / [w, (/,, t) sin (or, + # ) + /, cos (a + 0 )] 2 p 2 2 /, sin (or, +& ) +4 -w, (/,, 0 cos (a, + 6*) 2 + ) P2 0 Z x 2 "m,2 2 ^2jMS (t) 2J 2 Z ^ ( W ) <ix + m 2 C )] <?y (0 7=1 7=1 7=1 dx + m p 2 f»„2 V Y.<f> (h)s (t) 2j V7=l 2j + 6> )] 2 7=1 L V2 [w, (/,, 0 sin (a + 0 ) + l cos (a, + 0 )] x 2 x [/ , + m <f) (l )] £ 42 2 p 2} (0 2y 2 7=1 (m + 2m ) l w ' (/,, 0 [/, 2 p 2 sin (a, + 6 ) x - (m + 2m ) w, (/,, t)\l sin (a, 2 p 2 x +0) +l 2 x t) cos (or, ( / j , + 6 ) + 2w 2 w/ (/,, 0 [w, (/,, t) sin (or, -w (/,, 0 cos (a, + 6*) +2 - 2 + 0 )] 2 (/,, r)] + 2 (w - m ) w, (/,, t)w (/,, 0 p h2 x cos (a, + <9 )] 2 2 x "m,2 sin (a, + 0 ) - w, (/,, 0 cos (a, + 0 )] £ [/42y + ™ A &)] 4, (0 +2 [/, 2 2 7=1 ^.(x.yi.o) dx -2 [\^ (x )d (t) V 7=1 Px Xj 7 x Xj J V 7=1 \ f "m.l ( "m.l - P2 U £ ^ 7 ^ A ( 0 Z^(*2)4y(0 2 V7=l V7= fn. -2m „ £^.(/ )j (0 2 £^(/ )(J /o 2; 2 2 V7= (m + 2w ) / w,' (/,, r) [/, sin (a +0 )-w 2 2 p x +2 [/, sin (a, +0 )-w 1 l 2 (/,, t) cos (a, + 6 )] x 2 (/,, 0 cos (a, + 0 )] £ [l 2 i2j + m (/) (l )] S (t) p 2j +2w '(/„0[w (/ ,0sin(a + 0 ) + /, cos (a, + 0 )] £ [ / 1 1 1 2 1 2 2 42y 2j + m^ (/ )]^(0 >0, 2y 2 7=1 ; f - 2 "m.l Z^ A ( * 2 V7=l -2m. A (0 f"m.l Z ( * 2 )4i (0 A» v>i f(/n + 2m ) / [/[ sin (a 2 \ p 2 x + 92) - w, (/,, 0 cos (a, + f?)] 2 96 X +2 [w, (/,, 0 sin (a, + 0 2 ) + /, cos (a, + 6 )] 2 [/ 42y 2 + m^ (/ )] £ (0 2j 2 2y — m + m 11 [/, sin(a +& )~ \(h>0 ( i w 2 p 2 x cos a + 2 @2)] ft 2 + [ w, (/,, 0 sin (a, + # ) + /, cos (a, + 6> )] £ [/ , + m ^ 2 2 42 2y (/ )] £ (r) 2 2y »»,2 (/,, 0 cos (a, + 0 )] £ [h 2 [/, sin (a, + 0 )-w 2 -w,'(/„0 2 l 2 o 2 2 + m Aj (h)] ^27 (0 p £^(* )4y(0 dx-, -2p { ^^ ,(x )^.(0 || y v 7=1 2 2J 2 'HI,2 -2m, Y.^MiAiji.t) zl^jMS^ii) y v 7=1 \ 7=1 /, sin (a, + 6* ) 2 - m + /w -w, (/,, t) cos (a, + 6> ) 2 2 w,'(/,,0 (A.5) + eA = *i b w (/,, t) sin (aj + # ) x + "m,2 2 +/, cos (a, + # ) 2 yZJ 'h 2j _+m 0 (l )_ p 2j 2 _ 7=1 Rigid body equation for link 2: -m 1/ +m 2 p 2 [ w, (/,, 0 sin (or, + # ) + /, cos (or, + <9 )] 2 2 "m,l - [/, sin (a, + 0 ) - w, (/,, 0 cos (a, + 0 )] 2 [/ 2 42y + m (/> (l )] tf (0 p 2j 2 2y 9 7=1 dx + m tpJ^zj^ys {t) + 2 2J p V7= n2+J 2+J +™f J 0 + J p 2 0, ("m,2 + J0V2 Ji4iM )S (t) dx + m 2 2 2J p V7'=l 197 -m +m jl cos(a +9 ) 1 + p 2 l 2 "m.l - sin (a, + 0 ) Z (l 2 + m <p (l )) 8 (t) A2J p 2i 2 7=1 2j J 2+Jo2+J + 2 m l h p P A n„,2 ; (" ] P2 ZfajMSiyiO + m 2 r 2 + <ix + m 2 2 0 Z 7 7=1 A / C W / O 7=1 2 J 2 (w + 2m ) / W j (/,, t) sin ( « j p Z V7=l 127 + phj' (h ) + W „ / ^ (h ) 2 2 X^,(/ )^(o p \ 7=1 + ^ 2 + <U0 0) 2 " ,2 m +2w, (/,, 0 cos (a x + 6) [/ 2,- + ™A £ 2 4 (h)] ^ (0 7=1 +4 + 2 dx. A f f .7=1 Z ^ (*2 )*2, ( ' ) y] Vf 7Z= i <f>2J (*2 )$2j (0 +2m Z ^ ('2)^y(0 V7 X M W y O A — >77 + m 1 / [/, sin (a, 2 p 6>, 7=1 + f9 ) - w (/,, 0 cos (a, 2 2 l + #)] 2 fl 2 + [ w, (/,, 0 sin (a, + 6 ) + /, cos (a, + <9)] Z 2 2 [h 2j ('2)] ij (0 + 5 7=1 ; 2 A +2m f A/' "m,2 "i».2 Z Ay (*2 )A, (0 )4y (0 |ZAy(4)4y(0 ZAy(Wy(0 V7'=l Z Ay (*2 A (A.6) w, (Lt) + 0 2 + b e =r e 2 2 7=1 198 Deflection equation forjth mode of link 1: ( 1 h ( 2 m + h 2 m + m P ) + \ - m ^ 2 + / C0S(«, p m 2 +(9 ) 2 "w,2 - sin (a, + 0 ) [l 2 + m <f> (l )] S (t) 42k p 2k 2 2k k=\ J h 2 + o 2 + J J + m P p — m + m \l 2 p 2 l [w,(/,,O i ( i s z n a & ) h cos (a, + # )] + + 2 2 /, sin (a, + f? ) 2 T,[ m P^ (h)]^2 ( ) I -w, (/,, 0 cos (a, + # ) +m t k k 2 + J V 0 dc + w Z^t(x )S (t) 2 2 +m 2 2k p l cos (a, + # ) p 2 + 2 <t>u(h)0 2 "m.l sm(a +0 )Y [l k=\ +m <f> (l )]S (t) l J o 2 + J + 2 h 2 + m p p + m l P 2k 2 2k 2 fn.. fn. + \^ + J J Jx P2\Y t>2k( 2)S (t) ( X J 2 2k + AW^ 4=1 r'i [(w 2 +« A 2 ~2 m + p j^2 m C 0 S ( i a •'m.l ^ ) + *=1 -sm(a +0 )^[l +m <f> (l )~\S (t) k=\ l \ — m +m 2 + 2 42k p 2k 2 2k \ l cos[a +0 ) p -sin (a, + 0 2 2 ) £ [ / x 4 2 * 2 + (Uj^tCO k=l + t dx. P2^ZAk( 2) 2k(0 X S "m,2 + cos (a, + 0 )faj(/, ) Z [/ * + pA* (^)] 4 (0 m 42 2 4=1 Vir +^/(A)Z 4=1 + MphAkih) Jnk+JpAk'i^ L J J'fa."(x, ) Z + {EI\ 4(0 - 1 . . (x,)8 (t)dx xk x 4=1 (m + 2 m , ) l sin ( « , + 9 ) w,' (/,, <*) 2 2 2 "™.2 +2 sin ( a , + <9 ) £ [l 2 + m </> (l )] <5 ( 0 42k p 2k 2 2i 4=1 " ,2 m +2 COS (a, + 0 2 ) W , ' ( / , , 0Z 7 m 4=1 |^m 2 + 2 m , ) / sin (or, + # ) ^ (h 2 (0 [ 4 2 i + p<t>2k ( 2 ) ] <^24 2 l >0 "m,2 +2 cos ( a , +0 )w (l ,t)Y [l 2 , + 2 l l J ("m,2 Z A* (*2 ) ^ 2 4 f A + p02k( 2)~\d k( ) m m t l 2 \ f (0 »m,2 Z A* ( 2 X )4u (0 dx. +z™ [ Z A* ('2 )^ col fz At (/ )4 (0^ P 2 200 (/w + 2m ) / sin (a, + 0 ) vv,' (/,, 2 2 p 2 "».,2 +2 sin (a, + 6 ) £ [ l 2 + m (j) (/ )] 8 m p 2 2k (t) 2k rty (A) k=\ "m,2 +2 cos + 0) (a, w,' 2 (/,, r)Z , f <?2* [ 4 2 * + p r t i C )] 7 w 2 k=l "m.l ^f ft (0 dx n "m.2 ^ 2 Zrt* (* £A Zrt* o )4i (0 (0 2 (A) 2 f Zrt*& )* * (ol f Zrt* (/ )4 (0 +2™, 2 2 (w + 2w ) / sin (a, + p 2 2 0) 2 "m,2 +2 cos (a, +^ )£[/ 2 42i +ro rt*( p / 2 )]< 2*(0 5 *=i Jf A r t y (*i )Z rt* (*i )3* W^i k=l ( 1 ^ rty Ci) (TM + W +/n,)w,(/,0 + ^-/w +w J/sin(o; + #) A2 2 / 1 + cos (a, + 0 ) 2 1 fl 2 2 [y~ + m <t> (/)] J (0 42t 2 1 p 2 p 2k 2 k=l 2i rt/C.) "/n,2 +—[ w 0 sin (a, + /,+co0 s2)(a,- w, + (/,, 0 )] t) £cos[/(a, ++ m <j> (l )] £ m, (/,,+ m /2 [/,+ si&n_) (a, 0 )] 2 • W7- p 42i 2 2p 2k 2 2A (0 + m / sin (a, + 6>) p 2 2 rty(W 2 "m.l + cos(a, +^)Z[ 42* / +OT A( )]^(0 / 2 2 *=i — m +m 2 p 11 sin (a, + #) 2 2 rty (/,) "m,2 + cos(a, +^ )Z[ 42i / 2 -i2 + prti( )]^(0 w / 2 *=1 201 "m,2 2 sin (a, + 6>) ^ (/, [I 2 + m <f> (l )] 5 m p 2k 2 (t) 2k k=\ , S ^ (*2 )4 (0 ("m,2 \ ("m,2 £ 02* (*2 )^2* (0 f A 2 ^£^(4)^(oYl^(/2)4(o +2m 4=1 W/C^O + ^ dx. A =0 (A.7) A J \ k=l Deflection equation for yfh mode of link 2: rw (/,,0sin(a + 6 ) 1 + J <f>2j (h) + m l faj (/ ) + p p 2 2 1 2 [/ 4 2 ; +OT^ .(/ )] 2 ; ft 2 +/, cos (a, + <9) 2 ^ + 7 +J <t>2j'( 2) l + p 12y + Aj' J m ih ) + P M 2 j ( M 2 j m 2 ) l + C 0 S ( « , +(9 )[/ 2 6 (2 42> +^ (/ )]£^ (/ >5i (0 > 2 2 + t 1 t *=1 Zt=l ^ ^ ^ 1 * W In A ^ 2 y ( 2 ) ) l 2 X £ ^2* (*2 )^2* W ^ 2 *=1 m,2 ) £ e )4 ( 0 + V 2 )Z c )4 (0 n i.h +™ 02j P + ( ^ ) 2 (*2 2 2 ( * 2 ) ^ 2 t (OdX; )E *=1 ft )Z L A ^ 2 i (*2 ~ [_hlj + m ^2* Z £ A ^ 2 > (*2 42y 2* S i (0^2 + ™ A ' ( 2 >Z ^k <5> ( 2 )^2* Z Z k=l 0, )Z ^ ( * 2 ) ^ 2 t ( ^ 2 2* ( 0 ^ 2 ~ + A ' (4 >X ^ k W 2j (h >S ^ 4 (*2 )^24 4=1 2 2 f>2 ( 2 ) 2k l 5 (0 4=1 (0 + m </> (l )] [/, sin (a, + 0 ) - w, (/,, 0 cos (a, + 0 )] p (0 ( « 1 + #2 ) n 4=1 2 | + [/ J 0 2 j ( 2 ) ] W] (A » 0 P # z ; ( * 2 )X ^24 ( * 2 ) 4=1 "f (*2 ) l P (l > 0 + ™l 4=1 2 e J "' m 2 r p^ 2 y (x ) 2 <p (*2 ^ 2k "m,2 co* + b S =0 2j 2j (A.8) +W^ (/ )Xi^2t ( ^ ) ^ 2 * ( 0 2y 2 2 k=\ 202 Appendix B Assembling of the Prototype FLMS B.l Mechanical Assembling of the F L M S A sketch of the final CAD model of the prototype flexible link manipulator system (FLMS) developed in our laboratory is shown in Figure B . l . The assembly drawings of joint 1 and joint 2 of FLMS are shown in Figure B.2 and Figure B.3, respectively. Figure B . l Overall CAD model of the FLMS prototype. 203 Figure B.2 Assembly drawing of joint module 1. Figure B.3 Assembly drawing of joint module 2. 204 B.2 Electrical Wiring of the F L M S T h e p o w e r cables a n d s i g n a l w i r e s o f the F L M S are c o n n e c t e d a c c o r d i n g to the d i a g r a m g i v e n i n F i g u r e B.4. CB50-LP 50-Pin Screw Terminal Block (Connect to PZ) Analog Grid Analog Out c Ultrasonic Proximity Sensor PowerGnd Graphic User Interface Software Package .12VDC STGII-8 Windows NT Driver APD-12VDC Power Adaptor ACPowerGnrJ A C input I2QVAC To AC Power Bar + Excitation 1:+12VDC TMO-1 Signal Conditioner 2; Power Grid 3: Analog Gnd 4; Analog Out -Signal Shielded Signal Cable 'Signal -Excitation L1605 (25LB) Load Cell •Shield 2 4 6 e 10 9-Pin Connector 14 Pentiumlll 733MHz O 16 • ODD ••S°iQ 50-Pin Ribbon Cable STGII-8 Motion Control Interface Card (Connect lo ISA slot of the PC motherboard) CB50-LP 50-Pin Screw Terminal Block (Connect to P3) ~20~ 22 24 Mulrt-core signal cable 26 28 30 32 34 36 38 40 1 25A8 PWM Amplifier 42 •Motor 2 50 P1 12A8 PWM Amplifier P2 • Raf In 4 -Ret In 5 -Motor 1 •-Motor 2 Power Gnd 3 J i ^ Power Gnd 4 High Voltage 5 PS16L72 DC Power Supply M M • 2 Power Gnd 3 Power Gnd 4 High Voltage 5 le" 48 " -Ref In 5 M Harmonic Drive Gearing Motor RHS-253018E050DO Built-in Optical Encoder Harmonic Drive Gearing Motor RHS-203012E050DO Built-in Optical Encoder Hign Voltage +72VDC DC Power Gnd AC Power Gnd AC Input 120VAC To AC Power Bar F i g u r e B.4 E l e c t r i c a l w i r i n g d i a g r a m o f the prototype m a n i p u l a t o r system. 205 Appendix C Installation Guide for Motion Control Interface Card Hardware C.l Jumper and Connector Locations Connector P2: Channels of Analog Input, 8 Bits of User I/O, and 8 Motor Direction Bits. Connector PI: 24 Bits of Digital I/O Jumper J5: Jumper J4: Watchdog Timer Enable Watchdog Time-out Jumper J3: Jumper J7: DAC Latch on Interrupt Timer 2 Input Jumper J2: Analog Input Range (Insert a jumper: +-5v Encoder Input and jumper: +-1 Ov) Analog Output for Axis 0-3 Jumper Jl: Connector P3: n Connector P4: Base Address Selection o Connector P5: Battery Backup Input Encoder Input and Analog Output for Axis 4-7 206 C.2 Connections 8 Channel Encoder Input and Analog Output Connectors Connector P4, Motion I/O Axis 4-7 Connector P3, Motion I/O Axis 0-3 Pin Name Pin Name Pin Name Pin Name 1 Analog Gnd 2 DAC0 1 Analog Gnd 2 DAC 4 3 Analog Gnd 4 Analog Gnd 3 Analog Gnd 4 Analog Gnd 5 DAC 2 6 Analog Gnd 5 DAC 6 6 Analog Gnd 7 Analog Gnd 8 DAC 1 7 Analog Gnd 8 DAC 5 9 Analog Gnd 10 Analog Gnd 9 Analog Gnd 10 Analog Gnd 11 DAC 3 12 Analog Gnd 11 DAC 7 12 Analog Gnd 13 Gnd 14 A0 + 13 Gnd 14 A4 + 15 A0- 16 Gnd 15 A4- 16 Gnd 17 B0 + 18 B0- 17 B4 + 18 B4- 19 Gnd 20 10 + 19 Gnd 20 14 + 21 10- 22 Gnd 21 14- 22 Gnd 23 A 1 + 24 A 1 - 23 A5 + 24 A5- 25 Gnd 26 B 1 + 25 Gnd 26 B 5+ 27 B 1 - 28 Gnd 27 B 5 - 28 Gnd 29 I1+ 30 I1- 29 15 + 30 15 - 31 Gnd 32 A2 + 31 Gnd 32 A6 + 33 A2- 34 Gnd 33 A6- 34 Gnd 35 B2 + 36 B2- 35 B6 + 36 B6- 37 Gnd 38 12 + 37 Gnd 38 16 + 39 12- 40 Gnd 39 16- 40 Gnd 41 A3 + 42 A 3- 41 A7 + 42 A 7- 43 Gnd 44 B3 + 43 Gnd 44 B 7+ 45 B 3- 46 Gnd 45 B7- 46 Gnd 47 13 + 48 13 - 47 17 + 48 17- 49 +5 50 +5 49 +5 50 +5 207 32 Bit Digital I/O, 8 Channel Analog Input and Sign Bit Output Connectors Connector P2, Analog & Digital I/O Connector PI Dig ital I/O Pin Name Pin Name Pin Name Pin Name 1 Opto-23, C7 2 Gnd 1 ADC Chan 0 2 Analog Gnd 3 Opto-22, C6 4 Gnd 3 ADC Chan 1 4 Analog Gnd 5 Opto-21, C5 6 Gnd 5 ADC Chan 2 6 Analog Gnd 7 Opto-20, C4 8 Gnd 7 ADC Chan 3 8 Analog Gnd 9 Opto-19, C3 10 Gnd 9 ADC Chan 4 10 Analog Gnd 11 Opto-18, C2 12 Gnd 11 ADC Chan 5 12 Analog Gnd 13 Opto-17, CI 14 Gnd 13 ADC Chan 6 14 Analog Gnd 15 Opto-16, CO 16 Gnd 15 ADC Chan 7 16 Analog Gnd 17 Opto-15, B7 18 Gnd 17 Opto-15, D7 18 Gnd 19 Opto-14, B6 20 Gnd 19 Opto-14, D6 20 Gnd 21 Opto-13, B5 22 Gnd 21 Opto-13, D5 22 Gnd 23 Opto-12, B4 24 Gnd 23 Opto-12, D4 24 Gnd 25 Opto-ll,B3 26 Gnd 25 Opto-11,D3 26 Gnd 27 Opto-10, B2 28 Gnd 27 Opto-10, D2 28 Gnd 29 Opto-9, B l 30 Gnd 29 Opto-9, DI 30 Gnd 31 Opto-8, BO 32 Gnd 31 Opto-8, DO 32 Gnd 33 Opto-7, A7 34 Gnd 33 IN2 34 Gnd 35 Opto-6, A6 36 Gnd 35 INI 36 Gnd 37 Opto-5, A5 38 Gnd 37 IN0 38 Gnd 39 Opto-4, A4 40 Gnd 39 EXLATCH 40 Gnd 41 Opto-3 A3 42 Gnd 41 T2GATE 42 Gnd 43 Opto-2, A2 44 Gnd 43 TA2 44 Gnd 45 Opto-1, A l 46 Gnd 45 /WATCHDOG 46 Gnd 47 Opto-0, AO 48 Gnd 47 NC 48 Gnd 49 +5V 50 Gnd 49 +5V 50 Gnd Connector PI can be directly connected to a 24 channel I/O card, such as made by OPTO-22, and other companies. 208
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Intelligent model predictive control of flexible link...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Intelligent model predictive control of flexible link robotic manipulators Fan, Tao 2007
pdf
Page Metadata
Item Metadata
Title | Intelligent model predictive control of flexible link robotic manipulators |
Creator |
Fan, Tao |
Publisher | University of British Columbia |
Date Issued | 2007 |
Description | This thesis develops and evaluates an intelligent model predictive control (IMPC) strategy for motion control of a flexible link robotic manipulator through analysis, computer simulation, and physical experimentation. The developed IMPC is based on a two-level hierarchical control architecture. This control structure is used to combine the advantages of the conventional model predictive control (MPC) with those of knowledge-based soft control techniques. The upper level of the structure is a fuzzy-rule based intelligent decision-making system. The lower level consists of two modules: a real-time system identification module (which adjusts the model parameters and accommodates payload changes of the manipulator), and a model predictive control (MPC) module (which develops control inputs based on the linear model generated by the system identification module). The upper-level intelligent fuzzy rule-based tuner interacts with the lower level modules. Based on the desired system performance, the state feedback signals, and the knowledge base, the upper-level fuzzy tuner automatically adjusts the tuning parameters of the MPC controller. It is also able to adjust the model structure of the system-identification module, if necessary, to accommodate large model errors, and will increase the robustness of the controller. An explicit, complete, and accurate nonlinear dynamic model of the system is developed using the assumed mode method. More realistic boundary conditions, which represent the balance of moments and shear forces separately, at the ends of each link, are used for the dynamic model development of the system. A computationally efficient multi-stage MPC algorithm with guaranteed stability is developed as well. This algorithm is used by the MPC module to enable real-time implementation of the overall scheme. A fuzzy knowledge base for tuning the MPC controller is developed based on analysis, computer simulations and experimental testing of the prototype flexible-link manipulator system (FLMS). A fuzzy tuner is designed based on this fuzzy knowledge base. The performance of the developed IMPC scheme is evaluated using computer simulations and experiments of the prototype FLMS. The results show that IMPC can more effectively control the motion of a flexible link robot manipulator when compared with conventional MPC. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2011-02-15 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0080738 |
URI | http://hdl.handle.net/2429/31300 |
Degree |
Doctor of Philosophy - PhD |
Program |
Mechanical Engineering |
Affiliation |
Applied Science, Faculty of Mechanical Engineering, Department of |
Degree Grantor | University of British Columbia |
Campus |
UBCV |
Scholarly Level | Graduate |
Aggregated Source Repository | DSpace |
Download
- Media
- 831-ubc_2007-317686.pdf [ 11.23MB ]
- Metadata
- JSON: 831-1.0080738.json
- JSON-LD: 831-1.0080738-ld.json
- RDF/XML (Pretty): 831-1.0080738-rdf.xml
- RDF/JSON: 831-1.0080738-rdf.json
- Turtle: 831-1.0080738-turtle.txt
- N-Triples: 831-1.0080738-rdf-ntriples.txt
- Original Record: 831-1.0080738-source.json
- Full Text
- 831-1.0080738-fulltext.txt
- Citation
- 831-1.0080738.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0080738/manifest