Author: <DONGBIN KIM> Email: firstname.lastname@example.org
Date: Last modified on <06/01/19>
Keywords: <ballandbeam, ballbalancing, controls>
The photo above depicts ball balancing systems which allows you to understand classic control theory from simulation to the real life application. The big picture problem is that the theoretical simulation normally does not require lots of efforts due to the exponential development in computers and software such as MATLAB, but it is always tough to convert from simulation into real-life application because it requires extra problems. Solving this completely is important as becoming a roboticist. This tutorial shows you how to simulate your system, and fabricate it in real life. It takes approximately 5 hours to complete.
This tutorial's motivation is to practice basic dynamic system control from simulation to fabrication. Readers of this tutorial assumes the reader has the following background and interests:
* Know how to derive equation of motion of a system
* Perhaps also know how to use Robot Operating Systems for the system fabrication
* Perhaps additional background needed may include C++ or Python programming language
The rest of this tutorial is presented as follows:
To complete this tutorial, you'll need the following items
|PART NAME/DESCRIPTION||VENDOR||VENDOR Number or URL||PRICE||QTY|
|8020 Aluminum Beam and Joints||In DASL||N/A||N/A||3|
|Red Hallow Ball, Darwin(It can be anyball)||Robotis||N/A||N/A||1|
|Dynamixel MX-28 Actuator||Robotis||https://www.trossenrobotics.com/dynamixel-mx-28-robot-actuator.aspx?feed=Froogle&gclid=CjwKCAjw583nBRBwEiwA7MKvoJ37mr6ROCvyFAggk2PXI2rQnhT1gmnGGgQCW26AuBnubnYaPEuIQBoC5AoQAvD_BwE||219.90||1|
|Sony Playstation Camera||Sony at Walmart||https://www.walmart.com/ip/Sony-PlayStation-Eye-PS3/20470320?adid=22222222227014952754&gclid=CjwKCAjw583nBRBwEiwA7MKvoG2ZbMvb4c6uB5HLsGqrX6-xFkgVv6a8WM17W6sfyYDkWiZjewTBURoCcVYQAvD_BwE&selectedSellerId=684&veh=sem&wl0=&wl1=s&wl10=113502917&wl11=online&wl12=20470320&wl13=&wl2=c&wl3=49182682352&wl4=pla-99771252032&wl5=9030833&wl6=&wl7=&wl8=&wl9=pla&wmlspartner=wlpa||7.75||1|
(Ball balancing scheme)
(Ball balancing Hardware Setup)
This section gives step-by-step instructions along with photos to build the ball balancing system set-up.
To run this tutorial. The following should be completed
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) MATLAB_CODE
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.
The above figure describes ROS scheme of the final ball and beam control system. The 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.
The experiment is to target the ball to 30cm position from the motor.
The Video above shows that the system is not balancing the ball at all. It also shows that there is latency from the response.
The figure above shows that there's 0.2 second latency. The motor position is not responding well the the feedback motor angle.
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.
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
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
The video shows the result with gain of 25. You can see the ball is controlled to reach at 30cm from the motor.
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: email@example.com