CMU RI 16-711: KDC: Assignment 4: Controlling a single axis robot


DO NOT EVER TOUCH THE ROBOT!


The point of this assignment is to give you experience controlling an actual robot. In this case it is a simple 1DOF robot.

Matthew McNaughton mmcnaugh@cs put the hardware together and has done the assignment. He is a good starting point for questions. Here are instructions. Please do not change the torque limits, for safety reasons. Keep the servo rate at 100Hz. An exciting movie from Matthew is here.


DO NOT EVER TOUCH THE ROBOT!


Part 1: Play with the example program sample.cc, so you can can set the position of the robot to any angle you command. Vary the position and velocity gains and see what effect they have. How high can you increase the gains before the robot goes unstable?.

Position gains should be no more than 1 and velocity gains should be no more than 0.1


DO NOT EVER TOUCH THE ROBOT!


Part 2: Get the fastest step response possible using a PD controller (only). Have the robot start out straight down. Then set the desired position to be horizontal. Record the robot's movements so you can analyze the data. Gradually increase the position and/or velocity gain to get the robot to the horizontal position as fast as possible. We will define the arrival time as when the robot gets within 0.1 radians of the goal and stays within that distance to the goal.


DO NOT EVER TOUCH THE ROBOT!


Part 3: Identify a model of the robot. The encoder should be easy to calibrate in radians by knowing the counts/revolution, or by moving the arm to straight down, and then straight up under program control, and seeing what the counts are. Calibrate velocity so it integrates to the position in radians. It is difficult to calibrate the torque in Newton-meters without touching the robot to apply a known force, so let's calibrate it in terms of amplifier-command-units. Identify the moment of inertia of the robot in terms of (amplifier-command-units)/(radians/sec^2). Identify a friction model. I would suggest considering a stiction force (static friction that holds the robot in place when it is not moving, this is what enables the robot in the straight up position to not fall down), Coulomb friction (a constant torque that resists movement), and viscous friction (a torque proportional to velocity).


DO NOT EVER TOUCH THE ROBOT!


Part 4: Given the model in part 3, plan a swingup trajectory that minimizes the sum_k ( ( amplifier-command-units - zero-torque-amplifier-command-units )^2 ) over 10 seconds. The arm must get to within 0.1 radian of the goal and stay there after the 10 seconds are up.


DO NOT EVER TOUCH THE ROBOT!


Part 5: Now make "optimal" swingup work on the robot. Consider using PD control in addition to a feedforward command. Consider making a better model using data from failed swingup attempts. Consider using trajectory learning if necessary.


DO NOT EVER TOUCH THE ROBOT!


Extra Credit: Explain (ideally with a model and simulation) why the robot goes unstable when it does.


DO NOT EVER TOUCH THE ROBOT!


What to turn in?

Generate a web page describing what you did. The writeup should be either directly visible as html or one click away as a PDF or DOC file. Be sure to list the names of all the members of your group. Include links to a directory of your source and compiled code in either .zip, .tar, or .tar.gz format. Mail the URL of your web page to mmcnaugh@cs and cc cga@cs [You complete the address, we are trying to avoid spam.] The writeup is more important than the code. What did you do? Why did it work? Data traces are good. You can use any type of computer/OS/language you want. You can work in groups or alone.


DO NOT EVER TOUCH THE ROBOT!


Questions

Question: How do I log in?

Response: Your group should have a number. If your number is 5, you log in as
user05
pw05
Change your password and make your files readable only to you.


Question: Should I turn in plots and data files for all parts?

Response: YES!!!!!!! It would be very helpful to you and us to provide plots of position and velocity vs. time for all parts. In part 3, you can plot predicted vs. actual commands for some interesting trajectories. In part 4 and 5, plotting planned and actual commands is interesting as well.


DO NOT EVER TOUCH THE ROBOT!