Humanoid Robot Development of a simulation environment of an entertainment humanoid robot Pedro Daniel Dinis Teodoro Orientador: Professor Miguel Afonso Dias de Ayala Botto Co-orientador: Professor Jorge Manuel Mateus Martins Lisboa-September-2007 INTRODUCTION Goal Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video State of Art Objectives The creation of the strong foundations for future This thesis was developed inincollaboration with Robosavvy Ltd developments humanoid robots. and boosted the creation of the Humanoid Robotics Laboratory of IDMEC-Center of Intelligent Systems, at Instituto Superior Técnico (http://humanoids.dem.ist.utl.pt/ ). 2 INTRODUCTION Goal State of Art Objectives Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Current commercially available humanoid robots are designed to perform motions using open-loop control. These robots are usually not able to move on uneven terrain and it is difficult or impossible to get them to perform movements that require instantaneous reaction to momentary instability. 3 INTRODUCTION Goal State of Art Objectives Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video 1. The establishment of a real-time protocol communication between the PC, using Matlab/Simulink® and the robot 2. The identification of internal and external properties of the humanoid robot. 3. LQR implementation for stabilizing the humanoid robot on a high bar. 4 SET UP Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid robot Hardware Architecture Software Architecture Bioloid humanoid robot from Robotis.com CM5 Controller AX12+ Servo •1 MBps •the maincommunication controller of theSpeed. humanoid. •Full feedback Position (300o),data Speed, DC •57600 bps to on receive/transmite current, Voltageand andPC Temperature. through servos •Can be set as an endless wheel. •High Torque servos (1Nm). 5 SET UP Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid robot Hardware Architecture Software Architecture Humanoid control architecture 6 SET UP Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid robot Hardware Architecture Software Architecture C-MEX S-function written in C to communicate with the CM-5 throughout UART (universal asynchronous receiver / transmitter). C program for Atmega128 for completing the serial communication bridge. We have now a way to identify the parameters of the humanoid models making online experiments. 7 IDENTIFICATION Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Mechanical Properties DC Servo Properties DC Servo Identification Mathematical Model Close Loop Pos Open Loop Speed Measured signals Schematic of joint and link for two different humanoid configurations. 8 IDENTIFICATION Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Mechanical Properties DC Servo Properties DC Servo Identification Mathematical Model Close Loop Pos Open Loop Speed Measured signals Possible internal block diagram control of the servos. 9 IDENTIFICATION Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Mechanical Properties DC Servo Properties DC Servo Identification Mathematical Model Close Loop Pos Open Loop Speed Measured signals Experiments suggest that the servos do not have internally any angular velocity feedback control. Servos have an internal feedback position control loop 10 IDENTIFICATION Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Mechanical Properties DC Servo Properties DC Servo Identification Mathematical Model Close Loop Pos Open Loop Speed Measured signals Dead-zone effect due to Experiments show that the stiction. In our case this was output estimated velocity error clearly quantified to be around is proportional to the voltage 7-10% of the full range. supplied to the servo. 11 IDENTIFICATION Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Mechanical Properties DC Servo Properties DC Servo Identification Mathematical Model Close Loop Pos Open Loop Speed Measured signals The dynamic characteristics of the servo are well captured by the BJ model. TF Box Jenkins (2,1,2,1) was found to best approximate the desired dynamical behavior of the servo. 0.06217 z z 2 1.469 z 0.5544 12 SIMULATOR Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid model SimMechanics simulator Virtual Reality animation The humanoid is treated as a three body serial chain in an inverted pendulum configuration. 13 SIMULATOR Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid model SimMechanics simulator Virtual Reality animation The system is underactuated, being the motion of the legs and torso prescribed in order to stabilize the full body of the humanoid above the high bar. 14 SIMULATOR Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video The humanoid model SimMechanics simulator Virtual Reality animation Parent-Child hierarchy 15 CONTROL Guide Equations of motion State-Space model Linear Quadratic Regulator The equations m l l cos q for a m l of motion generic n-link underactuated I , i j inverted pendulum deduced from m m , i j the Euler-Lagrange equations. g m l cos q Introduction Set Up Indentification Simulator Control Results Conclusions Video n ij k k k j k a a j b c k b i c j j i b c d 1 d min( b ,c ) k ji ij n i k k i a 1 a k a b 1 b n hi Ci m ij , j i min( b ,c ) Ci mk lblc q d k i b i c 1 j i d 1 n k k 2 b c sin qd min( b ,c ) , iff min( b, c) 1 d 1 n b c m l l k b c qd min( b ,c ) b i c i j i d 1 k m ij k i m11 m12 m 21 m22 mn1 mn 2 m1n q1 1 h1 1 m2 n q 2 2 h2 2 mnn q n n h3 n k b c sin qd min( b ,c ) , iff min( b, c) 1 d 1 and lc i k li i li i k 16 CONTROL Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Equations of motion State-Space model Linear Quadratic Regulator in order to use linear control algorithms, the system dynamics is linearized, using a first order Taylor's expansion at the vertical unstable equilibrium, q=[π/2,0,0]T and q =[0,0,0]T. x Ax Bu 0 0 0 A 74 . 2389 81.5857 7.3471 0 0 0 117.8764 348.7777 230.9113 0 0 0 0 0 0 B 176.2065 97.5517 527.7831 467.2635 467.2635 697.9566 0 0 0 0.0028 76.0776 215.8591 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 State-space vector x q1 , q2 , q3 , q1 , q 2 , q3 2 Link 1 (Arms) Link 2 (Torso) Link 3 (Legs) l (mm) 143.6 115.8 184.0 lc (mm) 68.7 57.5 116.3 m (g) 367.6 981.5 576.4 Physical properties I (gcm2) 7890.7 32898.6 11328.0 17 CONTROL Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video Equations of motion State-Space model Linear Quadratic Regulator analyzing the zeros and poles of the system, it can be concluded that system is a non-minimum phase one Linear Quadratic Regulator was chosen, which provides a linear state feedback control law for the system u k T x Wothout Angle compensation With Angle compensation 18 RESULTS Ideal servo Servo resolution Gyro resolution Servo dead-zone Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video 19 CONCLUTIONS Achieved Control Recommendations Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video This project has successfully achieved the creation of the strong foundations for future developments in humanoid robots. 20 CONCLUTIONS Achieved Control Recommendations Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video LQR strategy was successfully applied in the stabilization of the humanoid on a high-bar although only in simulation and without the nonlinearities of the servos. 21 CONCLUTIONS Achieved Control Recommendations Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video New gyroscope New nonlinear model containing the dynamics and nonlinearities of the servos New nonlinear controller (e.g. Sliding mode control) 22 VIDEO Guide Introduction Set Up Indentification Simulator Control Results Conclusions Video 23 Humanoid Robot Development of a simulation environment of an entertainment humanoid robot Pedro Daniel Dinis Teodoro Orientador: Professor Miguel Afonso Dias de Ayala Botto Co-orientador: Professor Jorge Manuel Mateus Martins Lisboa-September-2007