Task
Complete the Week 5 lab: implement the attitude P/PD inner loop in
quadsim/controllers/student.py (attitude error → body-rate/torque commands,
thrust = weight), and verify recovery from a tilted initial attitude with
examples/wk5_attitude.py.
The Week 5 lab sheet walks through the build step by step —
this page defines what you hand in and how it is graded.
What to submit (one zip)
student.py— with your inner attitude loopwk5_attitude.png— roll/pitch/yaw vs time from the tilted start- Report (PDF, ≤ 3 pages): your gains, the response plot, and what each gain does (one tuning experiment: change one gain, show the effect)
Pass bar — expected results
- From a 20° roll / −15° pitch start: back to level within ±1° in ≤ 3 s, no sustained oscillation
- Runs via
PYTHONPATH=. python examples/wk5_attitude.py
Assessment criteria
| Criterion | Weight | What earns full marks |
|---|---|---|
| Results & verification | 40% | The pass-bar numbers are met and reproduced by re-running your code from a clean checkout. Partial credit tracks how close you get and whether failures are honestly reported. |
| Code correctness & quality | 25% | Your own implementation (not the reference copied back); runs without edits; readable structure and naming; no dead code. |
| Report: plots & numbers | 20% | Requested plots present, axes labelled, units shown; the key numbers stated in text, not left inside figures. |
| Discussion & insight | 15% | Interpretation goes beyond restating outputs — connects the result to the theory taught that week. |
| Total | 100% | = 5% of the course grade |
Lab-specific checks on top of the rubric:
- Recovery meets the pass bar with your gains (we re-run your code)
- The tuning experiment shows cause → effect (e.g. higher Kd → less overshoot)
Rules
- Individual work. Discussing ideas is encouraged; code and report must be written by you. Identical code or text is treated under the University’s academic-integrity rules.
- AI assistants (ChatGPT, Copilot, …) may be used as a tool, with two conditions: declare the use in your report (one line is enough), and be able to explain every line you submit — you may be asked to, in person.
- Late submission: −20% per day, not accepted after 3 days. One free 48-hour extension per student per semester — ask before the deadline.
- Re-runs. We grade by re-running your code (
PYTHONPATH=. python …on a clean copy of the course simulator plus your files). “Works on my machine” without reproducibility loses the results marks.
📤 Submit via the MUST LMS
What
the zip described above
Filename
MLTE03_Wk5_<studentID>.zipWhere
MUST LMS → MLTE03 → Week 5 Lab dropbox LMS link — TO FILL
Deadline
date / time — TO FILL (before Week 6)