150 likes | 230 Views
Sam Dubin , Charlotte Gill, Ryan Hammerschmitt, Joe Miller. Modeling and Controls. Introduction. Past Objectives Determine vehicle properties for implementation in the simulator Determine motor mappings from voltage to thrust Finish coding the control laws into the Arduino controller
E N D
Sam Dubin, Charlotte Gill, Ryan Hammerschmitt, Joe Miller Modeling and Controls
Introduction • Past Objectives • Determine vehicle properties for implementation in the simulator • Determine motor mappings from voltage to thrust • Finish coding the control laws into the Arduino controller • Currently • Obtained initial vehicle stability derivatives by linearizing the vehicle around hover • Implemented non linear vehicle dynamics into the simulation • Found initial PID gains to test in Simulink model and code into controller • Added more robustness and safety to motor controller
AUV Dynamics • Changed from linear model to nonlinear model in the translational direction • Modeled • Force includes thruster control forces/moments and drag forces • Allows for a more accurate representation in both the simulation and controller • Rotational direction still modeled by transfer function • More accurate estimation of vehicle properties
PID Controller • PID controller implemented • Takes u, v, depth, and psi commands • KP, KI, and KD gains determined from transfer functions and root locus methods • Feedback • Currently from AUV dynamics • Will eventually come from onboard sensors • Commands will eventually come from autonomy • Possible feed forward control later
PID Controller • Gains Use sisotool to determine gains KP, KI, and KDapproximations Enter these values in PID controller Then use Simulink to further tune response
Simulation Current Expected Commands from Autonomy: Forward velocity, Lateral velocity, Heading, Depth PID Controllers Command Thrusters to Forces/Moments Mapping + - Dynamics States Sensors & Estimation Environment
Simulation PID Control Unit Impulse Input Unity Feedback
Testing • Verifying the vehicle moves as commanded from Matlab • Obtaining trim values for thrusts at hover • Verified robustness of communication at a high data rate Learned • New safety requirements • High sensitivity to commands in water • Necessity for Matlab to give more than single commands
Testing Matlab/ Joystick AUV Thrust Mapping Trim Trust Thrust Commands XBee XBee
Motor Controller • Adding IMU integration • Possibly have automatic vehicle trimming • 5 packet types: • Thruster commands • Heartbeat • Ping/pong • IMU telemetry • IMU calibration
Coding PID in Arduino • Takes in measured states and commands (u, v, psi, z) and the proportional, integral, and derivative gains • Returns control thrust values • The PID controller is coded as KP*error + KI * ∑error + KD* ∆ error • Control thrust values then sent to motor controller as PWM signals
Going Forward • Automate pitch & roll trimming from IMU • Implement controller on the Arduino • Experiment with feed forward systems • Compare simulation dynamics with pool testing • Integrate system with Sensing and Autonomy Teams