PID Tuning and Compilation for Arduino Mega

Tuned and compiled PID from Simulink to Arduino Mega using optimised C/C++ code generators.

Key Contributions

  • Employed Zieger-Nichols method for tuning.
  • Remapped potentiometer to 1/10th the range to fine-tune the PID target.
  • Set PID target to accelerometer pitch at 90°.

Responsibilities

  • Used Simulink to compile the block model into code and onto the Arduino.
  • Conducted research into tuning methods and system modelling.

Key Skills Developed

  • Mastered the Simulink Arduino library add-on.
  • Developed a full PID to decrease overshoot, improving upon a working PI.
  • Individually tested to gain practical understanding of P, I, and D components of a PID.

Demonstration