Solar Boat Throttle and PID Control
Challenge: Solar Splash
Dates: 1/5/2013 - 1/5/2014
Collaborators: Eli Abidor and Josh Johnson
Summary:
Designed an electric throttle to power the drive train and a PID cruise controller to optimize the power consumption of the throttle at a set speed for a race boat in the intercollegiate Solar Splash competition.
Throttle Design:
The Solar Splash guidelines require the use of lead acid batteries and limits battery selection by overall weight, not voltage or battery capacity. Three 12V Optima red top batteries were chosen to power the system in series due to their high cold cranking amperage (CCA) rating of 720 A, fast recharge rate, and due to their robust waterproof design which is largely beneficial for this application. The high CCA is desirable to ensure the battery doesn’t limit the drive train at full throttle for a 70 meter sprint event. Amperage delivered to the drive train is preferred in this event over efficiency so that the maximum power is delivered to the drive train for the boat to hit its top speed.
Three standard 3700 RPM Etek DC electric motors were chosen for the drive train due to their relative affordability for an electric motor with a 15 horsepower max output. Alltrax Axe 4844 motor controllers were chosen to drive the motors due to their rugged design, extensive documentation and relatively high operating frequency of 18 kHz for controllers at an affordable price point. The high operational frequency was desired so that any computationally assisted throttle control could be more responsive. The system is controlled by a 0-5k throttle and polarity protection diodes and surge current fuses were put in place to protect the controllers.
PID Overview:
The Solar Splash competition additionally has an endurance race where the aim is to travel the greatest distance over the course of two hours. During this event the boat is fitted with a 528 W solar panel assembly and a Maximum Power Point Tracker (MPPT) which attempts to match the panels to the boat batteries to improve the charging efficiency of the batteries during the race. The goal of the PID controller is to operate similar to vehicle cruise control by adjusting the current delivered to the motors to maintain a set speed based on data gathered by an accelerometer. This automated system results in a steadier current draw since a driver is more likely to make errors in keeping the throttle steady and overcompensate to reach a desired speed which causes unnecessary spikes in current drawn from the batteries. A steadier current draw is ultimately better for the battery chemistry of the lead acid batteries and improves the efficiency of power used during the race.
A PID feedback controller was chosen since unlike a solely proportional controller it can robustly compensate for steady state errors over time which reduces the chance of the controller oscillating and creates a more stable response to approach the desired speed. Additionally in an actively changing environment due to weather conditions or collisions with other boats, the PID controller responds robustly to sudden and unexpected disturbances and can approach a stable speed again unlike solely proportional or even proportional-integral controllers which can compensate poorly to sudden disturbances and become even more unstable.
PID Controller Design Hardware Design:
The first iteration of the controller was implemented on the Arduino Due for quick turnaround. The TI LM2575 buck was used to bring to bring the voltage of one of the 12V batteries down to 9V for the Arduino power rail. An LDO was used to generate 5V rails for the current sensors, voltage sensors and a LCD screen used as a dashboard by the driver. The data from the current sensor was fed into the Arduino for the PID controller and the Arduino DAC pin output a voltage signal to the throttle control pin on the motor controllers to complete the feedback loop. This was first implemented on a breadboard and is currently implemented on a PCB that is placed on top of the Arduino as a shield. A manual switch is placed between the Arduino throttle output and the 0-5k throttle so that the driver can switch the boat into manual control if the cruise control malfunctions.
PID Controller Software Design:
The running median library was used to work with the median value obtained from a set of samples to minimize noisy fluctuations and ensure the algorithm is working with robust data. The initial constants for the controller were determined experimentally through extensive testing on the Charles River. The proportional, integral and derivative errors are all then calculated based on how far off the current speed the accelerometer reads and a new signal is sent to the motor controllers to compensate for the error. These are recalculated every loop to actively maintain the set speed. The set speed is changed throughout the race based on the readout from an internal timer and the voltage sensors. As the race nears its end, if there is still substantial voltage remaining in the batteries, the set speed is increased to obtain a further distance. All of the data from the event is logged on an SD card and the data is then read into MATLAB to determine changes we can make to the controller constants for a better response for the next race of the event.
Motor controllers and contactors for throttle
Debugging PID controller circuit in shop prior to testing on Charles River
Early breadboard prototype for PID controller
It works!