Reference no: EM132705453
Handout
Last week you programmed your robot controller to use a Finite State Machine or Subsumption architecture. This week we will be taking a look at feedback loops, specifically the PID controller. This controller should be used to allow you to follow the wall more accurately. I recommend you look through the lecture slides, and the ‘PID without a PhD' article linked on the module shell first.
This work is the second part to the Lab Portfolio assignment forming of 20% of the module mark. You will need to submit a report of around 2 sides, and your code contained in the appendix of this report. Further help for the report is contained in Week 4's Lab Handout and on blackboard under the assessment tab.
Task 1: Implement a PID Controller
- Start with the proportional controller.
- Find a way to store a set of previous error values, this will be used for the integral and derivative part of PID.
- Next, implement the Derivative section.
- Finally, the Integral section.
- You may need to limit the action - if the output of the PID controller is too large, set the action to a maximum threshold, e.g. "if output > 0.3 then output = 0.3" (where 0.3 is m/s of the turn speed of the Pioneer robot in VREP).
Task 2: Tune your PID Controller
- Tune the PID controller using the technique from the lecture, compare different tuning parameters to each other, which one is the best?
- Optional: Try other methods found from your own research. Which one do you find easier to follow?
- Remember to include this task in your report - and include images from the testing. Put the robot in different situations (i.e. by corners) to see how well the controller performs.