16311 Introduction to Robotics 

Main Schedule Homework Labs Links 
Lab 4: Controls 

Challenge StatementCreate a twowheeled inverted pendulum capable of balancing itself using LEGO sensors. Lab Goals
BackgroundPrinciplesYou may have to combat the following while developing your machines:
PID control, which stands for ProportionalIntegralDerivative control, is an extremely flexible and powerful control method. An output signal $u$ can be generated by summing the three components: $u(t)=K$_{p}e(t)+K_{i}∫_{i}^{t}e(τ)dτ+K_{d}^{d}⁄_{dt}e(t) The constants $K$_{p}, $K$_{i}, and $K$_{d} are referred to as the proportional, integral, and derivative constants, or sometimes the PID tuning constants. $e(t)$ is the error from the desired output at time t. While these exist in continuous space, more practical implementations can be considered below: $e[t]\; =\; curr\_positiongoal\_position;$ The derivative component can be implemented as the difference between the current and the previous errors, divided by the time between the two. However, in most practical applications the time sampling rate is constant, so we do not divide by a constant and instead modulate $Kd$. $de[t]\; =\; e[t]e[t1];$ The integral component is somewhat straightforward, as we can simply sum all the elements in our array (this works especially well if uninitialized values are set to 0). However, for various reasons, we may not actually want an integral term in our system. Depending on the implementation of the integral error, it could dominate the controller over time, or add undesired effects near the beginning of the curve (before the error has had sufficient time to settle). $sum\_e\; =\; 0;$ $sum\_e[t]\; =\; sum\_e+e[t]$ Lab RequirementsThe 2018 Specifications for Lab 4 are presented in the following document. This will be the most uptodate resource for lab requirements. Lab 4 Demonstration Sign Up Sheet Extensions 

