- $y_t$ = where I want to be at time t.
- $x_t$ = where I am at time t.
- $(y_t - x_t)$ = error

- P controller (P for proportional)
- $a_t = K_P (y_t - x_t)$
- Is the spring law.

- Stable = small perturbations lead to a bounded error between the robot and the reference signal.
- Strictly Stable= it is able to return to its reference path upon such perturbations
- P controller is stable, but not strictly stable.

- $a_t=K_P(y_t-x_t)+K_D*\frac{d(y_t-x_t)}{d_t}$
- Notice that in discrete land, you can't compute the derivative directly, instead approximate:
- $ d(y_t-x_t) = (y_t-x_t) - (y_{t-1}-x_{t-1})$

- Dampens the perturbations.

Other links: http://students.cs.byu.edu/~cs470ta/goodrich/fall2008/MATLAB/PDControl.m Original code

I like to:

- Change N=200 see it act like a spring
- kd=4.5 dampens
- kp=.01
- kd=0.5
- Add the random term in
- Add the cos term
- Take out the random term
- Play with kp and kd
- Can you over do kd?