I was reading a document describing a specific control loop implementation when i ran across a mention of scaling the output inversely porportional to Battery voltage. When i read this an “AHA” lightbulb went off. This is something that can be implemented extremely easily on a FIRST robot and might be of some use in a few situations:
*any sort of timing based autonomous. Could make much more stable
*maintaining optimal tuning of a PID controller during times of low voltage either due to low battery or high motor load.
*might have some limited use under driver control. Humans will compensate for decreased sensitivity so it is probably unnecessary in this case.
Just an idea i thought i might share with everybody. We already have the voltage info available. It can’t hurt.
I dont think battery voltage should matter to your PID loops - they look at what the robot is actually doing and adjust accordingly, so they should respond correctly inspite of the other variables the robot is dealing with (carpet friction, motor temp, obsticals in the way, battery voltage…)
but for #1 on your list, if you are running auton open loop, then you could compensate for low battery voltage
The trouble with this is your controller never knows what the internal resistance of the battery is at any one point in time. (It is a variable that is hard to predict and varies battery to battery.) If the sensors on a device were able to sense voltage rapidly and the load on the battery remained constant, it would be a cool thing to do. On a variable system such as a robot in competition I don’t think it would give as good a response as sensors telling the controller how fast/far motors were responding to stimuli.
It might be a more interesting proposition to consider scaling the output
based on the speed of a motor, and whether or not the speed
is in the direction of the desired torque, or the direction against it.
Sounds like you are talking about closed loop feedback. Our team has done it for the past few years, and it helps greatly. One very common algorithm is called PID. It calculates an error which is defined as the difference between the current speed and the desired speed. It then factors in the current error, the time integral of the error and the derivative of the error to arrive at an output to give to the motors. If you do some googling you will find a wealth of info.
Yes, I am talking about closed loop feedback. So, you do all the above,
and your goal is to deliver a torque to bring a rotating object under control,
but your means to do that is a pulse width modulated drive to an electric
motor. Have a look at the torque/speed curve of a typical electric motor
to understand the source of the issue at hand…