Lab 3, PID control, with feed forward, of pendulum

Time and place

  • HVL Robotics Lab, Øyrane 12, 6800 Førde, 2. floor (under Reodorklubben).
  • Time: TBD.

Equipment

  • Matlab and Simulink
  • single_pendulum.slx Simulink file from GitHub

Description

In this lab you will add a feed forward term to a PID and tune a PID to control the position of a simulated pendulum.

Your PID will be given a score, less is better. Take a screen dump of your score and PID gains, send it to me, and receive a thumbs up for completing the lab.

The pendulum model can be a fun challenge for three reasons

  1. It`s non-linear, the torque from gravity is dependant on the pendulum position
  2. It`s in every single control theory book
  3. The pendulum is simple, easy to get our head around, but still an advanced control problem

The overall workflow for you to do is

  1. Open the Simulink model (.slx)
  2. Run it
  3. Have fun
  4. Tune the PID manually
  5. Write a feed forward term to compensate for gravity
  6. Analyse work done by FF and PID
  7. Learn

Steps

  1. Open the .slx file on your laptop

    1. Add feed-forward
    2. Tune PID
  2. Run the test, get a score.

    1. Happy? Done. Else, keep tuning, ask questions, take the opportunity to understand control theory.

Reg tek rulez!