AME 3623: Project 7: Proportional-Derivative Control and Tuning + Lateral Position Sensing
For the last two projects, you have developed the proportional error
and derivative error control pieces. In this project, we bring these
two pieces together and tune the parameters so that the craft will
orient to and stick at a goal orientation.
- All components of the project are due by Friday, April 12th
at 11:59 pm
- Groups are the same as for project 1.
- Discussion within groups is fine.
- Discussion across groups may not be about the specifics of the
solution (general programming/circuit issues are fine to
discuss).
At the end of this project, you should be able to:
- tune PD-control parameters so as to achieve near
critically-damped behavior of the hovercraft, and
- compute lateral positiona and instantaneous velocity.
Component 1: Hardware
- Balance your craft so that when the chamber is pressurized, the
craft lifts off the ground uniformly and does not drift
laterally (much).
- Verify that that the cameras are still working before starting
on this project.
Component 2: Software
Implement the following functionality:
- Continue to use the orientation LEDs to
display the current orientation
error.
- The LED bar should continue to reflect orientation rate.
- In pd_step(), sum together the proportional
error (project 6) and derivative (project 5) terms in computing
torque.
- In imu_step(), receiving characters '+' or '-'
should increment / decrement your orientation goal in steps of 20
degrees. Remember that orientation goal should always stay between
+/- 180 degrees.
- Continue to use your FSM from project 6.
Component 3: Tuning and Testing
- At the end of the previous project, you should have a
reasonable choice of Kp. This should cause your craft
to move definitively toward the orientation goal,
though it will likely oscillate around the goal (perhaps
damped, perhaps not).
- Slowly increase Kd until most of the oscillation has been
removed.
- After tuning, the craft should be able to recover from
disturbances from the orientation goal. In addition, as the
orientation error approaches and then crosses 180 degree error, the
thrust fans should flip polarity (e.g., shifting from hard
right to hard left).
- Your hovercraft should behave properly given a range of
starting orientations and goals.
- Remember that printf() is an expensive operation in terms of
time. Although useful for debugging, it can cause serious problems
when used inside of a control loop.
Component 4: Cameras
From your project 3 implementation, bring the following:
- Initialization of cameras in setup()
- camera_task / camera_step()
Update camera_step() and surrounding code as follows:
- Add global variable:
float cartesian_velocity[3];
- Change your call to compute_chassis_motion() to be:
compute_chassis_motion(adx, ady, cartesian_change);
where cartesian_change is a local array of floats
- After the call to compute_chassis_motion:
- Add the changes to cartesian_position
- Set cartesian_velocity to be cartesian_change / dt
- Clear adx/ady
- Add to report step: print out on a single line
cartesian_position and cartesian_velocity
- Add to imu step: if the character 'C' is typed, reset the
lateral positions to zero
Note that cartesian_position is in the local coordinate frame of the
hovercraft and not a global coordinate frame. For example, a move
forward, followed by a turn by 90 degrees and then a second move
forward will be sensed as a just a movement along the X direction and
in rotation (plus some noise), but you should observe no movement
along the y axis.
What to Hand In
All components of the project are due by Friday, April 10th at
11:59 pm.
- Demonstration/Code Review: All group
members must be present.
The demonstration must be completed by Tuesday, April 14th.
- Check in the following to your project 7 area of your
subversion tree:
- Personal report: Catme surveys must be completed by Tuesday, April 14th.
Grading
Personal programming credit:
- Each person must accumulate at least three personal programming
credits over the course of the semester. This project offers
one.
- To receive credit, you must be the primary designer,
implementer and debugger of the component. This does
not mean that your other group members should not be looking
over your shoulder. But: you must do the "driving."
Group grade distribution:
- 35%: Project implementation
- 30%: Demonstration of working project (to either
of the TA or the instructor)
- 35%: Documentation
Group Grading Rubric
Grades for individuals will be based on the group grade, but weighted
by the assessed contributions of the group members to the non-personal programming items.
andrewhfagg -- gmail.com
Last modified: Fri Apr 3 22:51:48 2020