Home > arte3.2.0 > lib > load_motors.m

load_motors

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function motors = load_motors(indexes)

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   LOAD_MOTORS Loads a matrix containing the mechanical and electrical data
               of a set of motors from Maxon Motors.

   For example:
     robot.motors = LOAD_MOTORS() returns a matrix where each row defines the
   data of a particular model. The motor catalog can be found under
   practicals/session3_inverse_dynamics/motor_catalog
      

   Example: 
   robot =  load_robot('abb', 'IRB140')

   robot.motors =  load_motors()
   robot.motors(1,:)

   
    See also LOAD_ROBOT.

   Author: Arturo Gil. Universidad Miguel Hern�ndez de Elche. email:
   arturo.gil@umh.es date:   02/01/2013
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %   LOAD_MOTORS Loads a matrix containing the mechanical and electrical data
0003 %               of a set of motors from Maxon Motors.
0004 %
0005 %   For example:
0006 %     robot.motors = LOAD_MOTORS() returns a matrix where each row defines the
0007 %   data of a particular model. The motor catalog can be found under
0008 %   practicals/session3_inverse_dynamics/motor_catalog
0009 %
0010 %
0011 %   Example:
0012 %   robot =  load_robot('abb', 'IRB140')
0013 %
0014 %   robot.motors =  load_motors()
0015 %   robot.motors(1,:)
0016 %
0017 %
0018 %    See also LOAD_ROBOT.
0019 %
0020 %   Author: Arturo Gil. Universidad Miguel Hern�ndez de Elche. email:
0021 %   arturo.gil@umh.es date:   02/01/2013
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 
0024 % Copyright (C) 2012, by Arturo Gil Aparicio
0025 %
0026 % This file is part of ARTE (A Robotics Toolbox for Education).
0027 %
0028 % ARTE is free software: you can redistribute it and/or modify
0029 % it under the terms of the GNU Lesser General Public License as published by
0030 % the Free Software Foundation, either version 3 of the License, or
0031 % (at your option) any later version.
0032 %
0033 % ARTE is distributed in the hope that it will be useful,
0034 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0035 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0036 % GNU Lesser General Public License for more details.
0037 %
0038 % You should have received a copy of the GNU Leser General Public License
0039 % along with ARTE.  If not, see <http://www.gnu.org/licenses/>.
0040 function motors = load_motors(indexes)
0041 
0042 %these correspond to Maxon, 167132;
0043 
0044 global configuration
0045 
0046 
0047 
0048 % R (Ohm): Coil resistance
0049 % L (H)  : Coil inductance.
0050 % Kv (V/rad/s): speed constant
0051 % Kp (N·m/A): torque constant
0052 % Max_current (A): Max allowable current in the coil.
0053 % Max_speed (rad/s): Max allowable speed of the motor
0054 
0055 % please note the constans to translate the units to
0056 
0057 motors= [];
0058 
0059 
0060 Inertia=[];
0061 constants = [];
0062 Viscous = [];
0063 Coulomb= [];
0064 for i=1:length(indexes),
0065     switch indexes(i)
0066         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0067         %   INDEX 1
0068         % MOD: 264443, EC22
0069         % 50W,  Brushless
0070         % Vin=32 Volt
0071         % Peak torque: 411 mN·m
0072         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0073         case 1
0074             Inertia= [Inertia 4.63/1e7]; %4.09 g·cm2= 4.09/10^7 Kg·m^2
0075          
0076             constants = [constants;  
0077       % R(Ohm)  L(H)             Kv            Kp       Max_current  Nominal_speed
0078         0.997   0.147e-3  1/(746*(pi/30))   12.8/1000   32.1         21400]; 
0079     
0080             Viscous = [Viscous 0];
0081                               %C+ C-
0082             Coulomb = [Coulomb; 0 0];
0083         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0084         %   INDEX 2
0085         % MOD: 118895, EC40
0086         % 120W,  Brushless
0087         % Vin=30 Volt
0088         % Peak torque: 1340 mN·m
0089         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0090         case 2
0091             Inertia= [Inertia 85/1e7]; %85 g·cm2= 4.09/10^7 Kg·m^2
0092          
0093             constants = [constants;  
0094       % R(Ohm)  L(H)             Kv            Kp       Max_current  Nominal_speed
0095         0.518   0.32e-3  1/(389*(pi/30))   24.6/1000   57.9         10500]; 
0096     
0097             Viscous = [Viscous 0];
0098                               %C+ C-
0099             Coulomb = [Coulomb; 0 0];
0100             
0101        
0102         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0103         %   INDEX 3
0104         % MOD: 266052, EC-4pole 45
0105         % 200W,  Brushless
0106         % Vin=48 Volt
0107         % Peak torque: 4420 mN·m
0108         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0109         case 3
0110             Inertia= [Inertia 200/1e7]; %85 g·cm2= 4.09/10^7 Kg·m^2
0111          
0112             constants = [constants;  
0113       % R(Ohm)  L(H)             Kv            Kp       Max_current  Nominal_speed
0114         0.566   0.172e-3  1/(183*(pi/30))   52.2/1000   84.8         8110]; 
0115     
0116             Viscous = [Viscous 0];
0117                               %C+ C-
0118             Coulomb = [Coulomb; 0 0];
0119        
0120         
0121         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0122         %   INDEX 4
0123         % MOD: 283150, EC-4pole 45
0124         % 300W,  Brushless
0125         % Vin=48 Volt
0126         % Peak torque: 7690 mN·m
0127         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0128         case 4
0129            Inertia= [Inertia 368/1e7]; %85 g·cm2= 4.09/10^7 Kg·m^2
0130          
0131             constants = [constants;  
0132       % R(Ohm)  L(H)             Kv            Kp       Max_current  Nominal_speed
0133         0.710   0.677e-3  1/(84*(pi/30))   114/1000   67.6         3570]; 
0134     
0135             Viscous = [Viscous 0];
0136                               %C+ C-
0137             Coulomb = [Coulomb; 0 0];
0138             
0139         %%%%%%%%%%%%%%%%%%%%%%%%%%
0140         %   INDEX 5
0141         % MOD: 167132, EC60
0142         % 400W,  Brushless
0143         % Vin=48 Volt
0144         % Peak torque: 11800 mN·m
0145         %%%%%%%%%%%%%%%%%%%%%%%%%%%
0146         case 5
0147            Inertia= [Inertia 831/1e7]; %85 g·cm2= 4.09/10^7 Kg·m^2
0148          
0149             constants = [constants;  
0150       % R(Ohm)  L(H)             Kv            Kp       Max_current  Nominal_speed
0151         0.345   0.273e-3  1/(113*(pi/30))   84.9/1000   139         4960]; 
0152     
0153             Viscous = [Viscous 0];
0154                               %C+ C-
0155             Coulomb = [Coulomb; 0 0];
0156             
0157             
0158             
0159         otherwise
0160             disp('PLEASE SELECT A VALID MOTOR!!')
0161     end
0162 end
0163          
0164  motors.Inertia = Inertia;
0165  motors.constants = constants;
0166  motors.Viscous=Viscous;
0167  motors.Coulomb = Coulomb;
0168         
0169 % %Actuator rotor inertia
0170 % motors.Inertia=[200e-6 200e-6 200e-6 33e-6 33e-6 33e-6];
0171 %
0172 % %Speed reductor at each joint
0173 % %motors.G=[300 300 300 300 300 300];
0174 % %Obtained from motor catalog under practicals/inverse_dynamics
0175 % %                        R(Ohm)  L(H)      Kv (V/rad/s):speed constant     Kp (Nm/A):torque constant        Max_current (A)
0176 % motors.constants=[0.345  0.273e-3       2.3474e-05               84.9e-3                 139; %these correspond to Maxon, 167132;
0177 %     ];
0178 %
0179 % %Viscous friction referred to the
0180 % motors.Viscous = [0 0 0 0 0 0];
0181 %
0182 % %Coulomb friction factors, motor referred
0183 % %Tc+, Tc-
0184 % motors.Coulomb = [0    0;
0185 %             0    0;
0186 %             0    0;
0187 %             0   0;
0188 %             0   0;
0189 %             0   0];
0190 %
0191 %
0192 %     end
0193

Generated on Fri 03-Jan-2014 12:20:01 by m2html © 2005