Pick and Place Robot Simulation James Beukers Jordan Jacobson ECE 63 Fall 4 December 6, 4
Contents Introduction System Overview 3 3 State Space Model 3 4 Controller Design 6 5 Simulation and Results 7 6 Future Work 9
Introduction Industry is becoming more automated with machines and robots doing a lot of the work. One very common machine used in assembly lines is the pick and place robot. Some examples of pick and place robots include machines that place IC components on printed circuit boards, assembly line robots that construct parts of automobiles, and robots that place products into packaging. The size of the robotic systems, and the number of degrees of freedom that they have will vary depending on the specific task the robot is to complete. Whatever the application may be, the robots need to be precise, and reliably controlled. This report presents a design of a pick and place robot state feedback control system along with a mathematical model, and simulation results for the controller. A literature review was performed before the design was started to determine what contributions could be made to the current pick and place robot standards. It was quickly discovered that there are not many scholarly articles on pick and place robots. Most of the work that has been done with these machines has been performed by corporations that do not publish their work for the public to access. Due to the inability for us to review the work that has already been accomplished in this field a design for a simple robotic system was created. Our goal was to create a system that is similar to the ones that are used in industry that would be compared to the industrial machines, and used as a starting point that could be built upon and improved by future scholarly projects. The remainder of this paper is outlined as follows: First, an overview of the system is presented. Second, the process by which the state space model for the system was derived is reviewed. Third, the design of the state feedback controller is described. Fourth, the results of the MATLAB simulation of the control system are discussed. Finally, some areas of possible future work are suggested.
System Overview The mechanical system that the controller is being designed for will be made up of a conveyor belt with metallic objects on it, a robotic arm with r, z, and θ motion, and an electromagnet mounted on the end of the robotic arm that can turn on and off to pick up Ill and drop the objects. Fig. shows a drawing of the robotic arm from both a side view and a top view. Objects are placed on the conveyor belt with their x and y position on the belt generated by a random number so that no two objects are in the same x and y position on the belt. The robotic arm receives the object location from sensors, and moves appropriately to pick up the object. r I ~ Figure : Schematic of Robotic Arm The movement of the arm in the r and z directions is performed by hydraulic rams, the underlying hydraulic system from which the mathematical model was derived for both the r and z axis is shown in Fig.. Most of the equations for the hydraulic systems were taken from a Mechatronics textbook by de Silva[]. A hydraulic pump provides a desired pressure to the system, and then a spool valve is used for direction control to send the pressure to 3
the correct side of the piston to move the load one way or the other. - /////, A(b fittf' CQ'.f ;,, f"'t ( i,v) -/-y/n~ialll Ge-r ftatf -t - ()-- Figure : Hydraulic System 4
The rotational motion about the z axis is performed by a DC motor. The equations of motion for a DC motor were used in the derivation of the state space model. For this project the hardware will not be implemented. The mathematical models for the actuators described so far have been generated in MATLAB and Simulink in order to simulate a software model of the system. In order for the simulations to be successful an environment with some dynamic objects was created for the pick and place model to interact with. 3 State Space Model The first step in generating the state space model was deriving the equations of motion for the system. Using the hydraulic system model shown in Fig. and the well known model for a DC motor we were able to derive the equations of motion. They are shown in (), (), and (3). z = π 4M total (d d )P z g () r = π 4M (d d )P r () θ = T J total (3) The original system presented in our proposal was to have six inputs and seven outputs. These inputs and outputs are described in Table. The states for the system were selected from these inputs and outputs. Initially the plan was to have states for both the positions and velocities of the r, θ, and z variables. It was found that the system was completely controllable with the use of only the positions as states. Because of this the velocity states were removed from the system to minimize the number of calculations that needed to be performed. Doing this reduced the number of continuous states down to three. The system was much faster after this reduction, and was still able to be controlled. The state space model was developed using the equations of motion and the selected 5
Table : Table. System Inputs and Outputs Inputs Outputs r: Radial arm position r: Radial arm position θ: Angular arm position θ: Angular arm position z: Vertical arm position z: Vertical arm position v: Velocity of belt ṙ: Radial arm velocity x: X position of object on belt θ: Angular arm velocity y: Y position of object on belt ż: Vertical arm velocity L: Electromagnet on/off states. The states are defined in (4), the inputs in (5), and the outputs in (6). The state space model is shown in (7) and (8). x = [r θ z] T (4) u = [P r T P z ] T (5) y = [r θ z] T (6) π 4M ẋ = x + (d d ) J total u (7) π 4M total (d d ) y = x (8) 6
4 Controller Design Once the state space model was complete the observability and controllability of the system was tested by finding the rank of the controllability and observability matrices. This analysis was performed in MATLAB. Both the controllability and observability matrices have full rank, so the system is controllable and observable. It was decided to use a state feedback controller to control the system. In order to use state feedback control, the gain matrix K needed to be determined. To find the gain matrix the pole placement method was used to determine where to put our poles, and then the place command was used in MATLAB. The transfer functions of our system were generated from the state space model. We found that the transfer functions for the r, θ, and z states were independent from each other, and each had only a single pole at the origin. From this we know that the system is inherently stable. The poles for each state could be placed at any desired location on the real axis in the S-Plane. 3.5 step response of R reference: 5 and R()= step response of theta reference.6 and theta()=.5.4. step response of Z reference 5 and Z()=4.9.8.7 Amplitude.5 Amplitude.8.6 Amplitude.6.5.4.4.3.5....5 Time (seconds).5.5 Time (seconds).5..5 Time (seconds) Figure 3: Step response of states after controller implementation A desired settling time was decided upon for each of the states being controlled. Using this desired settling time the poles were calculated. Fig. 3 shows the step response of each state in the system after the controller was implemented. It is important for this system to have either an over damped or critically damped response to ensure the robotic arm doesn t 7
overshoot the desired position and damage itself, or collide with something. As clearly seen in Fig. 3, the sysem is very stable with no overshoot. 5 Simulation and Results In order to effectively simulate the pick and place robot control system, a simulation environment was created in MATLAB. Fig. 4 shows an image of the environment that was created. As shown in the figure, a pick and place robot, a conveyor belt, objects to pick up, and a bin to place the objects in were all created to demonstrate the functionality of the system. Figure 4: MATLAB simulation environment The simulation of our system works very well. The only known bug in the software is an 8
issue that sometimes occurs with the electromagnet flag. This flag is set to most of the time. When the pick and place robot is in the correct position to pick up an object it is set to, and when it is in place to drop the object into the bin it is set to -. The way the code is written it should be impossible for the flag to have any value besides,, or -. However, sometimes while the simulation is running the flag gets set to - or +, which causes the simulation to throw an error and stop. As far as we can tell this bug has something to do with the way MATLAB passes variables in Simulink. We spent many hours trying to resolve this issue, but we were unsuccessful. Having said that, the simulation runs just fine about 5% of the time without this error being thrown. If we had more time to finish the project this is one thing that we would continue to look into in order to resolve. A good measure to show how well the controller is working on the system is the error between the desired robot arm location, and the actual location. Fig. 5, Fig. 6, and Fig. 7 show the two subplots for r, θ, and z respectively. In each case, the first subplot compares the desired and actual positions and the second subplot shows the error between the two. 6 Radial Distance: r Distance [m] Distance [m] 5 4 3 5 5 Time [s] Radial Error 3 Radial Error: Desired Actual Desired Actual 5 5 Time [s] Figure 5: Comparison of desired and actual radial position 9
Angle [θ] 5 4 3 Angular Distance: θ Desired Actual 5 5 Time [s] Angular Error Distance [m] Angular Error: Desired Actual 4 5 5 Time [s] Figure 6: Comparison of desired and actual angular position 7 Vertical Distance: z Distance [m] 6 5 4 Desired Actual 3 5 5 Time [s].5 Vertical Error Vertical Error: Desired Actual Distance [m].5.5 5 5 Time [s] Figure 7: Comparison of desired and actual vertical position
6 Future Work Several concepts that can be considered for future work on this project are velocity control, improved reference calculations, and analysis for optimal speeds and moving rates. Velocity control could be used to create smoother motions as the arm moves from one side to the other. This would also allow for better adaptability to increased conveyor belt speed; as the objects come faster the arm will increase speed accordingly. Improving the calculations for the reference inputs could be done to make the transitions between the drop off point and the conveyer belt smoother. Also, the reference inputs could specify more locations to place the objects, such as for stacking or sorting the different objects. An analysis can also be carried out to determine from the system characteristics which speeds are possible and how many objects can be moved in a certain time frame. This analysis would be usefull for many different applications including assembly lines, shipping and sorting of packages and many other applications where objects need to be moved from one point to another.
REFERENCES. C. W. de Silva, Mechatronics An Integrated Approach, st ed. New York: CRC Press, 5.. C. T. Chen, Linear System Theory and Design, 4th ed. New York: Oxford Univ. Press, 3.