User’s Guide for the Puma RTK

 

The Puma RTK is comprised of two main components:  (1) the Simulink model and (2) the Graphical User Interface (GUI).  The user’s control of the Puma is done via the GUI, while changes to the Simulink model should be made only when the user must customize the control algorithm(s) to a specific application.  The User’s Guide concentrates on each of the two main components discussed above.  An overview of the Simulink system model is first discussed, followed by an introduction to the GUI with detailed explanations of the various screens that give the user access to the control modes available in the RTK.  Each operating mode is then discussed with explanations of the control algorithms and references to the mathematical derivations.  Finally, the operating procedure for the Puma is provided.  It is assumed that the user has some previous knowledge of Simulink and the related terminology involved in discussions of model design and execution.

 

The User’s Guide is organized as follows:

 

·        Simulink Model Overview

·        GUI Features Overview

·        Calibration Mode

·        Zero Gravity / Teach Pendant Mode

·        Joint Control Mode

·        Position Blender Mode

·        Test Mode

·        Maintain Position Mode

·        Simulation Mode

·        Operating the Puma RTK

 

NOTE: The current version of the Puma RTK for MATLAB 6.1 was developed based on the original version for MATLAB 5.3.  The original version was developed by Dennis Moses and implemented more control modes, such as external trajectory and cartesian control that became obsolete in the current version.  These obsolete modes were removed due to file size constraints in MATLAB 6.1 but can be referenced by selecting the appropriate menu item in the Puma 560 Control Panel.  The user should refer to the GUI Features Overview section of this user’s guide for more information on how to reference the original Simulink model for MATLAB 5.3.  References to the original RTK manual are also available in the control panel menu.

 

 

 

 

 

 

 

 

 

Simulink Model Overview

The Simulink block diagram is organized as described in the subsequent sections to facilitate the addition or removal of different modes of operation and/or auxiliary hardware components. As shown below, the Simulink block diagram can be divided into three main sections including: the Input section, the Computation section, and the Output section.

 

 

Figure 1: Main Simulink model of Puma RTK

 


Input Section

The Input section of the Simulink block diagram provides the input interface between the Puma 560 and the RTK. That is, every signal that is read into the SRTK from the Puma 560 and the GUI including the encoder values, the potentiometer values, the desired joint angles, and the desired Cartesian positions is located in this section along with input signals from the GUI, such as the desired end-effector position.  If a user does not incorporate any additional hardware with the Puma 560, the Input section will not need to be modified unless the user wants to place additional scopes on the diagram to observe the input signals. If a user adds additional hardware to the Puma 560, then the user would be required to include new inputs in this section. In addition to the input signals from the Puma 560, the Input section also has selector switches incorporated, which link the GUI to the Simulink block diagram. That is, the selector switches allow a means for a user to select between the different operating modes from the GUI. 

Mode Select

This subsystem accepts the Mode value as an input and outputs an enable signal that selects the corresponding control mode subsystem according to the Mode gain block.  The outports, located on the right side of the subsystem, are connected to the corresponding control mode subsystems in the main Simulink model.  Clicking the Go There button in the Puma 560 Control Panel will change the values in the starter and Start Blend gain blocks, depending on the control mode.

 

Figure 2:  Puma Mode Select subsystem

Read Joint Position

Input from the I/O hardware consists of reading the motor encoders and converting these encoder values to radians.  In normal operation the joint position being read from the motor encoders will be used in the control mode calculations.  However, when the simulator is enabled, the joint position values will be read from inport 1 that is connected to the Joint Update Scope in the main block diagram.

 

Figure 3: Puma Read Joint Position subsystem

 

Arm Enable Digital Input

The arm enable feedback bit is read from the Arm Enable subsystem in the main block diagram.  Depending upon the controller hardware setup, a low value ‘0’ or high value ‘1’ indicates that the arm has been enabled.  The RTK assumes that a low value for the enable bit indicates the arm has been enabled.  If the user’s hardware is the latter case, then changes must be made to the hardware or the user can simply add a NOT logic gate to the input to invert the signal.  If the NOT gate is added, the model puma.mdl must be re-compiled.

 

Computation Section

The Computation section incorporates the mathematical details for the various modes of operation for the Puma (see subsequent sections of this manual for more information regarding the different operating modes) as separately labeled subsets (masked blocks). Each of the operating modes is a separate subsystem that is enabled or disabled as desired using the GUI through the selector switches described in the previous Input section. One of the advantages of the RTK is that the GUI is constructed using standard MATLAB functions (see the MATLAB users manual), and hence, if a user needed to incorporate additional functionality in the RTK, the user could simply modify the existing Simulink block diagram and then either create a new GUI or modify the existing GUI to incorporate the additional functionality. Details regarding specific functions that can be utilized for GUI construction are located in the MATLAB users manual, and the MATLAB program that was utilized to construct the original RTK GUI is included in the following directory.

 

            {BASE DIRECTORY}/Simulink RTK/Puma/Tools/puma/GUI  

 

Output Section

The Output section of the diagram provides the output interface between the Puma 560 and the RTK, along with some special functions such as the Calibration Mode (see subsequent sections of this manual for more information regarding the Calibration Mode). That is, every signal that is sent from the RTK to the Puma 560 and any additional hardware is located in this section. If a user does not incorporate any additional hardware with the Puma 560, the Output section will not need to be modified unless the user wants to place additional scopes on the diagram to observe the output signals. If a user adds additional hardware to the Puma 560, then the user would be required to include new outputs in this section. In addition to the signals output to the Puma 560, the Output section also incorporates the Puma 560 dynamic model to facilitate real-time simulation (see subsequent sections of this manual for further information regarding the real-time simulation mode) of the Puma without activating the hardware. The Output section also has a safety feature embedded that enables the RTK to avoid commanding excessively high voltage or torque values to the Puma 560. A termination block is also included in this section for Windows users to allow the RTK to disable the arm-power at the end of the real-time simulation mode.  Although all the output signals to the Puma 560 are generated from the Output section, the “Enable Arm Power” and “Disable Arm Power” functions reside in the computation section so that the user cannot accidentally enable the arm power without applying any control to the Puma.

 


Output to DAC

The Output to DAC subsystem provides a means for the motor voltages to be output to the STGII I/O card via the DAC channels.  Therefore, extra outputs (channel 6 and 7) is included in the subsystem and could be utilized by the user for a unique function.  The Voltage Scale gain block transforms the motor torques to motor voltages.  The voltage scale multiplier value is set by the user in constants.m and is described in the Operating the Puma 560 RTK section of this manual.  The saturation and selector switch blocks are included in this subsystem to reset the DAC to 0V if the voltage limit of the STGII is exceeded.  In addition, a positive signal is output to stop the real-time execution for added safety if the voltage limit is exceeded.

 

Figure 4: Puma Output to DAC

 

Joint Update Scope

The figure below shows the Joint Update Scope that is included in the Output section of the main Simulink model.  Joint position values (in degrees) are connected to the scope and updated in real-time.  The graphical functions of the RTK poll the data buffer of the scope to update the Puma display in the Display screen of the Puma 560 Control Panel.  The joint position vector signal is also fed back to the Read Joint Position subsystem and read as the current joint position when the RTK simulator is enabled.

 

Figure 5: Puma Joint Update Scope

 


Tools Subsystem

The Tools subsystem is used by the RTK to send command signals to the seven additional outputs of the STGII I/O board.  This may be useful if the user desires to add a tool to the end-effector of the Puma.  When the user selects different digital outputs in the Tools screen of the Puma 560 Control Panel, a high value of ‘1’ is set to the corresponding bithigh gain block in the Simulink subsystem.  Unselecting the digital output in the GUI will set the bithigh gain value to ‘0.’  The arm enable output requires digital output channel 0; therefore, this output channel is unused in the Tools subsystem.

 

Figure 6: Puma Tools subsystem

 


Termination Subsystem

The Termination subsystem is used to disable the arm enable bit once the MATLAB real-time code is stopped.  This arm enable reset must be done else the digital output could remain ‘high’ after the real-time code is terminated.  The real-time code may be stopped when the user manually stops real-time execution or if the run time expires (refer to Simulation Parameters in Tools menu of Simulink model).  The M-file function disableArm.m is called each time the Simulink model execution is stopped, which sets the Disable Arm gain in the Termination subsystem to ‘1.’  Likewise, the M-file function enableArm.m is called each time the Simulink model execution is started, which sets the Disable Arm gain in the Termination subsystem to ‘0.’

 

 

Figure 7: Puma Termination subsystem