LAB 2: Motor Control, Robot Arm Kinematics and Path Planning
12%
For this lab you will need to do the following:
1) PID Control
a) Implement a Proportional (P) controller on a single servo motor.
- Find the minimum Kp that makes the system unstable (the large oscillation).
- What is the effect of Kp on the behavior of the system?
- Record the encoder (output) and plot it over time for underdamped motion (for different values of Kp).
b) Implement a Proportional-Derivative (PD) controller on a single servo motor.
- What is the effect of Kd-term on the motion? Does it improve the stability? how about the steady-state error ?
- Record the encoder (output) and plot it over time for the damped motion (for different values of Kp, Kd).
- Tune the gains to have the best performance. (define the best performance)
c) Implement a Proportional-Derivative-Integral (PID) controller on a single servo motor.
- What is the effect of Ki-term on the motion? Does it improve the stability? What is the effect on the steady-state error?
- Record the encoder (output) and plot it over time for the damped motion (for different values of Kp, Ki, Kd). Tune the gains for the best performance.
d) Investigate the effect of the sampling period.
e) Investigate the effect of Actuation Saturation on the performance of the controller. What can you do to improve this?
Include all investigations, plots, and analysis in your report along with photos of your LEGO setup.
2) 2-DOF Robotic Arm
a) Propose a 2-DOF Arm LEGO design and build it. Take into account the following requirements:
- Add a pencil, marker or pen to the end effector.
- For simplicity, keep the two revolute joints on the same plane (speak to your TA first if you'd like to try something else).
- Add a base to the robot arm in order to keep it fixed and aligned with the reference frame.
- Are there different types of linkages that can provide the same motion? Consider pros/cons of different motor mountings and arm linkage constructions (see lecture notes).
b) Determine the work space of your robot. Include a figure and dimensions of your workspace in the report.
3) Forward Kinematics
a) Define a initial position for your robot, such that the robot base is located on (0,0) Cartesian coordinates.
b) Write a program that given two angles, the robot moves to their corresponding joint angles, and returns the (x,y) position of the end effector. Measure the accuracy/repeatability of these movements to include in your report.
c) Implement the following programs to give your robot the functionality of measuring distances and angles in a 2D plane:
i) Distance:
Inside the robot working space, a user wants to measure the distance between two points. The user moves the end effector to the first point, clicks a touch sensor for recording the first point, then the user locates the end effector over the second location and clicks for storing the second point. The user gets as output the distance between the two points and it is displayed in the EV3 screen (or terminal).
ii) Angle:
Inside the robot working space, a user wants to measure the angle between two lines that intersect. The user moves the end effector to three points the first point in the line intersection and the other two on the different lines. The user gets as output the angle between the two lines and it is displayed in the EV3 screen (or terminal).
4) Inverse Kinematics
Implement both the numerical (Newton's or Broyden's Method) solution and an analytical solution for the following programs:
i) Position:
Write a program that receives as input a (x,y) location inside the robot working space and moves the robot end effector to the input location.
ii) Midpoint:
Write a program that finds the midpoint between two points. i.e. The user moves the end effector to point 1 stores that location then moves the end effector to point 2 stores the second location and then runs the midpoint algorithm which calculates and moves the robots end effector into the middle location of the two points.
Explain, compare, and analyze both approaches in your report.
6) Final Project Planning
Open the final project planning Google document shared with you and answer the question for lab 2. If you do not have access to the document, please speak with the TA.
The following problems are optional:
Denavit-Hartenberg Parameters
Build a 3DOF robot arm. Calculate the Denavit-Hartenberg parameters for your robot arm, or compose the link matrix transforms. Please include an image or diagram of your robot indicating frames of reference and links measurement.
Add your calculations in the report.
3DOF Inverse Kinematics
Write a program that locates the robot end effector to a given (x,y,z) coordinate.
Manipulation Task
Propose a manipulation task that can be solved with your robot arm. e.g. write a program that receives as input a 2D image and controls the robot to draw the input file.
Explain your approach in the report.
Demo:
Points 1-5.
What to hand in:
A tarfile electronically on eClass. The tarfile has to contain your implementations and any data you either measured or generated. Download the sample file structure to use as a template. Note: you do not need to include problem 6 in your report.