Applied Science, Faculty of
Mechanical Engineering, Department of
DSpace
UBCV
Fan, Tao
2011-02-15T17:52:41Z
2007
Doctor of Philosophy - PhD
University of British Columbia
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.
https://circle.library.ubc.ca/rest/handle/2429/31300?expand=metadata
INTELLIGENT M O D E L PREDICTIVE C O N T R O L OF F L E X I B L E L I N K ROBOTIC M A N I P U L A T O R S 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 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 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 MPC. 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 10 1.4 Organization of the Thesis 14 Chapter 2 Manipulator Model 16 2.1 Kinematics 17 2.2 Flexible Link Model 21 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 2.3 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 2.4 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.4.1 Effects of the Tuning Parameters 91 3.4.2 Fuzzy Inference System 96 3.4.3 Overall Scheme of the Fuzzy Tuner 104 3.5 Summary 108 Chapter 4 Control of a Single-link Flexible Manipulator 109 4.1 Dynamic Model 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 Experiments with Flexible-link Manipulator 155 6.1 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 FLMS 203 B. 2 Electrical Wiring of the FLMS 205 Appendix C Installation Guide for Motion Control Interface Card Hardware 206 C. l Jumper and Connector Locations 206 C.2 Connections 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 MPC 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 MPC controller for the single-link manipulator 134 5.1 Predetermined parameters for the MPC 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 PWM amplifiers 160 6.4 Specifications of the DC 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 MPC controller 171 vi 6.10 MPC 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 34 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 MPC 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 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 I l l 4.2 Case 1: Link tip deflection responses of 1-mode model and 2-mode models with an initial tip deflection of 51.2mm . 112 4.3 Case 2: Joint angle responses of 1-mode model and 2-mode models under a bang-bang control input (6X (0) = 0, wtip (0) = 0) 112 4.4 Case 2: Link tip deflection responses of 1-mode model and 2-mode models under a bang-bang control input ( 6X (0) = 0, wtjp (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 4.7 Case 1: Link tip deflection responses of the linear and nonlinear models with an initial tip deflection of 51.2mm 116 4.8 Case 2: Joint angle responses of the linear and nonlinear models under a bang-bang control input ( 9X (0) = 0, wtjp (0) = 0) 117 4.9 Case 2: Link tip deflection responses of the linear and nonlinear models under a bang-bang control input (6>, (0) = 0, wft> (0) = 0) . . . 117 4.10 Case 1: Joint angle responses of the linear model for different payloads with an initial tip deflection of 51.2mm 119 4.11 Case 1: Link tip deflection responses of the linear model for different payloads with an initial tip deflection of 51.2mm 119 4.12 Case 2: Joint angle responses of the linear model for different payloads under a bang-bang control input (6X (0) = 0, wtip (0) = 0) 120 4.13 Case 2: Link tip deflection responses of the linear model for different payloads under a bang-bang control input (6>, (0) = 0, wtip (0) = 0) 120 4.14 Simulation block diagram 123 4.15 Case 1: Joint angle responses for the constrained and unconstrained MPC 124 4.16 Case 1: Link tip deflection responses for the constrained and unconstrained MPC 124 ix 4.17 Case 1: Control inputs for the constrained and unconstrained MPC 125 4.18 Case 2: Control inputs for the constrained and unconstrained MPC with the same parameters 125 4.19 Case 2: Control inputs for the constrained and unconstrained MPC with different parameters 126 4.20 Case 2: Joint angle responses for the constrained and unconstrained MPC with different parameters 126 4.21 Case 2: Link tip deflection responses for the constrained and unconstrained MPC with different parameters 127 4.22 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 4.25 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 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 2~ | J C | Euclidean norm of vector xeSR" (equivalent to ||x|2 or Jxx H — + x„ ) ,4, 5 , C, D state-space representation of a system 3w,(x(,r)| or,. angle of rotation of link i due to bending; ai = = w(. (/,.,0 3x; 6 equivalent viscous damping coefficient B diagonal damping matrix c«,,,/ cos(a,._, (0 + 3(0) Ei 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 from frame FJ to frame F' h vector of Coriolis and centrifugal forces iENC encoder counts iADC A D C counts H prediction horizon X l l l H old prediction horizon before tuning Hp new prediction horizon after tuning H inj initial prediction horizon Hp end f"m al prediction horizon generated by fuzzy tuner Hp sen sensitivity parameter of prediction horizon Hu control horizon moment of inertia of the link i cross section about the Yi axis Inijk nth constant integral parameter of link i (J and k are mode shape function indices) JLi equivalent moment of inertia at the end of link / Joi mass moment of inertia of link i about joint i axis Jp payload inertia K stiffness matrix KMPC 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 L Lagrangian L = T-V J cost function mLi equivalent mass at the end of link i mi mass of link i mhi mass of hub i mp payload mass M(.(jc(.,r) bending moment at xi of link i (MO); contributions of the masses of payload and link/ + 1 , d u e to the mechanical offsets M positive-definite symmetric mass matrix 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 = {0X, • • •, 6n, ,, • • •, Slflm _, • • •, 8nX, • • •, 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 1 r,°(0 absolute position of r, in frame F ° R total energy dissipation function . R control penalty weighting matrix (input rate weighting matrix) Ru_old input rate weight before the tuning D u_new input rate weight after the tuning Ru_M initial input rate weight R-u_end final tuned initial input rate weight n u_sen sensitivity parameter of input rate weight r reference trajectory re joint angle setpoint rw link deflection constraint (maximum allowed link deflection) ru control input constraint (maximum allowed control input) V,/ sin(af_, (0 + 0,(0) T kinetic energy Ts sampling period v°(7) absolute velocity of r, in frame F° V^x^t) shear force at xi of link i V potential energy Ui elastic potential energy of link i u vector of inputs w„_. maximum control input oo wi (x;, t) transverse deflection of link / at abscissa x.; wt (x(. ,t) = ^ <py (x. )djj (t) 7=1 absolute maximum link deflection wtip link tip deflection j) predicted controlled output ytip link tip position fa- (xj) mode shape function (eigenfunction) of link i 6; joint angle of link / 0° absolute angular velocity of frame F' pi linear mass density (mass per unit length) of link i Au future control moves S(j (t) mode coordinates coi the natural frequency of vibration of link i Abbreviations A D C Analog-to-Digital Converter CARLMA Controlled Auto-Regressive and Integrated Moving Average D A C Digital-to-Analog Converter D M C 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 L Q G 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 P E M 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 end-point 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 non-collocated. 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 MPC 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 MPC scheme. Control expertise, past experience, and insight into the MPC 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 Work 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 MPC 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 MPC 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. MPC strategies were developed independently by industrial groups in France and the 7 United States in the late 1970's. The pioneers of MPC are mostly industrial practitioners who implemented MPC 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 proportional-integral-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 non-minimum 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 MPC, however, is how to tune the parameters of the controller. So far, only a few guidelines related to the tuning of the parameters of MPC 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 Yu (1994) presented practical on/off-line tuning rules for state-space MPC 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 MPC 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 wave-propagation 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 L Q G / / / 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 single-link 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. SMC 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, SMC 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 moment-feedback 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 two-level 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 input-output 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 of the equations of motion technique is developed. Non-minimum phase characteristic of the system are analyzed. Chapter 3 presents the I M P C algorithm, and its underlying strategy, and addresses issues related to the application of LMPC in the motion control of flexible link robot manipulators. Chapter 4 presents L M P C controller design for a single-link flexible manipulator. The performance of 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 ( F L M S ) . Experimental results are presented and discussed. Chapter 7 concludes this thesis with a summary of the major results and recommendations for future research in 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 xi is denoted by w.(x;,r). (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 FJ to frame F' is denoted by H ; .. Specifically, the homogeneous transformation between frames F 1 and F° is H 0 l,(0 = 0 0 0 0 0 0 1 0 0 1 (2.1) where 5, = sin 9X (t) and c, = cos 6X (t). The rigid-body components of rotation and translation between frames F' and F ' _ 1 are given by the homogeneous transformation between frame F' and frame F ' " 1 : H , w ( 0 = C, S, 0 0 0 0 0 0 0 0 1 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'~x is the homogeneous transformation between frame F' and frame F : 1-1 0 0 1 0 0 0 0 1 (2.3) where /._, is the length of link i-l, sai t =sinai_l(t), c a _ =cosa._,(£), and 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 H f , ( 0 = H M j . 1 ( 0 H ; . w ( 0 c 0 0 0 0 1-1 0 w M ( / M , 0 1 0 0 1 (2.5) where ^ _. = sin(a,._,(0 + 0t{t)) and c a , . = cos(a,._,(0 + 0,(0) • 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 , (0 = H 0 i l (0H l i 2 (0 - H I . _ 2 , _ I (0H i _ 1 , (0 (2.6) The 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, wt{xt,t) 0 i f The absolute position of r, in frame F° is r°(0 = H 0 , (0r / (0 The absolute velocity of this point in frame F ° is given by (2.7) (2.8) v ( 0 = " dt (2.9) The absolute angular velocity of frame F' is 4 ° + « , _ , ) (2.10) The position vector r°(t), 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/7' one has r{(t) = [x} wx(xx,t) 0 i f The absolute position of r, in frame F° is r°(t) = H0X(t)rl\t) = [cxxx-sxwx(xx,t), ^x, + cxwx(xx,t), 0 i f The absolute velocity of this point in frame F° is * i ( 0 dt -[xxsx + cxwx (x,, t)]0x - wx (x,, t)s] [xxcx -s^fx^t)]^ +wx(xx,t)cx 0 0 For a point r2 on link 2 in frame F2 one has l(t) = [x2 w2(x2,t) 0 i f The absolute position of r2 in frame F° is r 2 °(0 = H 0 > 2r 2 2(0 = Ho/OH^COr'W 7,0, -wl(l],t)sx+x2clai2-w2(x2,t)sXai2 /,5, + W,(/,,0C, + X2SXa>t2 + W2(x2,t)clai2 0 1 (2.11) (2.12) (2.13) (2.14) (2.15) The absolute velocity of this point in frame F° is 20 -(7,5, + w, (/, Oc, )6\ - vv, (/, t)st - x2s,>Bi 2 (4 + a, + 02) -w2(jc2,Ocliai>2(0, +d, ^2(^2.0^,2 (Ac, - w,(/,,0*,)0, + w,(/,,t)c{+ x2chai 2 ( 4 + a, + 02) -w2(x2,os,,«i>2(4 +«,+4)+w 2(x2,ocla]2 0 (2.16) 0 2.2 Flexible L ink 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 dxi at position x. is shown on the right-hand side of Figure 2.2. The displacement of the segment from the Xi axis is MA(X(,0 • Also Vi(xi,t') is the shear force and M.(x(,0 is the bending moment. Link 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 n d law) in the Yj direction is 21 V,(x„t)- J7(x„0 + dV,(x„t) OX; pi{.xi)dxi d2w,(x„t) dt1 (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, ox, -M, (x , ,0- Vl(x„t) + 5F(x,.,0, 3X; dx, dx,.=0 (2.18) Ignore the second order term with dxi in equation (2.18), we have V,(x„t) = dM,(x,,Q dx. (2,19) 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 , ) dx,2 (2.20) where Et{xt) is Young's modulus and 7,(x() is the 2 n d 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 dx; d 2 w , - ( s f > Q 5x,2 + A(x,) dt2 = 0 (2.21) By assuming /?(-(x.) and the flexural rigidity EJfa) to be constant along the length of the link, we obtain the Bernoulli-Euler equation for a uniform beam E;I; 54w,(x„0 , n d2wt(x„t) dx,' dt2 = 0 (2.22) 2.2.2 Boundary Condit ions 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, ^ w,(*"^ = fj ' ' dx2 Shear force: EJ, d ' w ^ X ' ^ = Q a 3 i dx3 (2.23) 2. Simply supported (pinned) end: Deflection: w (.(x.,£) = 0 d2w(x,t) (2-24) Bending moment: EJ, '—-1— = 0 ' ' dx2 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 xt = 0 end and is free of dynamic constraints at the x. = /, end. This assumption is made 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 xt = /. end of the flexible 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) oxi 23 Atx. =/,., Bending moment: d2w,(Xl,t)\ E , I t &/ Shear force: E J d\(x„t) ill ( dw,(x,,r) dx, V ' -(MO), d2wi(xi,t) dt; x,=l. dx,3 i n. = mLl^(wl(x,,t)\Xj__l) + (MO)l x,=l, dt d2 f 9w(.(x,.,0 \ dt2 dx. (2.27) where JLi and mLi 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. Joint i Link i+1 ... Link n and Payload U) mu^(wl(xi,t)\^y(MO)l + (MO\ 9w,(x(J/) 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 wi(xi,t) = 0i(xi)Si(t) (2.28) 24 Then the beam equation (2.22) can be rewritten as E,I, d4*,(x,)_ -1 d28,(f)=(o} ( 2 2 9 ) p,0,(x,) dx^ S,(t) 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,.) = Cu(cosh(/J,x,) + ^ sinh(/5,x,) + ^ cos(/?,x,) + ^ s in(/5,x,)) (2.31) 2 where Cx., C 2 . , C 3 . and C 4 . are constants, and /?." = ^ i < X > i . Also, as clear from equation EJ, (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 , , . , C2J = -C4J (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) + (MO)Mh)) (2-33) Pi <?>: ( / , )=—KM (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 , ) - (sinh(/?,/,) + sin(/i,./,)) - (cosh(/?,/,) - cos(/?,/,)) (2.34) A Pj sinh(#/,) + sin(/?,/,) - J-t£- (cosh(#/,) - cos(/?,/,)) - ( M 6 > ) ' 7 ? ' (sinh( £ / , ) - sin( )) A A sinh(/5,7,)-sin(/5,/,) + ^A(cosh( /5 , . / , ) -cosf j f f , / , ) )^ M 0 ^> (sinh(/7;/,) + sin(/i,/,)) (2.35) A A c o s h ( ) + cos(/J,/,) + ^ i t (sinh(/?,./,) - s i n ( ) ) + (cosh(£/ ( . ) - cos(/?,/,)) A Pi Substituting equation (2.34) into equation (2.35), we obtain the frequency equation l + cos(/5,./,)cosh(/i,./.) muPt (sin(#/,.) cosh(/J,/,.) - cos(/y,.) sinh(#/,.)) A - — (MO)i ft sin(/J,/,.) sinh(/3,/,.) (2.36) A _ ilM- ( s i n ( / ? /) cosh(/i;//) + c o s ( / ? /) sinh()) A + K A , - ( M O ) , 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 {5i} is related to one natural frequency^.. The natural frequencies are computed as au = P u 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 cosh^x,) - cos(/iyx,) + -^(sinh(/5yx,) - sin^x,)) (2.38) C 2,y cosh(/y,) + c o s ( / y , ) - ^ - j s i n h O J / ) + s i n ( / J . / , ) ) - ^ ^ ( C O s h ( / ? y / , ) -cos(/y,)) (2-39) Pi Pi SI inh(/y,) + sinC/?/) - (cosh(/y,) - cos(/y,.)) - ( M ? ) ' ^ (sinh(/5y/,) - sin(/y,•)) Let ^(x.) and 0,A(x,) be the mode shape functions corresponding to the natural frequencies a>y and co;k (j ^ A:). From equation (2.29), we have ^ / " ( * , ) = < v ^ ( * , ) A A (2.40) (2.41) From integration by parts, one has (2.42) Multiplying equation (2.40) by (*,.); equation (2.41) by ^y(x.), subtracting the resulting equations one from the other, and integrating from 0 to gives EJ, £ ,M,(*/) " ""(*,))& (2-43) A K 2 -<°*2) ( A A* j The right-hand side of equation (2.43) can be evaluated using equation (2.42) as 27 = , Y' 2^ fa (*/ H '"(*/) - to '"(* / ) + 'to M* " to ) - '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: Jf ^ ( x , ) 4 ( * > A + mMWM + (MO), {<Py(i,)<t>,k'(/,) + MMj'(',)) +^ , ( ' ,M* , ( ' , ) = o 0""*) The constant C, y normalizes the mode shape functions so that £<t>;(Xi)dx,=l, (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 wi(xi,t) = ^,j(x,)Sy(t) (2.47) 2.2.4 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 "m i n. (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 For the flexible link robotic manipulator, the number of modes nm, and the admissible functions ^(x,) determine the accuracy of the approximation. If we increase the number of modes nmi 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 nmi 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(xi) without increasing the complexity of the system model. From equations (2.36) through (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 V (2.49) 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 Jn , mass mLX at the end of the link 1, and the contributions of the masses of payload and link 2 due to the mechanical offset (M<9), are MLX =m2+mh2+mp (MO)l =(m2d2 + mpl2) cos(6>2) For link 2, the equivalent moment of inertia JL2, mass mL2 at the end of the link 2, and the contributions of the masses of payload due to the mechanical offset (MO)2 are MT1 = mn L2 p JL2=Jp (2.51) (MO)2 = 0 where m2 is the mass of link 2, mh2 is the mass of hub 2, mp is the payload mass, J 0 2 is mass moment of inertia of link 2 about joint 2 axis, Jh2 is the inertia of hub 2, Jp is the payload inertia, l2 is link length, d2 is the center of mass, and 92 is the joint angle of link 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)x given in equation (2.50). The maximum value of (MO), is (MO), m a x -m2d2 +mpl2, which occurs when 62=±n . The minimum value of (MO), is 71 (MO) l m i n =0, which occurs when 92 =±—. 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 Uniform density: p (kg/m) 0.8451 0.4035 Link length: / (m) 1 1 Center of mass: d (m) 0.5 0.5 Link mass: m (kg) 0.8451 0.4035 Nominal payload mass: mp (kg) 0.38 0.38 Maximum payload mass: m x (kg) 1 1 Link 1 hub mass: mhl (kg) 6.4 6.4 Link 2 hub mass: mh2 (kg) 4.2 4.2 Link moment of inertia: J0 (kg.m2) 0.2817 0.1345 Hub 1 moment of inertia: Jhl (kg.m2) 4.5 4.5 Hub 2 moment of inertia: Jh2 (kg.m2) 1.9 1.9 Nominal payload inertia: Jp (kg.m2) . 0.001 0.001 Maximum payload inertia: Jpnm (kg.m2) 0.0026 0.0026 Link flexural rigidity: EI (N.m2) 574.024 8.2238 32 Table 2.2 First four modes of link 1. Link 1 (rod) Mode (j) 1 2 3 4 Offset (kg.m) Payload (kg) hi CI amped-ffee 1.8751 4.6941 7.8548 10.9955 0 0 0.7065 1.3602 4.7697 7.8769 0 Nominal 0.6837 1.3221 4.7664 7.8750 Max Nominal 0.6585 1.3803 4.7709 7.8770 0 Max 0.6529 1.2719 4.7622 7.8725 fu (Hz) CI amped-free 14.5916 91.4438 256.0453 501.7467 0 0 2.0719 7.6786 94.4118 257.4884 0 Nominal 1.9397 7.2546 94.2847 257.3687 Max Nominal 1.7996 7.9078 94.4622 257.4955 0 Max 1.7691 6.7139 94.1190 257.2098 6 A ) (m) CI amped-free 2.0000 -2.000 2.0000 - 2.0000 0 0 2.1493 1.3660 -0.0736 0.0458 0 Nominal 2.1540 1.3898 -0.0682 0.0423 Max Nominal 2.1516 1.3769 -0.0737 0.0449 0 Max 2.1596 1.4163 -0.0609 0.0378 Table 2.3 First four modes of link 2. Link 2 (thin beam) Mode (j) 1 2 3 4 Payload (kg) Ay 0 1.8751 4.6941 7.8548 10.9955 Nominal 1.2616 3.9334 6.5820 8.8400 Max 1.0240 3.7406 5.9522 8.2571 f2J ^z) 0 2.5276 15.8401 44.3526 86.9134 Nominal 1.1442 11.1224 31.1435 56.1767 Max 0.7537 10.0587 25.4686 49.0122 Ajih) (m) 0 2.0000 - 2.0000 2.0000 - 2.0000 Nominal 2.0486 -0.3124 0.0868 0.1267 Max 2.0554 -0.1131 -0.0459 0.0888 33 E 1.5 •fe 0.5 I I i i i i i i Zero offset - Maximum offset -i i i i i i i 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Length (m) Length (m) 2 | i 1 1 1 1 1 1 r Length (m) Length (m) Figure 2.4 Mode shapes of link 1 with zero and maximum mechanical offsets. 34 2.5 |— i i 1 1 1 1 1 1 r Free Length (m) 51 i I i i i I 1 1 1 1 ' 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Length (m) 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 Length (m) 2 I 1 1 1 1 1 i 1 1 r 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 dL dR r . , A r + = f., i = l,---,N. (2.52) dt dqt dqi dqi where {/X0} a r e m e generalized forces and R is the dissipation function. For a point r. on link i in frame F' one has r/(0 = [x, w,(Xl,t) 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)i = 0 in equation (2.38) and (2.39). We obtain the clamped-mass mode shape function for the jth mode for link /' as 37 c cosh^x,) - cos(/^x,.) + —^- (sinh(/^x,) - sin(/^x,)) coshfjy,) + cosC/y,) - (sinh(/J,/,) + sin(/Jy./,)) Pi W W + sWfiyl,) - - ^ ( c O S h ^ / , ) - COSfjff/)) SI A From equation (2.36), we have the corresponding frequency equation l + cos(#7.)cosh(;0;/,.) muPi + Pi P P (sin(/5,./,) cosh^./,.) - cos(/?,/.) sinh(£7,.)) <sm(#/,)cosh(#/,.) + cos(/5,./i.)sinh(/5,./,.)) 2 (l-cos(/5,./,)cosh(/5,./,.)) = 0 (2.55) (2.56) 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 — 1 / 0\T Ol , 1 j /^0\2 (2.57) where mhi is the hub mass and Jhi 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 Tp=\myjv%ir_li+\jp(9\« +dnf (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 /=i *~ dx,2 (2.61) where Ui is the elastic potential energy of link / . Assuming that the energy dissipation in the system can be modeled using equivalent viscous damping, the total dissipation function of the system is 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 where q = \d],---,0n,Sn,---,Sln i,• • • , S n l , 5 n n j are the generalized coordinates, 0{ are the joint variables of link i, Stj are the deflection variables, M is the positive-definite symmetric 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.62) M (q)q + h(q, q) + Kq + Bq = u (2.63) (2.64) (2.65) 39 (2.66) 74 y = £ > , 4 ( * , ) A (2.67) (2.68) (2.69) Recall the normalization of the clamped-mass mode shape functions in equation (2.46). We have hijj = {' PA/(x.)dx. = p.l, = m, (2.70) The orthogonality relations for the clamped-mass beam mode shape functions in equation (2.45) with MOi = 0 become From equation (2.68) and (2.42) we have (EI\ j f ^ (x, )<f>,k ""dx, - U (x, ) 4 "'(X,) - (x, )4" (x,) (2.71) (2.72) Substituting equation (2.41) into equation (2.72) and using the boundary conditions in equation (2.33), we obtain hijk = J 0 ' ' ( ^ ) , ^ " ( ^ ) 4 " ( ^ ) ^ = {EI\ | ^ ( x ^ - ^ c o ^ M . y t x , -[^(x,)4 "'(x,) - ^'(x,M,''(x,)' = < I M (*, )<j>,k (x, )dx, - (EI\ -mjy (/, )<P,k (I,) - JJ' (/, M , ' (/,) (2.73) Pi ®* t M (*/ )<t>ik (*,• ) A + mjy (/,- )<pik (/,.) + JJ' (/,. M / (/,.) 40 Substituting equation (2.70) and (2.71) into above equation we obtain f0 (j * k) (2.74) co,. u = *) 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 I2jjk 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 +JJi'(li)2 COy 2.3.2 Single-link Model In this section, we develop an explicit finite-dimensional dynamic model for a planar single-link 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) = Yj(t>,j(xx)8,j(t) 7=1 (2.75) where 4,y(x,) are the constant clamped-mass mode shape functions with zero mechanical 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 = ^ px\[xxsx +cxwx(xx,t)]6x +w 1(x 1,0^ !} 2 +{[x,c, -sxwx(xx,t)]0\ +wx(xx,t)cx} dxx (2.78) 2 J o = \ r & { [ x i + w > ( x i > + 2 ^ ^ i ( x i ' r ) x i + ^ i ( x i ' o} dx Substituting equation (2.75) into equation (2.78), we obtain Tn = \ i P {l*.2 + w i 2 (*i>OW? + 20,w, (x,, Ox, + w 2 (x,, 0} 1 rt = 2 A * x,2 + An \ 2 _ _ ^ ( x , H , ( 0 0, 2 +20,| ;^.(x,)J 1 , (Ox, 7=1 + V7= (2.79) dx. The kinetic energy of payload is obtained by setting i = 1 in equation (2.59); thus Tp=\mp(yy\:\xr_li+^Jp(0\° + dxf (2.80) Substituting equations (2.4), (2.10), and (2.13) into equation (2.80), we obtain 42 Tp=\myxfv\\x^ + X-Jp0?+dxf 1 = 2m>< fnm A2 + 0 2 + ie\ £ ^ (/, )4 ; {t)ix + . d W 7=1 (2.81) 2 ' 4+i>,/(W y (o The total kinetic energy of the system is T-T +T +T x\ + "w.l 0 2 + 2 0 1 £ ^ , ( x 1 ) J i y ( O x 1 7=1 + I Vi=i dx, + — mni 2 p 11 + V7=l 0?+20^^(1^(1)1, 7=1 + (2.82) 2 " The total potential energy of the system is given by setting i = 1 in equation (2.61); thus 1 rA V = - (EI) 2 J o i 5x2 (2.83) Substituting equation (2.75) into equation (2.83), we obtain 1 ch r i V = - \ (EI) 2 Jo y i X ^ / ( * . ) ^ ( 0 7=1 CiX, (2.84) 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 8R . + = f, i = l,---,l + «„ dt dqt dqi dqt (2.87) The generalized coordinates of the system are q = [qx,---,qx+nmJ = {dx,5x^i„ml) • One obtains d dL dt d6, +2px9x pxx\dxx + £ px <r\j Oi )5\j (0 w'=i dx. 9 ['' Z Aj (*, )<?„• ( 0 £ ^ A 7=1 /,2 + + 1 A 2 ^ i / ( xi )x\dx\$\j ( o + w 0, 7=1 7=1 7=1 "m.l 7=1 5Z = o = PAMx)xxdxA + )£#*(* ! A (O^i &=1 <fr dSxj +™ A (A )!>,* (A A (0 + -^A' (A ) Z rt / (A A (0 (2.88) (2.89) (2.90) 44 dL d5xj = - [' PAJ (*• ) Z 4* toi )3* ( 0 ^ #2 - ™ A ( A ) £ r t * ( A ) M 0 < M 2 (2.91) f'l n '' dStl 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 dxx + mp +20, £ ( A u + V M y ( A ) + ^ ; ( A ) ) ^ ( 0 , V l »„,! i ' A E 4; (*. )3; (OS 4, (*• ('>& 7=1 7=1 V i V I + ^ E ^ ( A ) ^ ( 0 S ^ ( A ) 4 ( 0 2X(A)^,(0 V7=l (2.92) 7=1 7=1 +6,0, =r, The time variation of the y'th mode shape function of the link is given by the generalized coordinate 8Xj for which the corresponding generalized force is zero. The deflection equation 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 ( xi M* Oi ) A + m A (A M* (A) + ^ A ' (A M*' (A) (2.93) r r'i "Z L M y Oi M* ( xi + w A (A M* (A) m, + / « A ( A ) + Jp<r\j (A) 2.3.3 Two-link Model In this section we develop an explicit finite-dimensional dynamic model for the planar two-link flexible robotic manipulator shown in Figure 2.1(a). The link deflection for the first link is 7=1 (2.94) The link deflection for the second link is w2(*2>0 = Y<<l>2]{x2)82J(i) 7=1 (2.95) where <j>Xj(xx) and <f>2J(x2) are the constant clamped-mass mode shape functions with zero 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 2 1 2 fn. A' + l =" 2 «2 4+4+I>/(A )4 ( ' ) # + 24£riy(A)*.,(0A + 2 ^ ( / , ) ^ ( 0 7=1 V 7 (2.97) 7=1 The kinetic energy of link 1 is = ^ pl \[x2 + w2 (x,, t)}62 + 2<9, w, (x,, t)xy + w\ (x, ,t)}dxx (2.98) 1 rt x\ + 4 2 + 2 0 1 £ ^ . ( x 1 ) < J 1 . ( O x 1 7=1 + £^.(x,)j i y(o V7=l >dx. The kinetic energy of link 2 is £ /92 (/2 + (/,, 0) 0' + (*2 + W 2 ( X 2 » 0) (3 + «, + 4 ) 2 + W,2 ( / , , 0 + w\ ( X 2 , t)dX2 \ i x 2 [i,cai2e\ + w,(i,j)sai2e, + w^,t)cai2] 1 rt2 2 +2x2 w2 (x2 ,i) — 2w2 (x 2 ,0 •dx. + • 1 rt 2 * j02 Pi 2A#>, (A>0 + 2 ^ 2 (*2>0 [hcaiAi + w i (A> 'K„ 2 4 + w, (A, ' K 1 > 2 ] ^ . 47 f 2\ A2 + Zrty(A)*.y(o V U= 1 J J 6>,2 1 + — 2 f / 2 ("m-2 dx. '•m.l ( 0 > Z r t / (A)* .y(o+* 2 ) 2 Z rty (A tfy (t))+\ Jf A f Z &y (*2 )*2y (0 W=' J Z \J=l dx. 7=1 -m 2 / 2 + ( 0 > Z r t / ( A ) * . y ( O + 0 2 ) ^£rt/(A)*.y(') + *2 V7=l f«m.l Z r t y (W , (0s in Zrt / (A)4y(O + 02 /, COS 0, + 7=1 0 V>1 J f»m> \ +Zrty(A)4/(0cos Zrt / (A)4y(O + 02 7=i 17=i y + Z / . 2 . A / ( 0 7=1 - Z ^ A y C O 7=1 lx sin Zrty'(/.)4y(O + 02 "mi / 1 , , \ -Zrty(A)4y(0cos Zrty'(A)4y(O + 02 K 7=1 V 7=1 J +Z rt y (A )4y (0 Sin { Z rty' (A )4y (0 + *2 ^ 7=1 V7=' +m2/10,Zrty(A)4yW 7=1 7=1 /, cos Zrty'(A)4y(O + 02 ex \M J +Zrty(A)4y(0sin Zrty'(A)4y(0 + <?2 V, 7=1 7^=1 J Z rty (A )4y (0 COS [Z rt/ (A )*,y (0 + 02 7=1 *V7=1 ; (2.99) The kinetic energy of the payload is 48 \™P {[/,2 + w2(/,,0]fl2 + [l2 + w22 (l2,0](fl. +d]+02)2+ w2(lx,t) + w](l2,/)} +2l2w2 (l2, t) - 2w2 (l2, t) [lxsaa6\ - wx (/,, t)cai26\ + w, (/,, ;K„2 ] j + m P A A (A>0 + mP™i (h>0 [Aca„2^ i + wi (A»0^ „2 fl + w, (/,, 0ca„2 ] 1 9 + - ^ ( f l , + ^ 2 + « 1 + « 2 ) — m ^ 2 p A2 + + V - 1 *2 + 2X-(A)*u(o 1 Srty&teyCO fl2 (^,+Srty'(A)4y(0 + <92)2 7=1 £rty(A)4y(0 + Xrty ( * 2)4y(0 V > 1 J V7=l + |^(^+2rty ' (A)4y (0 + ^ ) 2L 7=1 /t cos Xrt / (A)4y(0 + *2 V7=1 fl - X rty (A )4y (0 S i n £ rty' (A )4y (0 + #2 7=1 V 7 ' = 1 "m 1 ( nm fl + S rty (A )Aj (0 c o s J rty' (A )4y (0 + fl 7=1 V 7=1 + 2/2Xrt2y(/2)4y(0 7=1 -2X 2^.(/2)^.(0 7=1 I s i n Zrty'(A)4y(0 + fl2 V i = i fl -Zrty(A)4y(0cos Xrty'(A)4y(0 + A 7=1 V7=' fl +£rty(A)4y(0sin £rt/(A)*.y(0 + #2 7=1 V 7=1 49 7=1 7=1 / , COS V i = i 9, ( A ) ^ , 7 ( 0 s i n Z 4 /(A )^>7(0 + ^ 7=1 V 7=1 +Z^-(A)^(Ocosf| ;^;( / I ) j i y (o+f t 7=1 V 7=1 1 "m. l "m,2 2 7=1 7=1 0 The total kinetic energy of the system is 7 = 7" +T +T +T +T 1 1hl T 1h2 ^ J / l T 1I2 T "^/J The total potential energy of the system is given by d2wx(xx,t) dxx2 1 Ch dxx +— (EI) 1 2 J o 2 d 2w 2(x,,0 dx22 dx. ^Xj"(xx)SXj(t) 7=1 dx, + - ('(EI) 1 2 J o 2 £ ^ ; ( x , ) ^ . ( o 7=1 dx. Use equations (2.101) and (2.102) to form the Lagrangian of the system: L = T-V The total dissipation function of the system is L i=i z ;=i j=\ The generalized coordinates of the system are ' Ql+nm , +n„, J = (0 1 ,0 2 J <5' n , - " J <5' 1 V i ,5 2 1 , " - ,5 2 V i ) . (2.100) (2.101) (2.102) (2.103) (2.104) 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 | dR dt dqi dqi dqt 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 planar rc-link flexible manipulator are obtained in the form 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 M(q)q + h(q, q) + Kq + Bq = u (2.106) 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 0 ,q 0 ,q 0 ,u 0), a linear time-invariant approximation to this 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 0 ; Aq = q - q 0 Aq = q - q 0 ; Au = u - u 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 0 )q0 + h(q0, q0) + Kq 0 + Bq 0 = u 0 The motion near the operating point can be described by M(q 0 + Aq)(q0 + Aq) + h(q0 + Aq, q 0 + Aq) +K(q0 + Aq) + B(q0 + Aq) = u 0 + Au (2.108) (2.109) 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(q0) + 8M dq Aq (q0 + Aq) + h(q0,q0) + ah 8q Aq + — dq Aq (2.110) +K(q0 + Aq) + B(q0 + Aq) = u 0 + Au 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(q0)Aq + oh dq B Aq + dM dq q 0 + !q(1 oh dq + K qo.qo Aq = Au (2.111) 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 0iO while all the other generalized coordinates, speeds 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 — dq consists of the generalized velocities. In this case then dh dq dM q<>.q<) dh dq = 0 qo.o dq (2.112) q 0 = o qo By substituting equation (2.112) into equation (2.111), the linearized equations of motion of the system are obtained as M(q0)Aq + BAq + KAq = Au (2.113) 53 where q 0 = , • • •, 0n, 0, • • •, 0) , and M, B, and K are constant matrices. Also We assume that the system outputs are the joint angles and the link deflections. The linear state-space equations of the system are where X = AX + BU Y = CX X r=[Aq,Aq] A = B 0 I -M"'K - M ' B 0 0 c = u = <I>, „ 0 M ' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " Au (2.114) (2.115) 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 zero-dynamics 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 zero-dynamics 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. Input u External Dynamics (input-output part) Internal Dynamics (unobservable part) Output y > 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) = ^ - (2.116) D(s) 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-sln B C 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 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 A c = A - KBC (2.124) Mu0,+Mn5u(t) + bg0x=Tx M i A +M225u(t) + k,5n(t) + bn8u = 0 (2.125) where 57 M 1 2 = M 2 1 = / „ , +mplx0u(l]) + Jp0'(l1) (2.126) M 2 2 =m, ,(/,)' +Jp<f>u'(hf kx = coxx m.+m^M2 +Jp<Pxx'(lxf Assume that the overall system input is the joint torque r, and the outputs are the joint angle 0X and the link deflection wx(/, ,t) = <j>n(/,)8X,(£). The transfer function from input torque TX to joint angle 0X is CJT8(s) = —7T Tx(s) (2 127) M22s2 +b]Xs + kx s[(MuM22 -M2l2)s3 +(Mubn + M22bm)s2 + {Mnk, + bmbu)s + bmkt] The transfer function from input torque r, to link deflection wx(lx,t) = (j)n(lx)Su(t) is GTW(s) = T ] ( S ) (2.128) = -MJMs ( M n M 2 2 -M2X2)s3 +(M]Xbu+M22bex)s2 + (Mxlkx + bexbxx)s + bgxkx 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 TX(S) Tt(s) 7,7,(5) 22 ^12^1 (A) s2 + 6, ,5 + A:, (2.130) s[(MnM22 - M 2 1 2 > 3 +(Af„fe„ + M 2 2 6 „ > 2 +(Mnkl + bmbu)s + b0A] The zero dynamics of this system depends on the sign of the term C z , = M. 22 Mn<t>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 z , , we have C z , = M 2 2 M, 2^,(/,) mx -/ ,M4,(A) (2.131) 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,x1) - C 0 S^ l;} + C ° S , ( f l 7 \ ) [sinh(/V,) -sin(flx,)] (2.133) sinh(p,/,)-i-sin(/5,/,) By using equations (2.132) and (2.133), the closed form of the integral parameter in equation (2.131) is found as ( A I M / (2.134) By substituting equation (2.134) into equation (2.131), we have zl 1 (AA) (A) (AA) 2 (2.135) 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(xi) i 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)2 <0 (2.138) 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 - ; .-•10 I 1 1 1 1 5 1 1 j 1 •10 -8 -b .4 - ! 0 3 4 6 8 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 non-collocated 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 MPC 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 MPC control and knowledge-based 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 decision-making system. The bottom level consists of two modules: System identification module, which accommodates the model parameter variations in the system, and MPC 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 Refer enc e Trajectories Fuzzy Tuner Tuning Parameters Model Structure Update Linear Internal Model Model Parameters < Real Time System Identifier Linear MPC Controller Control Inputs 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 MPC algorithm with guaranteed nominal stability is developed in this section. It will be used as the lower-level direct controller of the flexible-link robotic manipulator system. Among the reasons for choosing MPC for low-level direct control of the flexible manipulator are the following: • MPC 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-integral-derivative (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 MPC and other popular multivariable control techniques (e.g., Linear-Quadratic-Gaussian or L Q G method). MPC 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. MPC 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. • It takes full advantage of the power available in modern control computer hardware. 3.2.1 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 + Hu -1, 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 Hp is the number of control intervals over which the outputs are to be optimized. The control horizon Hu sets the number of control intervals over which the manipulated variables are to be optimized. MPC 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,-••Hu -1,are computed by minimizing a cost function. 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 Output Setpoint J I I I [_ Future _ O O o O -o 0 o o 0 o Prediction rforizon, HB K - >: • Measured O Predicted _l I I l_ i i l l l Input • Past Moves O Planned Moves Control Horizon, Hu J I I l_ J I l_ Time Time Figure 3.2 Illustration of the strategy of SISO MPC at M i sampling instant. The basic structure shown in Figure 3.3 is used to implement the MPC. The inputs to the MPC controller are the references (target values for the outputs) and the measured plant outputs. The MPC 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 MPC 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 MPC 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 Optimization Past plant inputs and ! planned future inputs Measured outputs; Internal Model Predicted Outputs MPC Controller Manipulated variables > Unmeasured disturbances Figure 3.3 Basic structure of MPC. Plant Plant outputs 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(&) y(k) = Cx(k) (3.1) 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 y(0 = Cx(0 (3.2) A discrete-time model can be obtained by converting the continuous-time model using zero-order hold on the inputs at the sampling instants, and a sample time period of Ts seconds. Accordingly, the control inputs are piecewise constant over the sampling period Ts; thus u(kTs) = u[(k + l)Ts] (3.3) The solution of equation (3.2) is 69 x(0 = eA'x(0) + Jf eA ('-T )Bu(r)cir At t = kT, the solution is x(kTs) = eAkT°x(0) + £ r ' eA ( A 7 ;- r )Bu(r)cir At / = (& +1) 7^ , the solution is x[(* + 1)7;] = e A ( ^>x(0) + [T'+Ts)eA^-T)Bu(r)dT By using equations (3.4) and (3.5), equation (3.6) can be expressed as *[(* +1)7;] = eA(kT<+TM0) + f T'+T,) eA(kT^-r)Bn(T)dT = e A r ^ A ^x(0) + eAT- [Ts+T"]]eA(kT^Bu(T)dr eMT*x(0)+ p e A ( i 7 ; - r ) B u ( r ) J r = ^ x ( ^ + j ^ = eA 7 ; x(A:rs) + £ eAr<zYBu(M;) r JkT, A ( t r 5 - r ) Bu(r)<ir Let kT.->k. We have x(fc +1) = eAT*x(k) + £ eArc7rBu(J:) = Ax(k) + Bu(k) where A = e AT, B=£eArdr (3.4) (3.5) (3.6) (3.7) (3.8) (3.9) 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 + + X |A f i ( * +1' -11 *)|| Q(i) 1=1 R(i) (3.10) i=i 70 where H is the prediction horizon, Hu is the control horizon, Q(z) is the tracking error 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) denotes the future control moves. The cost function J penalizes deviations 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: "Jmin^Uj(k + i\k)<ujmm yJmin^yj(k + i\k)<yjmiiK i = 0,-,Hp where the subscript " ()." denotes the y'-fh component of a vector, and u m a x and um i nare the vectors that contain the maximum and minimum control inputs for each joint of the flexible-link 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 . m i n denote the vectors that include the maximum and minimum link deflections. The MPC control action at time k is obtained by solving the optimization problem min J (312) A U ( t | t ) , - - , A U ( t + / / u - l | t ) 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 MPC 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: We can find the predicted plant outputs in the prediction horizon by iterating this internal model; thus y(k + i\k) = CA'x(£) + CA'-'Bu^ \k) + --- + CBu(£ + i-l\k) x(k + Hp \k)=AHpx(k) + AHp~lBii(k\k) + --- + Bu(k + Hp-l\k) y(k + Hp\k) = CAW* x(k) + CAHp~lBu(k | *) + ••• + CBu(£ + Hp-\\k) We assume that the inputs will change only at times k,k + \,---,k + Hu—\, and will remain constant after that. Specifically we have x{k + \\k) = Ax(k) + Bn{k\k) y{k + \\k) = Cx(k + l\k) = CAx(k) + CBu(£ | k) (3.14) x(k + 2\k) = Ax(k + l\k) + Bu(k + l\k) =A2x(k) + ABu(£ | k) + Bu(k + \\k) y(k + 2\k) = CA2x(k) + CABii(& | k) + CBu(k + l\k) x(k + i | k)=A'x(k) + A''-1Bu(A: | £) + ••• + Bu(k + i -11 k) (3.15) u(k + i\k) = u{k + Hu-\\k) for Hu <i<Hp-\ (3.16) 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) + --- +Au(k \ k) + u(k -1) u(k + Hp-l\k)=Au(k + Hp -l\k)+Au(k + Hp-2\k) + ---+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)=A2x(k) + ABau ( /V | k) + ABu(/t -1) + Bau (A: + l\k) + Bau( /V I k) + Bu(k -1) = A 2x(/t) + (B + AB)au(A: I k) + Bau(£ + \\k) + ( B + AB )u( /V- l ) y(k + 2\k) = CA 2 x(/t) + ( C B + CAB )au(£ | k) + CBau(£ +11 k) + ( C B + C A B ) u ( / t - l ) x(k + Hu | k)=A"» x(k) + ( B + A B + • • • + A " " _ 1 b ) A U ( * ; | k) + ••• + Bau(A: + y¥u -11 k) + ( B + A B + • • • + AH»~'b) u(k -1) y(k + Hu\k) = C A " " x(k) + ( C B + C A B + • • • + C A W " _ 1 b ) A U ( * | k) + • • • + CBau (A: + Hu -11 k) + ( C B + C A B + • • • + CAH»-]B)u(k-1) £ (* + # „ + 1 1 k)=AH"+'x(k) + ( B + A B + • • • + A H "B )au(& | k) + --- + ( B + AB)au(/V + / /„ - \ \k) + (b + A B + --- + A W " B )u ( / V - 1 ) y(k + Hu+\\k) = CA"» + 1x(/t) + ( C B + C A B + • • • + C A " - b) A U ( A : | k) + --- + ( C B + CAB)Au(yt + //„ - l | / t ) + ( C B + C A B + --- + CA"»B )u (A:-i) x(k + Hp | k)=AHpx(k) + ( B + A B + • • • + a" ' - 1 b ) A U ( A : | it) + --- + ( b + A B + --- + A / / ' ~ / / " B )au(£ + / / u -\\k) + ( B + A B + • • • + AW P"'B)u(yt -1) y(k + Hp\k) = CAHpx{k) + ( C B + C A B + • • • + C A " ' ~ 'b )au(£ | k) + • • • + ( C B + C A B + • • • + CAHp'H" b)au(A: + H -11 k) V ' (3.18) + ( C B + C A B + • • • + C A " ' - 1 b ) u(/t -1) For a plant with nx states, n measured outputs and nu inputs, the vector of output predictions up to a horizon Hp can be written in the matrix-vector form 74 where Y(*) = Sxx(k) + Suu(k -1) + S A „ AU(fc) (3-19) Y(*) = y(k + l\k) y(k + 2\k) y(k + Hu\k) y(k + Hu+\\k) Kk + Hp\k) AV(k) S = CA CA 2 CA"» CA H„ + l CAHp S.„ = CB CB+CAB 0 CB H„-\ H,-2 Z CAB Z C A B 1=0 1=0 Hu Hu-\ J C A B Z C A B i=0 H„-\ H„-2 A\i(k I k) &xi(k + \\k) Au(k + Hu-l\k) CB CB+CAB //„-i Z C A B 1=0 Z C A B H„-\ Z C A B 1=0 0 0 CB CB+CAB Z C A B Z C A B Z C A B 1=0 1=0 (3.20) (3-21) (3.22) Equation (3.19) is the prediction equation. It can be used to predict the future plant outputs. 75 The matrices SX,SU and SAU are the constant matrices that depend on the internal model (matrices A,B ,C ) and the M P C horizons (H ,HU) 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 [5u,---,8]nmi,---,Sn],---,Sm^^ j and their derivatives. We assume the measured system outputs to be the joint angles and link deflections. The derivative terms of 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 of the output prediction equation (3.19) remains the same, but x(k) has to be replaced by x(k \k), which is the estimation of state vector at time k. The state observer is a copy of the plant (equation (3.1)) with feedback from the measured plant outputs, through the gain matrix L, to correct the state estimation. The equations of 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 (*) -y(k\k-1)] = x(k\k-l) + 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 of x(k) given past measurements up to y(k - 1 ) . • x(k | k) is the update estimate of x(k) based on the current measurements y(k). • L ' is the innovation gain. 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). The correction term is a function of the innovation, which is the discrepancy between the measured and predicted values of y(k): y (*)-y(k |k-1) = y(k) -Cx(k \k-l) (3.26) By 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 if 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-LC)e (£ ) (3.28) which shows that the state estimation error converges to zero if 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 filter described above with the function kalman 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 (MPC). 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 "y(* + i |*) ~r(£ + l) Y(k) = , T(*) = , AU(*) = Kk + Hp\k)_ r(k + Hp)_ Au(k | k) Au(k + Hu-\\k) (3.30) and the weighting matrices are given by Q = 'Q(i) o 0 Q(2) 0 0 0 0 Q(Hp) R = R(0) 0 0 R(l) 0 0 0 0 (3.31) From equation (3.19), the predicted system outputs using a state observer are Y(k) = Sxx(k | k) + Suu(k -1) + S^uAV(k) Define AT(k) = T(k) - Y(k) + S a u AlJ(k) = T(k) - Sxx(k | k) - Su\x(k -1) (3.32) (3.33) 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 'square-roots' 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) - T(k)2 + AU (Jfc) 2 Q R : [Y(£) - T(k)J SgSe [Y(£) - T(jfc)] + AV(k)TSTRSR AV(k) (3.35) S f l[Y(*)-T(*)' SRA\](k) S e[SA.AU(*)-AT(*)] SRAV(k) 78 Equation (3.35) indicates that the cost function / is equal to the squared 'length' of vector "S 0 [S A B AU(* ) -AT(* ) ] ' SRAV(k) (3.36) 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 , B AU(*)-AT (* ) J S,AU(*) = 0 (3.37) or AV(k) •• SQAT(k) 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 = m i n ( A x - b ) r ( A x - b ) (3.39) By differentiating / with respect to x and equating to zero will yield x*, which is the 'least-squares' solution of the equations Ax = b , as x*=(A rA)~V'b (3.40) The numerical solution of Ax = b can be obtained in a least-squares sense using the iQR' 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 T - i r ~ S E A T ( * ) ~ J 0 A U (/V) = - i i - i S 0 AT(A: )" 0 = (SLSCS0SA. + STRSH yl SLS e S e AT(^) = ( S A U Q S A „ + R J " ' S A U QAT(&) = ( S L Q S A . + R)" 1 S A R U Q[T(^) - Sxx(k I k) - Suu(k - D ] (3.41) 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: AU*(ifc) = SQAT(k) 0 (3.42) 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 nu, we just use the first nu rows of the vector A U (k), that is -A?„xn„ ' ^ n „ x n „ ( / / „ - l ) -Ai„xn„ '0«„xno>Hu-\) A U ( £ ) =AU(& I k)* A\]\k) " (sLQS i t t + R)" 1 S : „ Q [ T ( * ) - Sxx(k \k) - S„u(£ ~ 1)] KMPC[T(k)-Sxx(k\k)-SXk-l)] KMPCAT(k) (3.43) where In x n is the nu x nu identity matrix, and 0 N x n ^ ^ is the nu xn11(Hu -1) zero (null) matrix. The MPC controller gain matrix KMPC is defined as K MPC ^x„„,0„ u > < „ u K . 1 ) ] ( sLQS I „ + R )" , SLQ (3.44) Here KMPC 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 (Hp,Hu). The unconstrained MPC control input vector at time k is u(k) = u(k -1) +AU(&) = u(* - 1 ) + KMPC [T(*) - S , i (* | k) - Suu(k ~ 1)] (3.45) The numerical value of KMPC can be computed using the Matlab notation 'V and the operator ':' to pick out the first nu rows of the solution: 0 (3.46) K MPC = K / U / /(1 :»„,:) The structure of MPC controller with no constraints is shown in Figure 3.4. From this figure we notice that the unconstrained MPC controller is a linear time-invariant system (LTD. AT(fc) Au(/fc) r -1 u(/fc-l) x(k\k) z-'l u(k) Plant M P C Controller Figure 3.4 Unconstrained MPC 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 MPC has to be replaced by a 'constrained least-squares' solution. The closed-form solution for the constrained MPC 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 MPC 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 MPC 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' MPC to deal with the constraints of the flexible-link robotic manipulator system. The new 'anti-windup' MPC controller is based on the unconstrained MPC 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 a x ^ 47) " m i n < 0, U M A X > 0 The output constraints are the minimum and maximum link deflections for each link: ymn<y(k)<y^ (3.48) 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 MPC controller, we can see that the control input vector u(k) and the plant output vector y(k) depend on the gain matrix KMPC . The gain matrix KMPC can be tuned by adjusting the weighting matrices Qand R, and the controller horizons (Hp,Hu) as given in equation (3.44). It follows that the basic idea of the constraint-handling strategy of the 'anti-windup' MPC 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 constraints are satisfied. We will use the MPC parameters that satisfy u min < u ( ^ ) < "max a n Q " ymin < v W < Ymax • The constraints are not active, so the unconstrained MPC is equal to the constrained MPC with the constraints within the actual system constraints ( < u(k) < , y ^ < y(k) < ym a x ). This means that the 'anti-windup' MPC 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) = {m i n ( A f i ( / : | A : )*' U m a x _ U (^~ 1 ) ) i f A f i ( * l * ) * > 0 (3.49) [max(Au(& | k)* ,uMn -u(&-l)) if Au(& | &)* < 0 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 MPC 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 MPC controller which has been developed for the flexible-link robotic manipulator system. If the MPC 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 over the predic t ion h o r i z o n , and even though the o p t i m i z a t i o n is repeated at each t ime step, each o p t i m i z a t i o n does not consider the system response b e y o n d the predic t ion h o r i z o n . T h i s c o u l d place the plant i n such a state that eventual ly it w i l l be i m p o s s i b l e to stabil ize the system due to the constraints o n the control input signals. In order to design a M P C w i t h guaranteed n o m i n a l stabil ity, w e need to introduce the L y a p u n o v theorem and related def init ions. Equilibrium: T h e system equation x(A: + l ) = f(x(k),u(k)) has an e q u i l i b r i u m at the state vector x0 and the input vector u 0 i f x0 = /(x 0 ,u 0) . W e can always assume that an e q u i l i b r i u m is at (0,0) b y changing o f the coordinates according to z(k) = x(k) - x0 and v(*) = u(fc)-v0. Stability: F o r nonl inear systems one has to consider the stabi l i ty o f a part icular 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 point (0,0) is stable ( in the sense o f L y a p u n o v ) i f for a s m a l l perturbation o f the states or inputs, g i v e n any s > 0 , there is a 8 > 0 such that i f ||[x(0)7',u(0)7']||<£ then ||[x(£)7',u(/c)7']|<8 for a l l k>0. It is asymptot ica l ly stable i f Lyapunov's Theorem: I f there is a funct ion V(x,u) w h i c h is posit ive-def inite , n a m e l y it satisfies F(x,u)>0 and F(x,u) = 0 o n l y i f (x,u) = (0,0), and satisfies the 'decrescent' property and i f , a long any trajectory o f the system x(k + \) = f(x(k),u(k)) i n some neighborhood o f (0,0), the property holds , then (0,0) is a stable e q u i l i b r i u m point. In addi t ion, i f V(x(k),u(k)) - » 0 as k - » co (3.50) V(x(k + l),u(Jt +1)) < V(x(k),u(k)) (3.51) 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)\\ + ] T | A u ( * + z-l|fc)|| ( 3- 5 3) i=l Q(i) <=1 R(i) 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 output trajectories coincide: y(k + i) = y(k + i\ k) if u(k + i) = u(k + i | k). Let J\k) be the optimal value of the cost function at time k, and Au(k) and y*(k) be the corresponding optimal control moves and optimal outputs. We have 2 2 J'(*) = & + 0|| + Z||Au (k + i-1)|| (3.54) i=l Q(i) (=1 R(i) From the definition of the control horizon Hu of MPC, we have AU*(/C + 0 = 0 Vi>Hu (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) = jjy'(k +1 + /) + J j Au* (k + l + i-1) Q(<) '=i R(0 1=1 = E | y * ( * + 0|| + Z||Au*(k + i-1) - |y ' ( * +1)' -1Au*(kf i=l Q(0 /=1 R(0 fl(l) (3.56) + y*(£ + / f +1) + Au* (£ + / / ) P ' DIM i v u / i|2 i|2 'b(i) R(HU) = j \ k ) - y \ k + \)2 - Au(k)2 +y\k + Hn+l)2 2 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 (3-57) ^y\k + Hp+\)f +\\Au(k + Hu)l 2 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 + Hp\k) = 0 (3.58) 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 + Hp,we have y\k + i\k) = Q Vi>Hp (3.59) Using equation (3.59), equation (3.57) becomes j \ k + l)<J'(k + l) = j\k)-\\y\k + \f = j\k)-\\y\k + \) <f(k) G O ) 2 GO) y\k + Hp+\) I G ( « J (3.60) Au'(jfc) 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 MPC 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 ) 2 - A u * ( / c ) 2 +y\k + HB+Y) ' 0(1) V ' R(l) J V p ' 'Q(Hp) <0 or (3.61) y\k + l)2 + Au'(k)2 >y'(k + H+\) J v ' (2(1) R(\) p Q(H 2 Q(HP) Equation (3.61) shows that imposing terminal constraints to obtain stability is unnecessarily restrictive. We can relax the terminal constraints y(k + Hp\k) = 0 to a terminal constraint set y(k + H\k)<A(k)y0 (3.62) which contains the origin rather than a single point, where y 0 is a constant system output 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 MPC with guaranteed stability may be developed as follows: • At each time step k, define a terminal constraint set y(A; + Hp \ k) < A(k)yQ. • First stage: at time k=0, choose an initial terminal constraint set such that MPC can drive the plant into this set with A(0) = 1. • Gradually decrease A(k) at each time step, until MPC 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 MPC for a single-input-single-output (SISO) system. At time step k, the terminal constraint y(k + Hp \ k) is within the terminal constraint set A(k)y0 (the broken-line circle at time k + Hp). The size of the terminal 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 Xy0 becomes the terminal constraints y(k + Hp | 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 k+l Time Hp Hp+i , Figure 3.5 The basic idea of multi-stage MPC. 3.3 System Identification for Unknown Payload In this section we will design the system identification module of the overall MPC 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 (3.63) y = Cx 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 MPC 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: ZN =[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 = [mp Jp~J. Also y(t\t-LP) are the predicted system outputs based on the past data set Z'" 1 . When the data set ZN 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 VN (P): W = £ l W . ( 3 . 6 6 ) P ^ a r g m i n F ^ P . Z " ) where ' argmin' denotes the minimizing argument; i.e., the value of P that minimizes VNCP). 89 At time TV , when the data set ZN is known, the function VN (P) is just a finite-dimensional real. parameter vector P. But in general, the function VN (P) cannot be minimized by 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 state-space 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 MPC and for adjusting the model structure of the real-time system identifier. In this context we will rely on the step response of the flexible-link robotic manipulator. The setpoint is a constant value for each link. The desired closed-loop 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 MPC 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 MPC controller. The first step develops a knowledge base for tuning the MPC 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 MPC 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 Hu, prediction horizon H , tracking error weighting matrix Q(i), 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 MPC controller for a flexible-link robotic manipulator is: J = ^\\y(k + i\k)-r(k + i)\\ + YJAu(k + i-\\k)\\ (3.67) .=1 Q(i) i=l 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 Hu is the number of future time steps after 91 which the control inputs will be held constant; that is, all future input moves are set to zero. Increasing Hu 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 Hu may result in 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 Hu 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 Hu such that the controller performance is insensitive to small adjustments in this horizon based on simulations and experiments of the system. The Hu will be fixed to this value, and will not be tuned by 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 MPC 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 Hp 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 = l,...,Hp "e, o ••• o 0 Q2 ••• 0 Q = o o ... 0 (3.68) where ny is the number of outputs, and Qx,--,Qn are the constant output weights. The weights must not be negative. Different outputs can have different output weights. If Qa » Qb the controller does its best to track the setpoint ra, sacrificing rb tracking if necessary. On the other hand if Qa = 0 , the controller completely ignores the derivation output ya from its setpoint ra. In general, increasing Qa can reduce the steady state error and the overshoot or undershoot of the output ya . But increasing Qa will also increase the control input ua, and 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 MPC 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) V i = 1, R = R, 0 0 it, 0 0 0 0 R. (3.69) where nu is the number of inputs, and RX,---,R^ 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 MPC 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 MPC controller. Choosing deadbeat dynamics gives a fast response to disturbances. But this fast-dynamics observer will also react relatively strongly to high-frequency 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 MPC 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 Control horizon H Prediction horizon H Output weight Q Input rate weight R Internal model Observer dynamics Tuned by fuzzy tuner No Yes Yes Yes No No 3.4.2 Fuzzy Inference System In this section we will design a fuzzy inference system (FIS) to tune the MPC 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 > a H p > > A i ? „ system. Figure 3.6 shows a schematic diagram of the fuzzy inference system for the flexible link robotic manipulator system. The input variables are: OSe , OSw , and OSu . The output variables are: AH AQW ARU . OSg is defined as: OS0=\9max\-\r0\ (3.70) where 9^ is the absolute maximum joint angle of the closed-loop system response, and re is the absolute desired joint angle. We assume that the initial joint angle for each link is zero. The desired OSe value is OSg < 0 and \OSg\« 0. This means we want the step response of the system to be an overdamped system that is as close as possible to the critical damped system. OSw is defined as: OSw=\wm\-rw (3.71) where wniax is the absolute maximum link deflection of the closed-loop system response of the link and rw is the link deflection constraint (maximum allowed link deflection). The desired OSw value is OSw < 0. This will make sure that the link deflection stays within its bound. OSu is defined as: os»=k.,K <3-72> OSe OS.. Figure 3.6 The fuzzy inference 97 where is the absolute maximum control input of the closed-loop system response of the link and ru is the control input constraint (maximum allowed control input). The desired O S u value is O S u < 0 . This will guarantee that the control input stays within its bound. AH' is defined as: ^ P = ( H P N E W - H P M ) H P S E N (3.73) where HP OLD is the prediction horizon before tuning, HP NEW is the prediction horizon after tuning, and HP SEN is a sensitivity parameter. HP SEN is introduced for adjusting the sensitivity of tuning. AQW is defined as: *QW = {QW_„EW ~Qw_oid)Qw_sa, (3-74) where QW OLD is the link deflection weight before the tuning, QW NEW is the link deflection weight after the tuning, and QW SEN is the sensitivity parameter. We normalize the joint angle weight as Q = 1 . The overall output weights are where QYW is a predetermined constant value. ARU is defined as: AR =(R -R ,,)R (3.76) u \ u_new u_ola J u_sen ^ / where RU OLD is the input rate weight before tuning, RU NEW is the input rate weight after the tuning, and RU SEN 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. An 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 MPC 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 MPC control parameters can be expressed linguistically as given in Table 3.2. Table 3.2 General linguistic rules for tuning an MPC 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 MPC 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 MPC 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\ AND (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.) V " (3.78) A. ORB; ==max(Ai,Bi) where 'AND' 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 Ct to the degree specified by the antecedent. The most common method for 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 MPC controller parameters. In order to simplify the tuning process, we set the MPC 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 , Hu, Q, R), and the input and output constraints of the system. The setpoints 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 Hp 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 1 0 4 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 Qw is a tuning parameter. A large value of Qw will reduce the link deflection, but the joint angle tracking error will be increased. The parameter Qw will start with a relatively small initial 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 Ru is a tuning parameter, which starts with a relatively small initial value and is increased by the fuzzy tuner. After the initialization step, the MPC 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 OSe, OSw, and OSu for each link, based on the system outputs. The ranges of OSg, OSw, and OSu are normalized 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: OSw=\wmax\-rw (3.79) OSu=\umax\-ru The preprocessor then normalizes these values in the range [0 10] using the following relationships: If OSg > 10 then set OSg = 10 If OSg <sg then set OS, =0 IfOS >10then set OS =10 (3.80) IfO5 w <0 then set O5M> = 0. If OSu > 10 then set OSu =10 I f O £ B < 0 t h e n set OSu = 0 where sg is the absolute tolerance of joint angle, OSw < 0 means the link deflection is within its limit, and OSu < 0 means the control input is within its limit. 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: OSg=0 OSW=0 OSU=0 (3.81) If the above termination conditions are not satisfied, OSe, OSw, and OSu will be sent to the 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: Hpmw=Hpold +max(AHpJ,-,*Hp_n)/Hp_iai Qw_new Qw _old ~^~^Qw ^ Qwsen (3.82) Ru_new = Ru_old + A R U '' Ru_sen where the subscript 'new' denotes the updated value, and 'old' denotes the previous value. The sensitivity parameters HP SEN , QW SEN , and RU 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 U---,AHP N) ) will be used for updating the prediction horizon. In the next step, the MPC 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, M P C controller Hp new s Qw new ' Ru Control Inputs Flexible-link robotic manipulator system System outputs Signal preprocessor ose, osw, osu Update tuning parameters n =0 „ IQ _^eu» w _old K^W zZ-w _sen os$,osw, osu AHP,AQK,AR» 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 MPC 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 MPC 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 , / 3 = 31.1435 Hz , and / 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 mp = 0.38 kg and Jp = 0.001 kg.m2. 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 MPC 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 MPC controller, we will impose constraints for the system input and output, in the MPC controller design, as follows: 110 |tt,|<6N.m I (4-3) wtip < 25 mm where u is the joint input torque and wri is the deflection of the link tip. i i i i i i i i \ 1 1 0 2 4 6 8 10 12 14 16 18 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. I l l 60 40 20 -20 -40 -60 A h 111! • 1 mode • 2 modes 10 12 14 Time (seconds) 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 70 60 h 50 CD 40 20 10 Time (seconds) -1 mode 2 modes Figure 4.3 Case 2: Joint angle responses of 1-mode model and 2-mode models under a bang-bang control input (0, (0) = 0, wtip (0) = 0). 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 (0X (0) = 0, wtj (0) = 0 ). 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 {[Jhl +Jol + Jp +mpll] + [nh +mp0u(lo2]Su2(t)}0\ + (/,„ + V , r t , ( / , ) + ^ n '(A))^i ( 0 (4-4) [2m, +2mp<fin(l])2~\Su(t)Su (t)0\ + be0x =r, + l\ii + mPlAi(A) + JP<t>i(A) °\ + m \ + mp<t>\i(A)2 + Jphi'(A)2 -[m, + mp</>u(ll)2]Sn(t)0]2 +I3mSu +bju=0 (4.5) where 7 U 1 and 73 1 1 1 are constant parameters which depend on the mode shape function of the first flexible mode, and are defined as J m = l'Mi(*i)Vxi , n (4.6) = {'(^ 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: Su2(t), 8u(t)8n(t)0\, and Su(t)02. In the development of the nonlinear dynamic equations of the 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, Su=0), the linear model of the system is given by 114 + (/,„ +mplx<f>n(l,) + J^,,'(/,)) ^ ,,(0 + ^ 0 , =r, m.+mJM2 +JJu'(llf Su(t) + I3U]Su +bjn = 0 (4.7) + 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>,,Su,&\,SuJ is the state vector and y = is the output vector. The system input u is the joint torque. The outputs are the joint angle 6X and the deflection wH>at 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 i i i i i i i i i 1 0 2 4 6 8 10 12 14 16 18 20 Time (seconds) 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, wtip (0) = 0 ). 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 (0X (0) = 0, wti (0) = 0). 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 (mp, Jp). Specifically, the elements of the system matrices A and B are functions of mp andJp, 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 6 Time (seconds) 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 6 Time (seconds) 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 (0X (0) = 0, wlip (0) = 0 ). 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, wtip (0) = 0). 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 MPC 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 MPC 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 Ts = 10 ms and a nominal payload, by using equations (3.8) and (3.9) we obtain the numerical discrete-time state-space internal model of the MPC controller as x(k +1) = Ax(k) + Bu(k) y(k) = Cx(k) ( 4 ' 9 ) where x(/t) = [0, (k), 5,, (it), 6\ (it), Sx, (it)] is the state vector and y(it) = [0, (k), wtip (/t)] is the output vector. The system input u(k) is the joint torque. The outputs are the joint angle 0,(/c) and the deflection wti (k) at the tip of the link. The numerical values of the system matrices A, B, and C are given in Appendix A. 1.3. The cost function of the MPC controller is ff H ^=zM^ ( * + / | * ) _ r *] 2 + e »^ (4-10) (=1 1=1 where rg is the setpoint for joint angle. The setpoint for link deflection is zero. We take the input and output constraints to be -6 N.m <u(k + i\k)<6 N.m 1 (4.11) -25 mm < y2(k + i \ k) < 25 mm A computationally efficient 'anti-windup' MPC controller is designed using the strategy developed in Chapter 3. This controller is an unconstrained MPC controller. The fuzzy tuner 121 handles the constraints. The control input at time k of the unconstrained MPC is calculated using the analytical equation (3.45). The fuzzy tuner adjusts the MPC parameters such that the constraints are satisfied. Next we will compare the performance of this computationally efficient 'anti-windup' MPC controller with the constrained MPC controller. The constrained MPC controller solves a QP optimization problem at each time step. The constrained MPC 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 single-link 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 MPC 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/2|<25mrn . The simulations results verify that the constrained and unconstrained MPC 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 MPC is within its range |w| < 6 N.m and reaches its maximum value in the first 3 time steps. If the unconstrained MPC 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 MPC has to increase the value of the input rate weight Ru from 3 to 5. This will be done by the fuzzy tuner. Figure 4.18 through Figure 4.21 show the simulations for the constrained and unconstrained MPC 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 MPC when the constraints are active. In summary, the developed computationally efficient 'anti-windup' MPC controller has the same optimal solution as the constrained MPC when the constraints are inactive; and has the sub-optimal solution when the constraints are active. The system response performance of the unconstrained MPC is comparable to that of the constrained MPC response. Table 4.1 MPC controller parameters. H P K Constrained M P C TC 7 160 9 20 30 8 Case 1 Unconstrained M P C Tl 7 160 9 20 30 8 Constrained M P C n 7 160 9 20 30 3 Case 2 Unconstrained M P C TV 7 160 9 20 30 5 Joint Angle Setpoint Link Deflection Setpoint mo MPC mv-ref MPC Controller Output Feedback • Joint Angle -Input Torque Unk Deflection Flexible-link Manipulator System Radians to Degrees 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 0 -E" E, tz o 'XJ -5 • jo -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 10 12 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 MPC 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 MPC 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 P a y l o a d Ident i f icat ion 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 "0 0 1 0 0 0 0 0 1 0 As = , Bs = 0 NaN NaN NaN NaN 0 NaN NaN NaN NaN (4.12) 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 mp, Jp can be calculated by solving the following equations using the elements of the identified system matrix B: 0.404 + 4.197m +9.167J p- p- = B(3) 0.769 + 17.669J + 8.0m „ + 0.959Jm P P P ( 4 1 3 ) -2.049m - 0.229 -3.028J„ p- p- = B(4) 0.769 + 17.669^ + 8.0mp + 0.959J pmp Next computer simulations are carried out to test the accuracy of the system identification module. An MPC 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 single-link 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 B = 0 0 0.524358 -0.263886 (4.14) By solving equation (4.13) the unknown system payload is obtained as: m = 0.38kg jp =9.794391e-004kg.m2. 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 mp = 0.765593kg , Jp =0.001766kg.m2. u 11 I I I I I I I I l 1 0 1 2 3 4 5 6 7 8 9 10 Time (seconds) 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). E 1 z 0 5 inpu 0 ntrol -0.5 o U -1 4 5 6 Time (seconds) - 1 r _i I I i_ 4 5 6 Time (seconds) 10 Figure 4.24 Case 2: Input and output responses of the single-link flexible manipulator (double the nominal payload). 1 3 0 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 F u z z y T u n e r 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 rw = 25 mm and the control input constraint (maximum control input allowed) is ru = 6 N.m. 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 , Qw , and Ru are determined. These are summarized in Table 4.2. Table 4.2 Effects of the MPC tuning parameters. Controller Parameters Functions Undesired Side Effects Reduces joint angle overshoot; increases stability. Can slow down the system response. Increases the computational load. Qw 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. 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 THEN IF THEN os. osw osB osw osu 1 L L L 17 M vs VS 2 L M L 18 S L S 3 L S S 19 S M VS 4 M L L 20 S S VS 5 M M M 21 S VS vs 6 M S S 22 vs L vs 132 IF THEN IF THEN 7 S L S 23 VS M vs 8 S M S 24 VS S vs 9 S S s 25 VS VS vs 10 L L M 26 L VS s 11 L M s 27 M vs s 12 L S vs 28 S vs s 13 L VS vs 29 L S M 14 M L M 30 M S s 15 M M S 31 S S s 16 M S VS 32 VS s vs 4.5 C o m p u t e r S imu la t ions 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 MPC 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 MPC parameters for both cases. Here Ts is the time step; rw is the link deflection constraint; ru is the control input constraint; H s e n , Qw s e n , and Ru sen are the sensitivity parameters of the tuning actions; Hu is the control horizon; and Q 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 re is the joint angle setpoint; H ini is the initial prediction horizon; Hp end is the final prediction horizon generated by the fuzzy tuner; Qw ini is the initial value for the link deflection weight; Qw end is its tuned value; Ru ini is the initial input rate weight; and Ru 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 MPC 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 MPC controller for the single-link manipulator. Ts (ms) rw (mm) ru (N.m) TJ p _sen Q-w sen D u _sen Qyw 10 25 6 4.8 4.6 9.6 9 20 Table 4.5 Tuning parameters of the MPC controller for the single-link manipulator. re Hp_ini Hp_end Qwini Qw _end Ru_ini Ru_end Case 1 Tt ~6 100 530 l 7.8 1 3.0 Case 2 Tt 3~ 100 584 l 14.4 1 6.8 Case 3 n ~1 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 I I I I I I I I 0 1 2 3 4 5 6 7 8 Time (seconds] 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 I I I I I l I i I I 0 1 2 3 4 5 6 7 8 9 10 Time (seconds) Figure 4.34 Case 3: Link tip deflection responses with LMPC. 8 6 4fr -4 -_ 6 o I I I I I I I I I 1 0 1 2 3 4 5 6 7 8 9 10 Time (seconds) 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 of 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: fx, = 1.9397 Hz , fn = 7.2546 H z , fn = 94.2847 Hz , / I 4 = 257.3687 Hz Link2: / 2 1 =1.1442 H z , fn = 11.1224 H z , / 2 3 = 31.1435 H z , / 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 (/ 1 2 = 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 62. In Chapter 2 we have 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 62 0 ] r . In this case the 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 MPC 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 two-link 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 2 ( * ) . * i i ( * X ^ is the state vector, u(k) = [ux(k),u2(k)f is the input vector, and y(k) = ^9x(k),02(k),wtip x(k),wtip 2(k)~J is the output vector. The system inputs w,(A:)and u2(k) are the joint torques. The outputs are the joint angles 0x(k), 62(k) and the link deflections wtip x(k),wtip 2(k) at the ends of the links. The cost function of the MPC controller is + Z ^ _ 2 + m - r9i J + Qw2 [y4(k + /1 k)f (5.2) i=i ^ ' +Jj_Ru xAux(k + i-\\k)2 +Ru 2Au2(k + i-l\k)2j i=i where r0< and rdi 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 2 V 1 ' (5.3) -5 mm < y3 (k + i | k) < 5 mm -20 mm <yA(k + i\k)< 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 fu =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' MPC 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 p s e n J , Hpsen_2 , Qw_senJ , Qw_sen_2 , R u s e n J , and R u sen 2 The larger values of the prediction horizon tuning actions of the two links are used in the controller tuning; specifically AHp=max(AHpJ,AHp2) (5.4) 5.3 Computer Simulation of I M P C The developed intelligent model predictive control (IMPC) scheme is now simulated for motion control of the two-link flexible robotic manipulator. The system payload is taken to be nominal. Figure 5.1 shows the Simulink simulation block diagram of the system. The plant is represented by a nonlinear dynamic model of 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. Llnkl Deflection Link2 Dal taction Two-link Flexible Manipulator System Control Input w i l h 2 mode Radian* Joint Angle2 to Deo,'"* 1 Link! Deflectk 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 MPC controllers are tested and their closed-loop system responses are compared. The first MPC controller uses a linear model linearized at the initial link positions, incorporating only the first flexible mode. The second MPC controller uses a linear model linearized at the initial link positions, and incorporating the first two flexible modes. The third MPC 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 MPC controllers. From Figure 5.3 it is seen that if MPC 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 -6 1 : ^ :' ; ;''. '. \ i i [ftTTii f >; ;! i ! i i Ii; '.; il './ ' i I i i i i i -;l I I I I I 1 1 — 1 0 1 2 3 4 5 6 7 8 Time (seconds) 10 1 1 — 1 1 1 1 1 \ / I / -1 I \ f ! 1 1 1 1 2-mode piecewise linear • 1-mode linear • 2-mode linear i i -11 I I I I I I I 1 0 1 2 3 4 5 6 7 8 Time (seconds) 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 MPC controller parameters for both cases. The joint angle setpoints and the MPC 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 MPC 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 (mm) (N.m) p sen 1 Qw sen 1 D u sen 1 Qyw _\ 5 6 7.8 2 2.5 5 40 Link 2 rw_2 (mm) ru_2 (N.m) ^ p sen 2 Q *^ w sen 2 R u sen 2 Q , 20 6 7.8 3.2 1.05 40 147 Table 5.2 Tuning parameters for the MPC controller of the two-link manipulator. Linkl re_\ re_i Hpjni H p_end Qw _ini _\ Qw_end _\ Ru_ini_\ RU_end_\ Case 1 n ~6 n ~6 100 594 l 11.6 1 8.1 Case 2 TV ~6 n T 100 845 5 25.7 5 22.4 Case 3 3~ n 200 1100 10 34.1 10 36.1 Link 2 Qw ini 2 Qw _end _2 - ^ u _ / • « / _ 2 D lxu_end_2 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 Final tuned response ntermediate responses 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! I I I I I I I 1 0 1 2 3 4 5 6 7 8 Time (seconds) Figure 5.6 Case 1: Link tip deflection responses of link 1 with IMPC. 200 -200 •Initial response Final tuned response Intermediate response Time (seconds) Figure 5.7 Case 1: Link tip deflection responses of link 2 with TMPC. -p- 10 <-> -10 -40 Input constraint 7 Final tuned M P C input Time (seconds) Figure 5.8 Case 1: Control input for link 1 with IMPC. 50 T 40 30 20 Initial input Intermediate input Input constraint 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 15 10 B ^ 5 tz O tt I 0 -10 -15 -20 -25 • Link 1 • Link 2 / A -\f\l 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 Time (seconds) 12 14 16 Figure 5.13 Case 3: Joint angle responses of link 1 and link 2 with LMPC. 25 20 15 10 h E £ 5 -10H -15 -20 -25 - Link 1 • Link 2 / 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 I I I I I I I 0 2 4 6 8 10 12 14 16 Time (seconds) 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 MPC 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 FLMS forms the test-bed 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/m3), high strength (yield strength = 255 MPa) and ease of 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 FLMS 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. Actuation subsystem: • 2 Harmonic-drive motors with optical encoders H D Systems RHS-20-3012-E 0 5 0 D O RHS-32-3018-E 0 5 0 D O • 2 P W M amplifiers Advanced M o t i o n Control 12A8 25A8 • 1 D C Power supply Advanced M o t i o n Control PS16L72 Measurement subsystem: • 1 Bridge type loadcell Futek L I 6 0 5 (251b) • 1 Signal conditioner Transducer Techniques T M O - 1 • 1 Power adapter Transducer Techniques A P D - 1 2 V D C • 2 Optical encoders H D Systems E 0 5 0 D O • 1 Analogue ultrasonic proximity sensor Honeywel l PK104015-11 Data acquisition subsystem: • 1 M o t i o n control interface card ( ISA bus) Servo-To-Go STGII-8 • 2 50-pin screw terminal blocks National Instruments C B - 5 0 L P • 1 Pentium III personal computer L C F Advanced Technology • Operating system Microsoft Windows N T 4.0 Workstation • C++ software Microsoft V i sua l C++ 6.0 157 Graphic User Interface Software Package Developed using Visual C++ Pentiumlll 733MHz National Instruments CB50-LP 50-Pin Screw Terminal Block (ToP2) Ultrasonic Proximity Sensor Transducer Tecnhiques APD-12VDC Power Adaptor a Amplified Sensor Signal Transducer Techniques TMO-1 Signal Conditioner 8V Excitation Milli-Volt Sensor Signal Futek L1605 (25LB) Load Cell Servo-To-Go STGII-8 8-Axis ISA Bus Motion Control Interface Card National Instruments CB50-LP 50-Pin Screw Terminal Block (To P3) Position Feedback Signal +5V Power Line Position Feedback Signal Advanced Motion Control 25A8 PWM Amplifier Advanced Motion Control PS16L72 Unregulated Power Supply Advanced Motion Control 12A8 PWM Amplifier H.V. Driving Signal H.V. Driving Signal HD Systems Harmonic Drive Gearing Motor RHS-25-3018-E050DO Built-in Optical Encoder HD Systems Harmonic Drive Gearing Motor RHS-20-3012-E050DO Built-in Optical Encoder Figure 6.2 Schematic diagram of the electrical system of the manipulator. 6.1.1 Actuation Subsystem The actuation subsystem includes two DC servomotors, two matched pulse-width modulation (PWM) amplifiers and a DC power supply. A DC servomotor is located at each joint of the manipulator. These motors are used to control the motions and contact forces of the manipulator. DC 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 HD 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 DC motor. Two PWM amplifiers, 12A8 and 25A8, from Advanced Motion Control are selected to drive the HD harmonic-drive motors. The specifications of the PWM amplifiers are summarized in Table 6.3. A DC 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 DC power supply, PS16L72, from Advanced Motion Control is selected to complement the PWM 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 PWM amplifiers. Model Number 12A8 25A8 Manufacturer Advanced Motion Control Advanced Motion Control DC Supply Voltage 20-80 V 20-80 V Peak Current (2 sec. max.) ±12 A ±25 A Max. Continuous Current +6 A ±12.5 A Switching Frequency 33 kHz 33 kHz Bandwidth 2.5 kHz 2.5 kHz Table 6.4 Specifications of the DC power supply. Model Number PS16L72 Manufacturer Advanced Motion Control Input Voltage 120V A C Output Voltage 72VDC Nominal Output Current 10A 6.1.2 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. An 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 DC 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 6L„ =• 360° 360° ^x500xl00 4x500x100 = ( l . 8 x l 0 ~ 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. 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 6.1.3 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 PWM 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 . 360° 0 = iFNC (6-2) E N C 4x100x500 where iENC 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 pcv is given by P =—^— (6.3) P c v 4096 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 25 (6-4) lADC 4096 8 where iADC is the number of A D C counts and pvlb is the voltage to lb constant. 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,ip = iADcPcvPvcm + y c - y r (6-5) where pvcm =7.965 cm/V is the centimeter to voltage constant, yc =22.61 cm is a constant value obtained from calibration of the sensor, and yr = 30 cm is the distance between the final link tip position and the sensor reference surface. The analog output voltage range of the card is ±10 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 (ux, u2) for each joint. Following equations are used to . convert the joint torque inputs into digital control signals: iDACl=409.6Vml +0.5 = 409.6^- + 0.5 6 0 (6.6) / D , C 2 =409.6^_2 +0.5 = 409.6^ + 0.5 where iDAC x and iDAC 2 are the D A C counts for joint 1 and joint 2, respectively. Vin , and Vin 2 are the analog output voltages. Their values can be calculated from the torque inputs as V V =— (6 7) inj g ' ' » _ 2 2 165 The digital control signals (iDAC ,,iDAC 2 ) from the computer are converted into analog signals (Vin ,, Vin 2) through the D A C of the motion control card. The resulting analog signals are then sent into the PWM Amplifier to generate the control torques (w, ,u2) which drive the DC motors. A personal computer is needed for processing the input signals and generating the control signals. A Pentium III 733 MHz PC with Windows NT 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 Up to 8 channels of analog input 13 bit resolution Configurable as ±10 V or ±5 V spans Analog output Up to 8 channels of analog output +10 V to-10 V span 13 bit resolution Digital input and output 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 J H I * I Ne ijoard Test 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 'ADC, ' 'DAC, ' 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 DC 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-to-analog 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 A x i s l |0 0073 Axis 2 [0 0183 A M 3 {3 6145 Axis 4 |01757 Axis 5 Axis 6 P S " Axis 7 rc i s i i i i j Graph™ •••MMm«B—«BEa •• • • • •nnuHonr I 875 1 25 Q025 tslll 0 825 -1 25' •I 875 2 5 :• a -3 75 -4 375 •5 • H H H E I B K J I H H H n a ADC Conversion - ! <• Voltage [+A5V] C Count - Graphic Display C Axis 1 j r Axis 2 C% Axis 4 (* f Axis 5 C Axis 6 C Axis 7 P Axis 6 -71 6 73 72 4 Time in seconds txit -w Figure 6.4 Analog-to-digital conversion dialog box. 168 Digital to Analog Conversion Axis 1 F Axis 2 I -Axis 3 F Axis 4 I -Axis 5 r Axis S I -Axis 7 r~ Axis B r Output [Volt]' Send to Axes Change/Step • Exit gure 6.5 Digital-to-analog conversion dialog box. Encodei Readings Axis 1 Axis 2 Axis 3 Axis 4 • Axis 5 ji -Axis 6 • jj" Axis 7 j;''' Axis 8 Encoder Counts 10584194 83B8736 0= E l l ZeroEncodersAII Figure 6.6 Encoder count dialog box. Encoder Cnt Angle |deg] Output |V] Speed mm , . „• , , max Axis 1 |10584194, |1905 F ~ ' s ' ' ' 1 -orwrl | , Reverse Axis 2 lisiiilMi [rj ( 0 — • . . y . . ' ' ' ' * Forward | Reverse Axis 3 |o F ~ (5 , , , , , , , • • • i Forward Reverse 1 1 1 ' Forward j Reveise Axis 4 |0 , I D ™ • • • y • • Axis 5 |8 . ' Jl509 |0 ' ' • ,<) • • • 1 1 1 1 . Forward | Reverse lliiiiiiil Axis 6 i°. r | 0 — [5 1 •>' • • • • 1 1 1 Forward 1 Reverse ' F ~ F " Axis 7 jo 1 ' ' 1 Forward j Reverse IT" • • • s - • • Axis 8 ID F ~ ' ' ' 1 Forward j Reverse Emergency Stop j ZeroEncodersAII j Exit Figure 6.7 Manual control dialog box. The 'Control' option on the pull down menu of the FLMS 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 MPC 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 MPC 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 . Input Rate Weight [ "j Stewtng Angle (deg] | MaK-Mai* rv.je [ ! S^PIolPoW j-,.Slo DIXJL _•••••••[: • •••• •••• ••••• ] • • • • • • • X J L J D L • • • n n . „,]| ft, ..it I • • • a u a n a n n . ":JL3L jqnn ••••••• ••••••• •••••• • • • • • • • • • • • • • • • • • • • • • • • • a j m d g u n r x • • • • • • • • • • b d u u L i D • • • c a r : • • • • • n p ^ • • • • • • 1 ••••••• ••••••• J U U L i U U i ] • • • • c u 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 MPC 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 Input Parameters Description Control Axis Axes 1 through 8 can be selected for control. Prediction Horizon Prediction horizon H of the MPC controller. Control Horizon Control horizon Hu of the MPC controller. Output Weight The link deflection weight Qw of the MPC controller. Input Rate Weight Input rate weight Ru of the MPC 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. The FLMS 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. All 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 high-resolution 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 built-in 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 FLMS Dialog Box is shown in Figure 6.11. The menu item is linked to five dialog boxes including 'ADC, ' 'DAC,' '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 Main Application Program GUI.h GUI.cpp FLMS Dialog Box with pull down menu Class name: CGUIDIg GUIDIg.h GUIDIgxpp Servo To Go Motion Control Card Driver Funcgen.h Galliv.h Ntdrvr.h Offset.h Omnisem.h Pcloud.h Pidalg.h Portio.h Stg_comn.h Stg_io.h Sigcmd.h Stgdefs.h Trajgen.h Triwave.h Stgjo.cpp Trlwave.cpp Gallilv.cpp A/D Conversion Dialog Sox Class name: ADCDig AOCDIg.h AQCDlg.cpp D/A Conversion Dialog Box Class name: COACDIg DACOIg.h DACDIg.cpp Encoder Readings Oialog Sox Class name: CENCODERDIg ENCODEP.Olg.ll ENCO0EP.Dlg.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. Class CGUIDIg Detect if any menu item is selected Send the corresponding COMMAND event Catltrw subroutine; CGUIDIg ;:OnB«:ardt«*tAtl c(} Call th* subroutine: C<3UtOl9::On80artitMitOicO Cail to ditpiay th* ADC Dialog Bo*: Call me subrwrtifw CGttf Gig; i OrsB«» Wto slEm wfc t{) C*H to dmplay the DAC Dialog Bo* : ro_dacdlg.QoModa! Q Cst! the eubrouti(W: COUtOlg: :On Soil fttts*tManw»tcontrot}j Cat! to display Iho Encoder Dialog Box: Tn_«n.coderdl9,DoMod atf J Cat! tNumtKOUtliw: CaB to display the Manual Control Dialog Box r mja anuatctridtg .DoModa Ifl Cat) to display the MPC Motion Control Oialog Box 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 PWM amplifiers. The PWM 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 yr =30 cm. The link tip position can be obtained by using equation (6.5). The 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 ytip measured < 12 cm. Two different cases of motion configuration are tested on the FLMS. The desired joint angle for Case 1 is 30° and for Case 2 it is 60°. First, the MPC controller parameters are determined based on the dynamic model of the system using the fuzzy tuner, as we have done in Chapter 4. The MPC 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 bx, = 0.1. Model error is unavoidable because these are not the true 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 MPC controller parameters on line. Table 6.10 MPC controller parameters. re Qw K Case 1 530 9 20 7.8 3.0 7 Case 2 n 584 9 20 14.4 6.8 6~ 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 Time (seconds) 10 12 Figure 6.14 Case 1: Control input (experiment and simulation). Time (seconds) Figure 6.15 Case 2: Joint angle responses (experiment and simulation). 120 100 80 •S 60 h 40 20 - Experiment • Simulation 7 8 Time (seconds) 10 12 Figure 6.16 Case 2: Tip position responses (experiment and simulation). Experiment Simulation 1-5 h -0.5 ' ' ' 1 1 1 1 0 2 4 8 8 10 12 Time (seconds) 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. An 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 MPC 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 MPC 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 MPC 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 flexible-link manipulator systems. 183 Bib l iog raphy 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 Control, 2nd Edition, Addison-Wesley Publishing, Inc., Reading, M A , 1995. 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. 734-739, 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 Predictive Control," 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, CA, 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. 177-189, 1991. [22] De Silva, C.W., Intelligent Control—Fuzzy Logic Applications, CRC Press, Boca Raton, FL, 1995. [23] De Silva, C.W., Mechatronics—An Integrated Approach, Taylor & Francis/ CRC Press, Boca Raton, FL, 2005. 185 [24] De Silva, C.W., Vibration—Fundamentals and Practice, 2" Edition, Taylor & Francis/ CRC Press, Boca Raton, FL, 2006. [25] De Silva, C.W., Sensors and Actuators—Control System Instrumentation, Taylor & Francis/ CRC 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 Two-Link 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. 186 [36] Karray, F. and C W . de Silva, Soft Computing and Intelligent Systems Design, Addison-Wesley Publishing, Inc., New York, NY, 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, UK, 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. 431-452, 2002. [46] Li , 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 - Theory for the User, 2nd Edition, Prentice-Hall, Inc., 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. 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 Feedback Design, Addison-Wesley Publishing, Inc., Reading, M A , 1989. 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 - User's Guide, Version 6, The Mathworks, Inc., Natick, M A , 2003. 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, UK, 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 Flexible-Link 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 Vibrations, 3rd Edition, Addison-Wesley Publishing, Inc., 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 Predictive Control: A Practical Approach, CRC Press, 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. 93-109, 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. 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, NY, 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, UK, 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. 2097-2102, 1996. [97] Yurkovich, S. and A.P. Tzes, "Experiments in Identification and Control of Flexible-Link 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 +mp zX-CW/o (A.1) ; "m,\ V l A Z (*i )S\J w E hj ( x i ftj 7=1 7=1 +20, + be0x =r, 7=1 7=1 The deflection equation for they'th mode of the link: 192 V i r J • + Z I' pAj (*i M* to + m A (A M* (A)+ y A ' (A M*' (A) 4=1 "m'1 T r'i " Z I' M , to, M* to +m A (A M* (A) +0){J2 m, + mp<t>Xj (/, f + Jpfrj' (/, )2 *.,(0 + M ; = 0 (A.2) 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 The numerical values of the elements of the system matrix A are: ,4(1,1) = 0, ,4(1,2) = 0, ,4(1,3) = 1, ,4(1,4) = 0 ,4(2,1) = 0, ,4(2,2) = 0, ,4(2,3) = 0, ,4(2,4) = 1 212.32m „ + 23.708 + 313.804./.. ,4(3,1) = 0, ,4(3,2) = 0.769 +17.669J p + 8.0mp + 0.959Jpmp -0.081-0.839m -1.833./ ,4(3,3) = p- p-0.769 +17.669Jp + 8.0m, + 0.959Jpmp 0.205m +0.023 +0.303J 4^(3 4 ) = p I 0.769 + 17.669J, + 8.0m, + 0.959Jpmp -210.861-103.643J -103.643mn ,4(4,1) = 0, ,4(4,2) = 0.769 +17.669Jp + 8.0m, + 0.959Jpmp 0.41m +0.046 + 0.606/ ,4(4,3) = " A(4,4) = 0.769 + 17.669./, + 8.0m, + 0.959Jpmp -0.203 -0AJp-0. Imp 0.769 + 17.669J, + 8.0m, + 0.959J,m, (A.3) The numerical values of the system matrices B and C are: 193 B = 0 0 0.404 + 4.197mn +9.167J p p 0.769 + 17.669/p + 8.0m,, + 0.959Jpmp -2.049m -0.229 -3.028JD p p 0.769+ 17.669J +8.0mn + 0.959J m p p P P C = 1 0 0 0 0 2.049 0 0 0 0 0 0 0 0 0 0 For the nominal payload (mp = 0.38kg ,Jp = O.OOlkg.m2), the numerical values of the system matrices A , B and C are: "0 0 1 0 0 "1 0 0 0 0 0 0 1 0 0 2.049 0 0 A = B = C = 0 27.350 -0.105 0.026 0.524 0 0 0 0 0 -65.394 0.0528 -0.063 -0.264 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) y(k) = Cx(*) The numerical values of the system matrices A , B and C are: A = C = 1 0.001366 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 B 2.62e-005 -1.318e-005 0.005239 -0.002634 (A.4) 194 A.2 Two-link Flexible Manipulator Model + Rigid body equation for link 1: 'Thx+Jh2+Joi+Jo2+Jp +m/2 +(m2+mh2+mp) [/,2 + wf (/,, r ) ] (m2 + 2mp) l2 [w, (/,, 0 sin (a, + 62) + /, cos (a, + 62)] 2 [/, sin (a, + 62) - w, (/,, 0 cos (a, + 62)] £ [ / 4 2 , + /w p^ y. (/2)] £ 2 j (0 i Z ^ ( ' 2 ) ^ ( o r'i I I I "'"'2 + 1 ' A Z ^; (*i (0 dxi + f A Z &y ( *2 )<?2,- (0 dx. i=l 6>, - m2 + mp 1 / 2 [ Wj ( / j , /) sin (a, + 6 * 2 ) + / , cos (or, + 6>2)] ''m,2 - [/, sin (ax + 62) - wx (/,, 0 cos (or, + 92)] £ [ ^ 2 , + C2)] <?2y (0 7=1 + I 0 2 A ^ Z ^ ( ^ ) ^ 2 ; ( 0 <ix2 + mp Z ^ ( W ) 7=1 /, (w2 +/wA2 +/n /,) + ^ 7 w 2 + /w p j / 2 cos(a , + #2) " „ , 2 - sin (ax + 6>2) X [ 7 4 2 , + mPAj (h)] ^ 2 , (0 7=1 + 4 + —w2 + m p ) /2 [w, (/,, t) sin (or, + #2) + /, cos (ax + 02)] /, sin (or, +& 2) -w, (/,, 0 cos (a, + 6*2) + )0P2 Z ^2jMS2J(t) "m,2 7=1 dx2 + m p f » „ 2 V Y.<f>2j(h)s2j(t) V7=l 7=1 7=1 L V 2 [w, (/,, 0 sin (ax + 02) + lx cos (a, + 02)] [/42, + mp<f)2} (l2)] £2y (0 7=1 (m2 + 2mp ) l2 wx' (/,, 0 [/, sin (a, + 62) - ( / j , t) cos (or, + 02)] - (m2 + 2mp ) w, (/,, t)\l2 sin (a, + 62) + 2wx (/,, r)] + 2 (wp - mh2) w, (/,, t)wx (/,, 0 w/ (/,, 0 [w, (/,, t) sin (or, + 02) + lx cos (a, + <92 )] -wx (/,, 0 cos (a, + 6*2) "m,2 +2 [/, sin (a, + 02) - w, (/,, 0 cos (a, + 02)] £ [/42y + ™ A &)] 4, (0 +2 -2Px[\^Xj(xx)dXj(t) ^.(x.yi.o) V 7=1 J V 7=1 7 ( "m.l \ f "m.l -2P2 U £ ^ 7 ^ A ( 0 Z^(*2)4y(0 7=1 dx V7=l V7= fn. -2m „ £^.(/ 2)j 2 ;(0 £^(/2)(J2/o V7= (m2 + 2w p ) / 2 w,' (/,, r) [/, sin (ax +02)-wx (/,, t) cos (a, + 62)] +2 [/, sin (a, +01)-wl (/,, 0 cos (a, + 02)] £ [li2j + mp(/)2j (l2)] S2j (t) +2w1'(/„0[w1(/1,0sin(a1 + 0 2) + /, cos (a, + 02)] £ [ / 4 2 y + m 2^y(/2)]^(0 ; f "m.l \ f"m.l - 2 A Z ^ ( * 2 A (0 Z ( * 2 )4i (0 7=1 V7=l -2m. v>i A» f(/n2 + 2m p ) /2 [/[ sin (ax + 92) - w, (/,, 0 cos (a, + f?2)] +2 [w, (/,, 0 sin (a, + 02 ) + /, cos (a, + 62)] [/42y + m 2^j (/2)] £2y (0 >0, 9X62 — m2 + mp 112 [/, sin(ax +&2)~w\(h>0cos(ai + @2)] ft2 + [ w, (/,, 0 sin (a, + #2) + /, cos (a, + 6>2)] £ [/42, + m^ 2 y ( / 2)] £2y (r) » » , 2 2 [/, sin (a, + 02)-wl (/,, 0 cos (a, + 02)] £ [h2J + mpAj (h)] ^27 (0 -w,'(/„0 -2p 2 { o 2^^ 2,(x 2)^.(0 || £ (^*2)4y(0 -2m, Y.^MiAiji.t) zl^jMS^ii) \ 7=1 y v 7=1 y v 7=1 'HI,2 dx-, w,'(/,,0 - m2 + /w /, sin (a, + 6*2) -w, (/,, t) cos (a, + 6>2) + wx (/,, t) sin (aj + #2) +/, cos (a, + #2) "m,2 y 'h2j ZJ _ 7=1 _+mp02j(l2)_ + beA = *i ( A . 5 ) Rigid body equation for link 2: -m2 + mp 1 / 2 [ w, (/,, 0 sin (or, + #2) + /, cos (or, + <92)] "m,l - [/, sin (a, + 0 2) - w, (/,, 0 cos (a, + 02)] [/42y + mp(/>2j (l2)] tf2y (0 7=1 + +tpJ^zj^ys2J{t) Jn2+J02+Jp+™f2 J ("m,2 + J0V2 Ji4iM2)S2J(t) dx2 + mp V 7 = 9 dx2 + mp V7'=l 0, 1 9 7 + + -m1+mpjl2cos(al+92) "m.l - sin (a, + 02) Z (lA2J + mp<p2i (l2)) 82j (t) Jh2+Jo2+Jp+mPl2 7=1 r;2 ("m-2 + ]02P2 Z f a j M S i y i O \ 7=1 <ix2 + m p A n„,2 ^ 2 X^,(/ 2 )^(o V 7 = l Z A / C W / O 7=1 7=1 <U0 + Z 7 1 2 7 + Jphj' (h ) + W „ / 2 ^ (h ) (w2 + 2mp) / 2 Wj (/,, t) sin ( « j + 02) "m ,2 +2w, (/,, 0 cos (ax + 62) £ [ / 4 2 , - + ™ A (h)] ^ (0 7=1 + 2 A f f Z ^ (*2 )*2, ( ' ) ] f Z <f>2J (*2 )$2j (0 +2m + 4 .7=1 y V 7 = i dx. V 7 Z ^ ('2)^ y(0 X M W y O A 7=1 6>, — >772 + mp 1 / 2 [/, sin (a, + f92) - wl (/,, 0 cos (a, + #2)] + [ w, (/,, 0 sin (a, + 62) + /, cos (a, + <92)] Z [h2j + ('2)] 5ij (0 7=1 ; f "i».2 A/ ' "m,2 2 A Z Ay (*2 )A, (0 Z Ay (*2 )4y (0 fl2 +2m Z A y ( W y ( 0 |ZAy(4)4y(0 V7'=l A 7=1 w, (Lt) + 02 + bee2=r2 ( A . 6 ) 198 Deflection equation forjth mode of link 1: ( 1 ^ h ( m 2 + m h 2 + m P ) + \ - m 2 + m p / 2 C 0 S ( « , +(92) "w , 2 - sin (a, + 02) [l42k + mp<f>2k (l2)] S2k (t) k=\ J h 2 + J o 2 + J P + m p l 2 — m2 + mp\lz [ w , ( / , , O s i n( ai + &2) + h cos (a, + #2)] T,[Im+mP^k(h)]^2k(t) /, sin (a, + f?2) -w, (/,, 0 cos (a, + #2) + J 0V 2 Z^t(x 2 )S 2 k (t) dc2 + wp + + mp l2 cos (a, + #2) "m.l sm(al+02)YJ[lm+mp<f>2k(l2)]S2k(t) + + k=\ J o 2 + J h 2 + J p + m P l 2 fn. <t>u(h)02 fn.. + \^ P2\YJ(t>2k(X2)S2k(t) r'i [(w2 + « A 2 Jx2 + AW^ 4=1 ~m2 + m p j ^ 2 C 0 S ( a i + ^ ) + -sm(al+02)^[l42k+mp<f>2k(l2)~\S2k(t) k=\ \ \ — m2+mp l2cos[ax+02) •'m.l *=1 -sin (a, + 0 2 ) £ [ / 4 2 * + (Uj^ tCO k=l dx. + t P2^ZAk(X2)S2k(0 "m,2 + cos (a, + 02) faj (/, )Z [/42* + mpA* (^ )] 4 (0 4=1 V i r - 1 . . + ^ / ( A ) Z Jnk+JpAk'i^ + MphAkih) 4(0 4 = 1 L J + {EI\ J' fa." (x, ) Z (x,)8xk (t)dxx 4=1 (m2 + 2m, ) l2 sin (« , + 92) w,' (/,, <*) " ™ . 2 +2 sin (a, + <92) £ [l42k + mp</>2k (l2)] <52i (0 4=1 " m , 2 +2 COS (a, + 0 2 ) W , ' ( / , , 0Z [ 7 4 2 i + mp<t>2k (l2 ) ] <^24 (0 4=1 | ^m 2 + 2m, ) / 2 sin (or, + #2) ^ (h > 0 "m,2 +2 cos (a, +02)wl(ll,t)YJ[lm +mp02k(l2)~\d2k(t) , ("m,2 \ f »m,2 + 2 f A Z A* (*2 ) ^ 2 4 (0 Z A* ( X 2 )4u (0 +z™P [ Z A* ('2 )^ col fz At (/2 )4 (0^ dx. 200 rty (A) dxn ^ (A) (/w2 + 2mp) /2 sin (a, + 02) vv,' (/,, " » . , 2 +2 sin (a, + 62) £ [ l m + mp(j)2k (/2)] 82k (t) k=\ "m,2 +2 cos (a, + 02) w,' (/,, r)Z [ 742* + w p r t i C2)] <?2* (0 k=l , f "m.l ^ f "m .2 2 £ A Z rt * (*2 (0 Z rt * o 2 )4i (0 +2™, f Z rt* & )*2* (ol f Z rt * (/2 )4 (0 (w2 + 2wp) /2 sin (a, + 02) "m,2 +2 cos (a, +^ 2)£[/ 4 2 i + r o p r t * ( / 2 ) ] < 5 2 * ( 0 *=i Jf A r t y (*i )Z rt* (*i )3* W i^ k=l ( 1 ^ (TM2 + W A 2 +/n/,)w,(/1,0 + ^ -/w2 +wpJ/2sin(o;1 + #2) + cos (a , + 02) [y~42t + mp<t>2k (/2)] J 2 i (0 k=l — m2 + mp 1 /2 [/, sin (a, + 02) - w, (/,, t) cos (a, + 02)] ft rty Ci) fl2 "/n,2 + [ w, (/,, 0 sin (a, + &_) + /, cos (a, + 02)] £ [/42i + mp<j>2k (l2)] £ 2 A (0 rt/C.) • W7- + mp /2 sin (a, + 6>2) "m.l + cos(a, + 2^)Z[/42* + O T A( / 2 ) ]^ (0 *=i — m2 + mp 112 sin (a, + #2) rty(W2 "m,2 + cos(a, + 2^)Z[/42i + w p r t i ( / 2 ) ] ^ ( 0 *=1 rty (/,) - i2 201 "m,2 2 sin (a, + 6>2) ^ (/, [I m + mp<f>2k (l2)] 52k (t) k=\ , ("m,2 \ ("m,2 2 f A £ 02* (*2 )^ 2* (0 S ^ (*2 )4 (0 +2m ^£^(4)^(oYl^(/2)4(o A 4=1 J \ k=l dx. W / C ^ O + ^ A =0 (A.7) ft Deflection equation for yfh mode of link 2: rw1(/,,0sin(a1 + 62) + Jp<f>2j (h) + mpl2faj (/2) + +/, cos (a, + <92) ^ +Jp<t>2j'(l2) + m M 2 j ( l 2 ) 62 + C 0 S ( « , +(9 2)[/ 4 2 > +^ > ( / 2 ) ] £^ t ( / 1 >5 i t ( 0 [ / 4 2 ; +OT^ 2 ; . ( / 2 ) ] *=1 + 7 1 2 y + JPAj' ih ) + m M 2 j (l2 ) nm,2 +™P02j i.h ) £ e 2 )4 ( 0 + V 2 )Z c 2 )4 (0 + ( ^ ) 2 ( * 2 ) E ( *2 ) ^ 2 t (OdX; Z ^ ^ ^ 1 * W + In2 A^2y ( X 2 ) £ ^ 2 * ( *2 ) ^ 2 * W ^ 2 t=l *=1 *=1 ft L A ^ 2 i ( *2 )Z ^ 2 * ( *2 ) J 2 * ( 0 ^ 2 + ™ A ' ( Z 2 >Z ^k ( Z 2 ) ^ 2 * (0 4=1 k=l ~ [_hlj + m P 0 2 j (l2 ) ] W] (A » 0 S i n ( « 1 + #2 ) + ™l (Zl > 0 £ A ^ 2 > (*2 )Z ^ ( *2 ) ^ 2 t ( ^ 2 + W A ' (4 >X ^ k (l2 )52k (0 4=1 4=1 " f P 2 # z ; ( *2 )X ^24 ( *2 ) < 5 > 2* ( 0 ^ 2 ~ (h >S ^ 4 ( *2 ) ^ 2 4 (0 4=1 4=1 | + [/42y + mp</>2j (l2)] [/, sin (a, + 0 2 ) - w, (/,, 0 cos (a, + 02)] J f>2 "m'2 r p2^y ( x 2 ) <p2k (*2 ^ co* "m,2 +W^2 y(/2)Xi^2t (^ 2 )^2* (0 0, e k=\ + b2jS2j=0 (A.8) 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 and s ignal wires o f the F L M S are connected according to the diagram g iven i n F i g u r e B.4. Graphic User Interface Software Package STGII-8 Windows NT Driver Pentiumlll 733MHz O • ODD • •S° iQ CB50-LP 50-Pin Screw Terminal Block (Connect to PZ) 50-Pin Ribbon Cable STGII-8 Motion Control Interface Card (Connect lo ISA slot of the PC motherboard) 2 4 6 e 10 14 16 CB50-LP ~20~ 50-Pin 22 Screw 24 Terminal 26 Block 28 (Connect 30 to P3) 32 34 36 38 40 42 le" 48 50 Analog Grid Analog Out Ultrasonic Proximity Sensor c PowerGnd APD-12VDC ACPowerGnrJ .12VDC Power Adaptor A C input I2QVAC 1:+12VDC 2; Power Grid 3: Analog Gnd 4; Analog Out TMO-1 Signal Conditioner + Excitation -Signal 'Signal -Excitation •Shield To AC Power Bar Shielded Signal Cable L1605 (25LB) Load Cell Mulrt-core signal cable 25A8 PWM Amplifier 1 -Ref In 5 •Motor 2 2 Power Gnd 3 Power Gnd 4 High Voltage 5 P1 • Raf In 4 -Ret In 5 12A8 PWM -Motor 1 •-Motor 2 Power Gnd 3 Amplifier P2 Power Gnd 4 High Voltage 5 PS16L72 Hign Voltage +72VDC DC Power Gnd DC Power Supply AC Power Gnd AC Input 120VAC 9-Pin Connector Harmonic " M Drive Gearing Built-in Motor Optical •M RHS-25-3018-Encoder E050DO J i Harmonic Drive Gearing Built-in Motor Optical ^ M RHS-20-3012-Encoder E050DO 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 iagram o f the prototype m a n i p u l a t o r system. 2 0 5 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. Jumper J4: Watchdog Time-out Jumper J3: DAC Latch on Interrupt Connector PI: 24 Bits of Digital I/O Jumper J5: Watchdog Timer Enable Jumper J7: Timer 2 Input Jumper J2: Analog Input Range Connector P3: (Insert a jumper: +-5v Encoder Input and n o jumper: +-1 Ov) Analog Output for Axis 0-3 Connector P4: Encoder Input and Analog Output for Axis 4-7 Jumper Jl: Base Address Selection Connector P5: Battery Backup Input 206 C.2 Connections 8 Channel Encoder Input and Analog Output Connectors Connector P3, Motion I/O Axis 0-3 Pin Name Pin Name 1 Analog Gnd 2 DAC0 3 Analog Gnd 4 Analog Gnd 5 DAC 2 6 Analog Gnd 7 Analog Gnd 8 DAC 1 9 Analog Gnd 10 Analog Gnd 11 DAC 3 12 Analog Gnd 13 Gnd 14 A 0 + 15 A 0 - 16 Gnd 17 B0 + 18 B 0 -19 Gnd 20 10 + 21 10- 22 Gnd 23 A 1 + 24 A 1 -25 Gnd 26 B 1 + 27 B 1 - 28 Gnd 29 I 1 + 30 I 1 -31 Gnd 32 A2 + 33 A 2 - 34 Gnd 35 B2 + 36 B 2 -37 Gnd 38 12 + 39 12- 40 Gnd 41 A3 + 42 A 3 -43 Gnd 44 B3 + 45 B 3 - 46 Gnd 47 13 + 48 13 -49 +5 50 +5 Connector P4, Motion I/O Axis 4-7 Pin Name Pin Name 1 Analog Gnd 2 DAC 4 3 Analog Gnd 4 Analog Gnd 5 DAC 6 6 Analog Gnd 7 Analog Gnd 8 DAC 5 9 Analog Gnd 10 Analog Gnd 11 DAC 7 12 Analog Gnd 13 Gnd 14 A4 + 15 A 4 - 16 Gnd 17 B4 + 18 B 4 -19 Gnd 20 14 + 21 14- 22 Gnd 23 A5 + 24 A 5 -25 Gnd 26 B 5 + 27 B 5 - 28 Gnd 29 15 + 30 15 -31 Gnd 32 A 6 + 33 A 6 - 34 Gnd 35 B6 + 36 B 6 -37 Gnd 38 16 + 39 16- 40 Gnd 41 A 7 + 42 A 7-43 Gnd 44 B 7 + 45 B 7 - 46 Gnd 47 17 + 48 17-49 +5 50 +5 207 32 Bit Digital I/O, 8 Channel Analog Input and Sign Bit Output Connectors Connector PI Dig ital I/O Pin Name Pin Name 1 Opto-23, C7 2 Gnd 3 Opto-22, C6 4 Gnd 5 Opto-21, C5 6 Gnd 7 Opto-20, C4 8 Gnd 9 Opto-19, C3 10 Gnd 11 Opto-18, C2 12 Gnd 13 Opto-17, CI 14 Gnd 15 Opto-16, CO 16 Gnd 17 Opto-15, B7 18 Gnd 19 Opto-14, B6 20 Gnd 21 Opto-13, B5 22 Gnd 23 Opto-12, B4 24 Gnd 25 Opto-ll,B3 26 Gnd 27 Opto-10, B2 28 Gnd 29 Opto-9, Bl 30 Gnd 31 Opto-8, BO 32 Gnd 33 Opto-7, A7 34 Gnd 35 Opto-6, A6 36 Gnd 37 Opto-5, A5 38 Gnd 39 Opto-4, A4 40 Gnd 41 Opto-3 A3 42 Gnd 43 Opto-2, A2 44 Gnd 45 Opto-1, A l 46 Gnd 47 Opto-0, AO 48 Gnd 49 +5V 50 Gnd Connector P2, Analog & Digital I/O Pin Name Pin Name 1 ADC Chan 0 2 Analog Gnd 3 ADC Chan 1 4 Analog Gnd 5 ADC Chan 2 6 Analog Gnd 7 ADC Chan 3 8 Analog Gnd 9 ADC Chan 4 10 Analog Gnd 11 ADC Chan 5 12 Analog Gnd 13 ADC Chan 6 14 Analog Gnd 15 ADC Chan 7 16 Analog Gnd 17 Opto-15, D7 18 Gnd 19 Opto-14, D6 20 Gnd 21 Opto-13, D5 22 Gnd 23 Opto-12, D4 24 Gnd 25 Opto-11,D3 26 Gnd 27 Opto-10, D2 28 Gnd 29 Opto-9, DI 30 Gnd 31 Opto-8, DO 32 Gnd 33 IN2 34 Gnd 35 INI 36 Gnd 37 IN0 38 Gnd 39 EXLATCH 40 Gnd 41 T2GATE 42 Gnd 43 TA2 44 Gnd 45 /WATCHDOG 46 Gnd 47 NC 48 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
Thesis/Dissertation
10.14288/1.0080738
eng
Mechanical Engineering
Vancouver : University of British Columbia Library
University of British Columbia
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.
Graduate
Intelligent model predictive control of flexible link robotic manipulators
Text
http://hdl.handle.net/2429/31300