Am 15.04.16 um 00:03 schrieb Tim Wescott:
I've had a cursory look. I'm a physicist myself with only basic knowledge of PID control, so for me the math boxes were helpful. You did not define all variables there, particularly the dependent variables. In equation (1), I wondered whether theta_m is the angle or angular velocity of the motor. That t is time seems fairly obvious, but I'd put both in for clarification. Same for equation (2).
Your plots need some typographical adjustment. The lines are too thin and the fonts are too small. I would also put the variables on the axis, i.e. "Time t in seconds" etc.
The complete controller is a short function which fits in one page. Maybe it is better to put it at the beginning, giving different colours to the proportinal, integral and derivative term, and then explain it. While reading the code snippets, I was wondering what are the fields in the pid structure etc.
For some reason, I find the code on paper quite hard to read. Maybe it's the syntax highlighting that I'm used to when reading on the screen. You can do some basic highlighting using the listings package to improve on that.
Christian