Project 3: Orientation Control and Distance Sensing

All components of the project are due by Thursday, April 10th at 5:00pm (or close of the lab, whichever is later).

Project Goals

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

Project Overview

For this project, you will be creating a control program to maintain the orientation of helicopter at a specified compass direction (i.e., you will be doing yaw control). In brief, your craft must:

Project Components

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

Part 1: Application Programming Interface

Implement the following functions:

Part 2: Proportional-Derivative Controller

Create a proportional-derivative controller that will bring the craft's heading to a specified goal orientation. In essence, you will implement the following:

yaw_command = yaw_center + Kp * heading_error - Kv * heading_derivative

where Kp and Kv are gain parameters that you must select (start small!), and yaw_center is the yaw command that corresponds to "no yaw acceleration" (this latter parameter should be 128).


Your main loop will look something like this:
void main_loop(void) {
       heading_current = #HOW SHOULD THIS BE INITIALIZED?#
       heading_goal = #HOW SHOULD THIS BE INITIALIZED?#
       while(1) {
           heading_last = heading_current;
           heading_current = get_heading();
           heading_error = compute_error(heading_current, heading_goal);
           heading_derivative = compute_derivative(heading_current, heading_last);

           if(#COMMAND INPUT LINE#) {
           yaw_command = yaw_center +
                     Kp * heading_error - Kv * heading_derivative;


What to Hand In

All components of the project are due by Thursday, April 10th at 5:00pm (or close of lab, whichever is later).


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]]

Last modified: Wed Mar 26 23:24:01 2008