|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Drive System Control Compensation
I don't know how much this applies, (when you say more control over acceleration this just jumped to my mind) but we created an acceleration rate limiter ("ramping" function) to ramp acceleration when the driver jams full speed on the joysticks (this helps with current spikes and wheel slip among other things). You can adjust your max desired slope which is the variable Slope_a and move the joystick slider to simulate joystick movement. There is an indicator of the motor output labeled "motor" as well. The graph will show you the joystick value (white line) in comparison with the motor output (red line). The smaller Slope_a is the longer it takes the motor to reach the full desired speed. When controlling finer movements, these curves overlap exactly. Here is the LabVIEW VI if you want to take a look. (Sorry if it is a little messy!) If you aren't too versed in LV, I'd be happy to explain more, if you have problems with the link let me know.
Last edited by Lightfoot26 : 19-01-2015 at 21:45. |
|
#2
|
||||
|
||||
|
Re: Drive System Control Compensation
Thanks. That sounds like what we are looking for.
I'll try to find a machine that still has LabView on it. (We've completely switched to C++.) The Talon SRX also has a ramp builtin. We'll do some experiments with the ramping functions there as well. Might as well use all the processors we have on board. :-) |
|
#3
|
||||
|
||||
|
Re: Drive System Control Compensation
I've implemented ramping speed filters in RobotC using this example from one of our old programming leads. Essentially, the filter adds to the current speed the different between the current speed and the desired speed divided by some "alpha". This "smooths out" any motor speed changes.
So basically: speed = speed + (joystick - speed)/alpha Note that in his example, he multiplies then divides by an arbitrarily large value. I'm told he did this because the controller either didn't support floats or did floating point calculations much more slowly. Last edited by josesantos : 20-01-2015 at 01:24. Reason: clarity |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|