Project 4: Proportional-Derivative Control

Project Goals

At the end of this project, you should be able to:


Project Components

All components are required to receive full credit for the project.

Part 1: Microcontroller Circuit

Clean up the circuit: try to minimize the number of wires that are "hanging off" the hovercraft or hanging near the fans.

Part 2: Proportional Derivative Control

Note: this part will count for one personal programming credit

Create a function that will implement a proportional-derivative controller:

void pd_control(int16_t error, int16_t rotation_rate, uint8_t forward_thrust) where error is the heading error, rotation_rate is the rate of craft rotation, and forward_thrust is the total forward thrust that should be generated by the left/right fans combined (this latter value will be between 0 ... 127)

This function will:

Note: you are strongly encouraged to use integer math instead of floating point math.

Notes on tuning the PD control parameters:

Part 3: Steering Control

Note: this part will count for one personal programming credit

Create a function that will implement a steering controller:

int8_t steering_control(uint16_t distance_left, unt16_t distance_right, int16_t rotation_rate, uint8_t forward_thrust) distance_left and distance_right are the distances (in mm) to the nearest obstacle for the left and right sensors, rotation_rate is the rate of craft rotation, and forward_thrust is the total forward thrust that should be generated by the left/right fans combined (this latter value will be between 0 ... 127)

This function will:

Part 4: High-Level Control

Note: this part will count for one personal programming credit

For this part, you will implement a high-level control loop that will cycle once every 50 ms. For each of these control steps, the hovercraft will first steer away from obstacles (while moving forward). If there are no obstacles, then the hovercraft will steer toward the goal heading (also, moving forward).


References


What to Hand In

All components of the project are due by Tuesday, April 20th at 5:00pm.


Grading

Group grade distribution:

Grades for individuals will be based on the group grade, but weighted by the assessed contributions of the group members.


fagg [[at]] cs.ou.edu

Last modified: Wed Mar 30 23:48:46 2011