User Tools

Site Tools


dbkim_ballbeam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dbkim_ballbeam [2019/06/02 04:43] dongbinkimdbkim_ballbeam [2019/06/02 14:05] (current) dongbinkim
Line 40: Line 40:
 To complete this tutorial, you'll need the following items <!-- in table below, replace ??? with relevant information and add additional lines if necessary --> To complete this tutorial, you'll need the following items <!-- in table below, replace ??? with relevant information and add additional lines if necessary -->
 <!-- Alternatively create: (1) a Google XLS document that's publicly viewable and provide link; and (2) a PDF version of the Google XLS, store the PDF file in your site, and provide link to it --> <!-- Alternatively create: (1) a Google XLS document that's publicly viewable and provide link; and (2) a PDF version of the Google XLS, store the PDF file in your site, and provide link to it -->
 +\\
 \\ \\
  
Line 50: Line 51:
 | Power Supply| Amazon          | https://www.amazon.com/COOLM-Adapter-100-240V-Doorbell-5-5X2-5MM/dp/B07D5B5Q28/ref=sr_1_3?crid=2G1KDMA9S5IYC&keywords=12v+2a+5.5+2.5&qid=1558564688&s=gateway&sprefix=12v+2a+5.5+%2Caps%2C185&sr=8-3            | 6.99 |  1   | | Power Supply| Amazon          | https://www.amazon.com/COOLM-Adapter-100-240V-Doorbell-5-5X2-5MM/dp/B07D5B5Q28/ref=sr_1_3?crid=2G1KDMA9S5IYC&keywords=12v+2a+5.5+2.5&qid=1558564688&s=gateway&sprefix=12v+2a+5.5+%2Caps%2C185&sr=8-3            | 6.99 |  1   |
  
 +\\
 \\ \\
   * For dynamixel motor control, the following article should be downloaded [[http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/| Dynamixel SDK]]   * For dynamixel motor control, the following article should be downloaded [[http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/| Dynamixel SDK]]
Line 55: Line 57:
   * 3D printing is required for the connector that links the dynamixel and the beam. (Ask [email protected] for the CAD file. Wiki wasn't able to upload here)   * 3D printing is required for the connector that links the dynamixel and the beam. (Ask [email protected] for the CAD file. Wiki wasn't able to upload here)
  
-==== Hardware Construction ====+===== Hardware Construction =====
  
 {{ bandb:bb_2.jpg?500 |}} {{ bandb:bb_2.jpg?500 |}}
Line 78: Line 80:
  
  
-==== Software Construction====+===== Software Construction=====
  
-A link to the source code can be found <provide URL to your codeprobably saved in this DASL Wiki>.+==== Prerequisites ==== 
 +To run this tutorial. The following should be completed 
 +  * ROS Tutorial - begineer/intermediate [[http://wiki.ros.org/ROS/Installation| ROS Website]] 
 +  * Dynamixel SDK tutorial -> read/write on dynamixel motor to change the position or velocity of joint [[http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/| Dynamixel SDK]] 
 +  * OPENCV Tutorial - Object recognitionObject position recognition [[http://www.daslhub.org/unlv/wiki/doku.php?id=opencv_tutorials|DASL OpenCV Tutorials]]
 \\ \\
-The goal of the code is <brief explanation> It works in the following way+==== MATLAB Simulation ==== 
 +{{ bandb:bb_3.jpg?500 |}} 
 \\ \\
----- +The above describe the MATLAB code for the simulation. The code on the right identifies the hardware specification of the ball-and-beam system. The equation of motion and transfer functions are computed in the following attached PDF(Code line could not be added on this post due to the crack that occurs when the author wrote this tutorial) 
-<!- Insert a snippet of your code here Try to keep to less than 0.5 page long --> +{{:bandb:equationofmotion_mcode.pdf|MATLAB_CODE}} 
-----+
 \\ \\
-The snippet above serves to <fill in the blank>It does this by <fill in the blank>.+{{ bandb:bb_4.jpg?500 |}}{{ bandb:bb_5.jpg?500 |}}
 \\ \\
----- +The top above figure describes the simulink of the ball and beam system. PID compensator is used to deal with the feedback. The bottom above figure describes the simulated results. The ball should settle in desired position around 2~3 seconds.  
-<!Insert another snippet of your code here Try to keep to less than 0.5 page long --> + 
----- +==== Robot Operating System Set-up ==== 
-Next, the code does <fill in the blank>.  It does this by <fill in the blank>  +\\ 
-<!-- Keep entering snippets of code and descriptions until you've given enough for a reader to understand how it works --+{{ bandb:bb_6.jpg?500 |}} 
-// +\\ 
-// +The above figure describes ROS scheme of the final ball and beam control systemThe control frequency is set to 100Hz. There are 3 nodes, Vision, PID Compensator, and the dynamixel controller. The nodes are sharing topics including position of the ball, motor position angle, and motor position angle feedback to control the ball to the desired point
-==== Final Words ====+\\ 
 +==Finalized codes are written in Pythonand it is not opened as this tutorial is built for the DASL's control class. For people outside of DASL, if you need the code. please email to the author. The author will explain more details. But prerequisites should have been done beforehand ==  
 +Email: <[email protected]> 
 +\\ 
 + 
 +===== Experiment Results ===== 
 +==== Trouble Shooting ==== 
 + 
 +The experiment is to target the ball to 30cm position from the motor. 
 + 
 +{{youtube>3b5U8-9r9GE?large}} 
 + 
 +The Video above shows that the system is not balancing the ball at all. It also shows that there is latency from the response
 + 
 +{{ bandb:bb_7.jpg?500 |}} 
 + 
 +The figure above shows that there's 0.2 second latency. The motor position is not responding well the the feedback motor angle.  
 + 
 +{{ bandb:bb_8.jpg?500 |}} 
 + 
 +The author tried to take measurement of the motor response time to approximate motor transfer function. The above picture shows how slow the dynamixel is. It takes 0.06 seconds to move every 5 degrees angle. The author then assumed the motor transfer function has like a first order system with 0.06 seconds rise time. The next 3 pictures describes the final simulink blocks as well as the simulation change with and without the latency. 
 + 
 +{{ bandb:bb_9.jpg?500 |}} 
 +{{ bandb:bb_10.jpg?500 |}} 
 +{{ bandb:bb_11.jpg?500 |}} 
 + 
 +Same condition with latency, The position of the ball shows the divergence. Even if the ball is positioned at 30cm, desired position. it will slowly rolling to get out of the beam. See the video below 
 + 
 +{{youtube>lLTkfMIeT50?Large}} 
 +\\ 
 +\\ 
 +==== Solution ==== 
 +\\ 
 +\\ 
 +{{ bandb:bb_12.jpg?500 |}} 
 +\\ 
 + 
 +To solve the troubleshooting described in the previous section, new gain system is added on the simulink. The gain number will drastically increase the motor feedback angle value, so the motor position can track the feedback much quicker. The simulation result and actual result are shown in the below. Also you can check it by the video 
 + 
 +{{ bandb:bb_13.jpg?500 |}} 
 +{{ bandb:bb_14.jpg?500 |}} 
 + 
 +{{youtube>38f2m0wrlfA?large}}
  
-This tutorial's objective was to <fill in the blank>Complete <choose: construction details, source code and program descriptions> for <fill in the blank>. Once the concepts were conveyed the reader could <fill in the blank>.+The video shows the result with gain of 25You can see the ball is controlled to reach at 30cm from the motor.
 \\ \\
 \\ \\
-Speculating future work derived from this tutorial, includes <fill in the blank>. In the big picture, the problem of <fill in the blank> can be solved with this tutorial.+===== Conclusion =====
 \\ \\
 \\ \\
-For questions, clarifications, etc, Email: <paul.oh@unlv.edu>+This tutorial describes single degree of freedom ball balancing system. The main goal of this tutorial is to teach senior undergrad or above (graduate student) classical control theory as well as conversion from simulation into the real life hardware application. The Robot Operating Systems(ROS) is used as software to run the hardware system. PID Compensator is used to deal with the ball position error, and give the feedback angle to the motor. As the motor has the latency for feedback response, additional gain compensation is given to solve the problem. The future work will describe full-state feedback control with different motor selection due to the dynamixel's latency is unforgiving. For questions, clarifications, etc, Email: <dongbin.kim@unlv.edu>
  
  
dbkim_ballbeam.txt · Last modified: 2019/06/02 14:05 by dongbinkim