dbkim_ballbeam
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dbkim_ballbeam [2019/06/02 04:43] – dongbinkim | dbkim_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 | | Power Supply| Amazon | ||
+ | \\ | ||
\\ | \\ | ||
* For dynamixel motor control, the following article should be downloaded [[http:// | * For dynamixel motor control, the following article should be downloaded [[http:// | ||
Line 55: | Line 57: | ||
* 3D printing is required for the connector that links the dynamixel and the beam. (Ask dongbin.kim@unlv.edu 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 dongbin.kim@unlv.edu for the CAD file. Wiki wasn't able to upload here) | ||
- | ==== Hardware Construction ==== | + | ===== Hardware Construction |
{{ bandb: | {{ bandb: | ||
Line 65: | Line 67: | ||
\\ | \\ | ||
**Step 1** | **Step 1** | ||
- | \\ | ||
* 8020 Aluminum Build : Connect 8020 Aluminum beams like the hardware setup above | * 8020 Aluminum Build : Connect 8020 Aluminum beams like the hardware setup above | ||
- | \\ | ||
**Step 2** | **Step 2** | ||
- | \\ | ||
* The Foam Board : Cut the board 48cm by 10cm. In 10cm area, slice a little bit 3 cm from both edges, so you can fold to the create a semi-triangle shape. It will be the beam that will support the hallow ball | * The Foam Board : Cut the board 48cm by 10cm. In 10cm area, slice a little bit 3 cm from both edges, so you can fold to the create a semi-triangle shape. It will be the beam that will support the hallow ball | ||
- | \\ | ||
**Step 3** | **Step 3** | ||
- | \\ | ||
* Dynamixel MX-28 : Mount the 3D-Printed connector on Dynamixel MX-28, then connect with the beam. | * Dynamixel MX-28 : Mount the 3D-Printed connector on Dynamixel MX-28, then connect with the beam. | ||
- | \\ | ||
**Step 4** | **Step 4** | ||
- | \\ | ||
* Sony Camera : Mount the camera on top border of the aluminum frame. | * Sony Camera : Mount the camera on top border of the aluminum frame. | ||
* Dynamixel + Beam : Place is 36cm under the sony camera. It's because all part of the beam will be inside the camera display. Therefore the position of the ball will be achieved correctly. | * Dynamixel + Beam : Place is 36cm under the sony camera. It's because all part of the beam will be inside the camera display. Therefore the position of the ball will be achieved correctly. | ||
- | \\ | ||
**Step 5** | **Step 5** | ||
- | \\ | ||
* Power Supply : Place it near the dynamixel to provide the continuous power | * Power Supply : Place it near the dynamixel to provide the continuous power | ||
* USB Cable : Organize nicely so the cable will not touch the beam or interfere the camera. | * USB Cable : Organize nicely so the cable will not touch the beam or interfere the camera. | ||
- | ==== Software Construction==== | + | ===== Software Construction===== |
- | A link to the source code can be found <provide URL to your code, probably saved in this DASL Wiki>. | + | ==== Prerequisites ==== |
+ | To run this tutorial. The following should | ||
+ | * ROS Tutorial - begineer/ | ||
+ | * Dynamixel SDK tutorial -> read/write on dynamixel motor to change the position or velocity of joint [[http:// | ||
+ | * OPENCV Tutorial - Object recognition, Object position recognition [[http:// | ||
\\ | \\ | ||
- | The goal of the code is <brief explanation> | + | ==== 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 |
- | <!- Insert a snippet | + | {{: |
- | ---- | + | |
\\ | \\ | ||
- | 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 | + | |
- | ---- | + | ==== 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 | + | {{ bandb: |
- | // | + | \\ |
- | // | + | The above figure describes ROS scheme |
- | ==== Final Words ==== | + | \\ |
+ | ==Finalized codes are written in Python, and 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: | ||
+ | \\ | ||
+ | |||
+ | ===== Experiment Results ===== | ||
+ | ==== Trouble Shooting ==== | ||
+ | |||
+ | The experiment is to target | ||
+ | |||
+ | {{youtube>3b5U8-9r9GE? | ||
+ | |||
+ | 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: | ||
+ | |||
+ | The figure above shows that there's 0.2 second latency. The motor position is not responding well the the feedback motor angle. | ||
+ | |||
+ | {{ bandb: | ||
+ | |||
+ | 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: | ||
+ | {{ bandb: | ||
+ | {{ bandb: | ||
+ | |||
+ | Same condition with latency, The position of the ball shows the divergence. Even if the ball is positioned at 30cm, desired position. | ||
+ | |||
+ | {{youtube>lLTkfMIeT50? | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== Solution | ||
+ | \\ | ||
+ | \\ | ||
+ | {{ bandb: | ||
+ | \\ | ||
+ | |||
+ | 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: | ||
+ | {{ bandb: | ||
+ | |||
+ | {{youtube> | ||
- | This tutorial' | + | The video shows the result with gain of 25. You 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, | + | 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' |
dbkim_ballbeam.1559475789.txt.gz · Last modified: 2019/06/02 04:43 by dongbinkim