Controls:

  • X: Run your PID controller with selected gains.
  • Z: Reset and pause the system to tune gains. 
    • While paused:
      • LEFT/RIGHT Arrows: Select which gain to tune.
      • UP/DOWN Arrows: Tune gain value.

Submission to WASM-4 Game Jam, submitted 1/19/2022. 

PID controllers are all around you. They allow a very simple yet powerful method to control various devices, ranging from servo motors to thermostats. They are also very very easy to code, and very easy to manipulate the response by changing the values of the gains (KP, KI, KD). The basic idea of a PID controller is that you have a desired "setpoint" that you want a system to reach, starting from an "initial point". The PID controller determines how to modify the actual state of the system over time using the difference between the true and desired states--the "error". Three modifications are  used: one based on a proportional relationship to the error, one based on an integrated sum of the error over time, and one based on the derivative of the error. Thus we get the name "P", "I", "D" controller: it just is a shortened name for "Proportional", "Integral", "Derivative" controller.

          PID controller overview

Arturo Urquizo, CC BY-SA 3.0

Read more about them on Wikipedia!

Download

Download
cart.wasm 11 kB

Leave a comment

Log in with itch.io to leave a comment.