what is the difference between a PI and a PD controller? In which instance or for what kind of sensor(s)would you use one as opposed to the other?
PI - Proportional - Integral
The output is a combination of how far you are from the goal and the integral of your distance from the goal (total error over time). This means that it will track small changes well but in the event of a large change it will be prone to overshooting. Good for systems which are inherently heavily damped.
PD - Proportional - Differential
The output is a combination of how far you are from the goal and how fast you are moving towards the goal. The differential part is normally negative, this means that if you are rapidly approaching the goal then you start to slow down. It handles large changes well with minimal overshoot but isn't great for tracking small changes or errors. Good for systems which inherently have a lot of momentum.
And the third option is PID which is a little more complex since it has 3 parameters rather than 2 but provides the best of both systems.