
 ---------------------------------------------------
 PID Controller Matlab Scripts for Maslab 
 ---------------------------------------------------
 Christopher Batten
 Massachusetts Institute of Technology
 January 7, 2005 
 ---------------------------------------------------

 This directory contains some very simple scripts to model a single
 motor controlled by a PID loop as well as a differential drive robot
 controlled by two independent PID control loops.

  motorConstructor    - create a basic motor structure
  motorSetVoltage     - set the voltage of a motor
  motorStepResponse   - determine unit step response for a motor
  motorPID            - determine unit step respones for a motor with PID

  >> [ T, V ] = motorPID( motorConstructor('rand'), 0.01, 3, 100, 6, 4 ); 
  >> plot( T, V );

  robotPID            - differential drive robot with two independent PID loops
  plotRobotTrajectory - plot the trajectory of a differential drive robot

  >> % Robot trajectory with no controller
  >> [ T, vL, vR ] = robotPID( 1, 0.01, 3, 0, 0, 0 ); 
  >> plotRobotTrajectory( T, vL, vR );

  >> % Robot trajectory with two independent PID controllers
  >> [ T, vL, vR ] = robotPID( 1, 0.01, 3, 100, 6, 4 ); 
  >> plotRobotTrajectory( T, vL, vR );
