|
Re: Brownout Prevention?
We actually came across this exact problem earlier this season. We tried a purely software approach by writing a "power controller" that essentially monitored all the current draw by all the systems (RIO, drivetrain, intake, outtake, compressor, etc), then the controller would dynamically modify the current flow to or from these systems depending on priority. The priority changes when the particular subsystem is being used, and takes into account the battery voltage.
The numbers we used were based on a lot of testing (we generated a linear regression model for current - speed of the drive train motors, for example, so we'd know how much current each motor would pull depending on speed) and didn't really seem to match up perfectly all the time to what the WPILib tells you about your max current. ie we would draw up to 200 amps sometimes for a second before the brownout sequence kicked in.
Obviously, it's not /perfect/ since the power methods in the WPILib are pretty noisy, so we had a switch on the driver station to turn the power controller on or off. We had a match at champs where it was pretty clear that the power controller was modifying currents -- and we never had a brownout during a match our whole season!
We had a very extensive flowchart for the logic and passed out flyers to people explaining how awesome it was :^)
Last edited by chloe : 05-05-2016 at 00:13.
|