Quote:
Originally Posted by Ether
|
This links to this post:
Quote:
Originally Posted by Ether
^Following up on the above^
You can improve the spinup response of TBH by clever selection of the initial values before you change the setpoint "S" from 0 to your desired speed.
Do a simple open-loop test to establish the approximate value of motor command (in the range 0 to +1) required to hold your wheel speed at the target value. Call this experimentally determined motor command value "M". It doesn't have to be exact.
To start your spinup do the following:
Set S to your desired wheel speed; initialize Y=1, d=1, and b=2*M-1; and turn your speed controller on.
Since Y=1, you will be applying full voltage to the motor to spin it up (just like bang-bang). Y will remain equal to 1 (applying full voltage) during the spinup, because there will be no zero crossings until you reach the target speed S.
When you reach the first zero crossing (at the target speed), the TBH algorithm will set Y (and b) equal to (Y+b)/2 = (1+(2*M-1))/2 = M, which is the experimentally-determined motor command value required to maintain the wheel at the target speed. You will immediately have the correct (or approximately correct) motor command for your target speed. This will reduce overshoot and oscillation.
|
If I read this correctly, this will not work some of the time, but not in all cases:
- If M (the first approximation to the speed) is exactly right, this would result in a tiny overshoot (as the controller notices and reduces the applied voltage) followed by a decay ramp* back to the desired speed. -- GOOD (and quite lucky)
- If M is a bit low, this would result in the same tiny overshoot followed by a decay ramp* towards a speed less than that desired. At some point, this ramp will cross the desired speed, and the remainder will function exactly as Take Back Half is intended -- GOOD
- If M is a bit high (results in a speed greater than the acceptable variation from the desired speed), this would result in the same tiny overshoot followed by a decay ramp* towards a speed greater than that desired. The speed will never again cross the desired speed, so TBH will make no further adjustments, and the speed reaches an asymptotic limit outside of the desired speed range -- NOT GOOD.
I would expect more consistent results by calculating the initial
b as 2*
M'+1, where you are confident that
M' is below the "proper" value for
M, perhaps 75% or 90% of your "best estimate" depending on how well you know this number.
* - As long as the system has continuous, monotonic response near M, and some sort of frictional losses, there should be a decay ramp of some variety or other, which is enough for my argument. If the system is linear near voltage M, and the frictional losses are viscous (proportional to speed), this will be a classic exponential decay ramp.