OCCRA
Go to Post A Strong FRC Team Should... have a clear vision and an understanding of how to achieve it within their means. - Justin Foss [more]
Home
Go Back   Chief Delphi > CD-Media > White Papers
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

photos

papers

everything



FRC Drivetrain Characterization

noah.gleason

By: noah.gleason
New: 11-15-2017 12:46 PM
Updated: 11-15-2017 12:46 PM
Total downloads: 2295 times


A series of tests performed on a standard drivetrain, showing how to characterize a drive's behavior in terms of voltage, velocity, and acceleration.

Me and Eli (Oblarg) have been working this preseason on a project that started as just trying to see how linear the frictional forces in a drivetrain are, but quickly grew into coming up with a pair of equations that show how an FRC drivetrain behaves for a given voltage. It's pretty easy to find these equations, and it'll give you a good degree of precision on how your drive will behave, without needing any encoders. We got 2% accuracy in open-loop motion profiling for a wide variety of profiles, and .2% for closed-loop. The data we used are linked at the bottom of the white paper, and all the graphs were generated in R using ggplot.

Attached Files

  • pdf FRC Drivetrain Characterization (revision 0)

    motor_characterization.pdf

    downloaddownload file

    uploaded: 11-15-2017 12:46 PM
    filetype: pdf
    filesize: 231.57kb
    downloads: 2293



Recent Downloaders

Discussion

view entire thread

Reply

11-15-2017 03:02 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Something I didn't get around to cleaning up for inclusion in the whitepaper, but which is kinda cool regardless: Here's a 3d scatterplot with best-fit plane of motor voltage over the whole velocity-acceleration plane:



Edit: Note that the intercept of the plot is nonzero, as the voltage axis does not start at zero. This is, as mentioned in the paper, very important!



11-15-2017 07:17 PM

GeeTwo


Unread Re: paper: FRC Drivetrain Characterization

I'm pretty sure I followed everything here, and see how we can use this to significantly improve programming the robot, both in open-loop and feed-forward-closed-loop scenarios; I had been worried about not including static (as opposed to viscous/speed dependent) friction in the control software for a while. +reps to you both!
Were you able to learn anything that would help in designing the drive train?

Edit: You must spread some rep around before giving it to noah.gleason again.



11-15-2017 07:23 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by GeeTwo View Post
Were you able to learn anything that would help in designing the drive train?
Not yet - we have only characterized our test robot so far. Now that we have the testing procedures established, however, it shouldn't be too hard to start collecting data on different drive configurations (belt vs. chain, wheel type, etc) and see where it leads. Of course, we encourage other teams to do the same - we hope that this method of characterization might become something of a "standard" so that teams can more-easily share information about drive performance in a common format.



11-15-2017 10:06 PM

Chak


Unread Re: paper: FRC Drivetrain Characterization

Good read, I learned a couple things here today.

To check my understanding, is it correct to say that the .8 multiplicative fudge factor is only accurate at or near the top speed of the robots that were tested to get that .8 fudge factor? So that the .8 factor would work for one "usual" FRC speed, and get more inaccurate as the top speed deviates?

I wonder if it would lead to more intuitive controls if the joystick was scaled to velocity instead of voltage.

Can this be applied to increase acceleration by keeping the wheel on the edge of slipping? By measuring the torque/voltage at a steady state wheel slip (robot pushing against wall or something), and then measuring velocity as the robot speeds up, can't equation 14 be applied so that the robot operates at the edge of wheel almost slipping? Or maybe even make sure the robot always operates at the edge of wheels almost slipping no matter what, to decrease tire wear. How significant would that be? (I have no idea whether wheels slipping is an issue or not, so idk)



11-15-2017 10:50 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by Chak View Post
To check my understanding, is it correct to say that the .8 multiplicative fudge factor is only accurate at or near the top speed of the robots that were tested to get that .8 fudge factor? So that the .8 factor would work for one "usual" FRC speed, and get more inaccurate as the top speed deviates?
Yes, this is about the measure of it. Speed loss due to friction simply isn't a fractional loss, so even if you find a fraction that correctly describes your robot there's no reason to expect it to generalize to other robots or gearings because that's just not how the physics works.

In particular, we should expect that the "fractional loss" of more slowly-geared robots will be less than those geared to move fast, as the "intercept" term really represents a constant torque load and a higher gear ratio will overcome this with less voltage/current (and thus have a smaller intercept). Really, though, stating it in terms of "fractional loss" at all is just physically ill-founded and kind of misleading.

Quote:
I wonder if it would lead to more intuitive controls if the joystick was scaled to velocity instead of voltage.
It almost certainly would, as you'd no longer have a fairly wide "dead-band" around zero; adding the intercept voltage allows you to correctly linearize the robot response.

Quote:
Can this be applied to increase acceleration by keeping the wheel on the edge of slipping? By measuring the torque/voltage at a steady state wheel slip (robot pushing against wall or something), and then measuring velocity as the robot speeds up, can't equation 14 be applied so that the robot operates at the edge of wheel almost slipping? Or maybe even make sure the robot always operates at the edge of wheels almost slipping no matter what, to decrease tire wear. How significant would that be? (I have no idea whether wheels slipping is an issue or not, so idk)
It should be possible to calculate from equation 14 the outputs required to "just nearly slip the wheels," yes, though you probably want a bit of headroom to be safe. You should try this and report back on how well it works! Keep in mind, though, that it will likely only really make a difference on shifting bots in low-gear or on a very light robot, as it is somewhat hard to actually slip the wheels on a FRC bot geared to move at an appreciable rate. Also, be sure that you back-calculate "effective torque" from your empirical Ka, rather than from the theoretical - as seen in the paper, these can differ by a factor of two due to frictional losses! The easiest way to do this would simply be to divide the empirical Ka by the theoretical to obtain your drive's "frictional torque loss factor," and then multiply the theoretical torque by that factor.



11-15-2017 11:40 PM

Chak


Unread Re: paper: FRC Drivetrain Characterization

Thanks.

Quote:
You should try this and report back on how well it works!
lol, I don't have a team right now. Would someone else care to try this?



11-16-2017 12:17 AM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by Chak View Post
lol, I don't have a team right now. Would someone else care to try this?
We'll put it on the list of "things to try" (basecamp to-do lists are wonderful), but it's a very long list at the moment so I dunno when we'll be able to get back to you on it.



11-19-2017 12:58 AM

AustinSchuh


Unread Re: paper: FRC Drivetrain Characterization

This is awesome! Thanks for doing the research and posting your results!



11-19-2017 09:39 AM

Ether


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by Chak View Post
To check my understanding, is it correct to say that the .8 multiplicative fudge factor is only accurate at or near the top speed of the robots that were tested to get that .8 fudge factor? So that the .8 factor would work for one "usual" FRC speed, and get more inaccurate as the top speed deviates?
This post may shed some light on your question.




11-19-2017 03:49 PM

JesseK


Unread Re: paper: FRC Drivetrain Characterization

If you add more friction to your robot and re-run the Quasi-static kV determination, does the value of kV change? For example, say you introduced a small rubber pad that rested on top of all 6 wheels, do you reach the same kV value as without them?



11-19-2017 05:51 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by JesseK View Post
If you add more friction to your robot and re-run the Quasi-static kV determination, does the value of kV change? For example, say you introduced a small rubber pad that rested on top of all 6 wheels, do you reach the same kV value as without them?
It depends crucially on what kind of friction you add - not all drivetrain friction is created equal. As we mention in the paper, the observed linearity indicates there are (at most) three types of significant frictional effects present: constant effects, effects proportional to velocity, and effects proportional to acceleration. These show up in the values of Vintercept, Kv, and Ka respectively.

While we have not done a direct experiment to confirm this, I strongly suspect that doing what you have suggested (adding a rubber pad rubbing against the wheels) would greatly increase Vintercept (constant effects), but not necessarily Kv, due to the fact that the test robot we used to obtain our data had certain parts causing friction pretty much in this fashion (i.e. a sagging electronics board rubbing on the ground as it moved) and still gave us a Kv basically indistinguishable from the theoretical value. Remember that the only things that are going to cause a change in the value of Kv are viscous effects (i.e., those proportional to velocity) - dry friction between surfaces is usually not viscous.

If there is an effect on Kv, it may actually be to decrease it, as the friction force may decrease with velocity. Something to watch out for. This may seem counterintuitive, as a smaller Kv might seem to imply a higher top speed (and clearly we cannot increase top speed by adding friction!), but this would occur in combination with an increase in Vintercept, resulting in a net decrease of top speed.

Effects proportional to acceleration, on the other hand, almost certainly come from gear-to-gear and belt-to-tooth friction, as these are effects that are proportional to internal forces in the drive that are proportional to motor output torque (which is itself proportional to acceleration, so long as the wheels are not slipping).



11-19-2017 08:47 PM

JesseK


Unread Re: paper: FRC Drivetrain Characterization

Interesting. Knowing which constant to tune late in a season (as robot parts wear) is crucial to keeping consistency in automation. I think this paper lays a good foundation in that regard. I'm still digesting it though; some of the explanations are a bit of a leap without references.



04-14-2018 07:07 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Has anyone explored potential ways for computing a theoretical value of Vintercept?



04-14-2018 07:40 PM

GeeTwo


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
Has anyone explored potential ways for computing a theoretical value of Vintercept?
A theoretical computation would require a lot of build-specific inputs about mechanical friction. However, it's not too difficult to measure. Just drive the robot slowly, keeping it moving without grinding to a halt. Meanwhile, log the product of Vbat and the duty cycle.



04-14-2018 07:41 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by GeeTwo View Post
A theoretical computation would require a lot of build-specific inputs about mechanical friction. However, it's not too difficult to measure. Just drive the robot slowly, keeping it moving without grinding to a halt. Meanwhile, log the product of Vbat and the duty cycle.
I'm thinking about this more from a simulation point of view -- it would be nice to compute a theoretical value for a robot that doesn't exist yet, or a robot that is in a bag or is otherwise inaccessible. Not everyone has practice robots after all.



04-14-2018 07:44 PM

Ether


Unread Re: paper: FRC Drivetrain Characterization

. . .



04-14-2018 07:58 PM

GeeTwo


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
I'm thinking about this more from a simulation point of view -- it would be nice to compute a theoretical value for a robot that doesn't exist yet, or a robot that is in a bag or is otherwise inaccessible. Not everyone has practice robots after all.
If you're just looking for a SWAG, let's look at the canonical SWAG of a drivetrain that's 80% to 85% of free speed. That means that at top speed between 1.8V and 2.6V is used to overcome friction; the amount should be somewhat less at low speed assuming some combination of constant friction and viscous friction. Eyeballing oblarg's plot gives a value of 1.3V. I'd SWAG around 1.0 to 1.5V for a well made two stage fixed wheel drive train, ranging up to at least 2V for something that might not be completely square or have some binding or holonomic wheels.



04-14-2018 08:56 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Well, a SWAG is fine, but I was hoping someone had tried to estimate the relationship between vintercept and the various parameters (mass, static friction, voltage, etc... ) so it could be vaguely computable. Of course, I suppose that might not be possible.



04-15-2018 05:39 AM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
Well, a SWAG is fine, but I was hoping someone had tried to estimate the relationship between vintercept and the various parameters (mass, static friction, voltage, etc... ) so it could be vaguely computable. Of course, I suppose that might not be possible.
Teasing out relationships like this is very much one of the long term goals of my drive characterization data sharing thread.

There are currently some plans in the works to collaborate with Jaci to distribute characterization code to teams, which hopefully (in addition to assisting teams in better-controlling their robots) will result in a large wave of new data to look at.



04-22-2018 03:28 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

I'm trying to duplicate the computations given in the paper, and I can't seem to get the same numbers for ka. Here's what I have:

Code:
CIM_NOMINAL_VOLTAGE = 12 # volts
CIM_FREE = (5310 / 60) # rps
CIM_STALL_TORQUE = 343.4 # oz/in
CIM_STALL_AMPS = 133 # amp
CIM_FREE_CURRENT = 2.7 # amp

wheel_diameter = (3.8/12.0)
gearing = 6.1
nmotors = 3
robot_mass = 110

max_velocity = (CIM_FREE * math.pi * wheel_diameter) / gearing
max_acceleration = (2.0 * nmotors * CIM_STALL_TORQUE * gearing) / (wheel_diameter * robot_mass)

kv =  CIM_NOMINAL_VOLTAGE / max_velocity
ka = CIM_NOMINAL_VOLTAGE / max_acceleration
print('vmax=%.3f amax=%.3f kv=%.3f ka=%.3f' % (max_velocity, max_acceleration, kv, ka))
And this results in vmax=14.433 amax=360.816 kv=0.831 ka=0.033 . However, the paper reports kv=0.83 and ka=0.1 ... so something's wrong with my acceleration numbers.

I assume I'm not using the right units for CIM_STALL_TORQUE, but I've tried a bunch of different units and none of them have worked out. I had expected the unit to be in ft/lb ... but that yields amax=1.867 ka=6.427 which seems really off.



04-22-2018 09:49 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
I'm trying to duplicate the computations given in the paper, and I can't seem to get the same numbers for ka. Here's what I have:

Code:
CIM_NOMINAL_VOLTAGE = 12 # volts
CIM_FREE = (5310 / 60) # rps
CIM_STALL_TORQUE = 343.4 # oz/in
CIM_STALL_AMPS = 133 # amp
CIM_FREE_CURRENT = 2.7 # amp

wheel_diameter = (3.8/12.0)
gearing = 6.1
nmotors = 3
robot_mass = 110

max_velocity = (CIM_FREE * math.pi * wheel_diameter) / gearing
max_acceleration = (2.0 * nmotors * CIM_STALL_TORQUE * gearing) / (wheel_diameter * robot_mass)

kv =  CIM_NOMINAL_VOLTAGE / max_velocity
ka = CIM_NOMINAL_VOLTAGE / max_acceleration
print('vmax=%.3f amax=%.3f kv=%.3f ka=%.3f' % (max_velocity, max_acceleration, kv, ka))
And this results in vmax=14.433 amax=360.816 kv=0.831 ka=0.033 . However, the paper reports kv=0.83 and ka=0.1 ... so something's wrong with my acceleration numbers.

I assume I'm not using the right units for CIM_STALL_TORQUE, but I've tried a bunch of different units and none of them have worked out. I had expected the unit to be in ft/lb ... but that yields amax=1.867 ka=6.427 which seems really off.
Edit: I was too quick to assume that the mistake here was the common unit confusion, please ignore the first version of my post which has now been removed.

You've made some mistake calculating amax; here is the correct calculation.

At a glance, it appears you have used the wrong value for nmotors (3 rather than 6; we are doing the calculation for the whole robot, not half of it, or else we would have to halve the mass), and also that you have used inconsistent distance units (your torque is stated in oz-inches, but your wheel diameter is in feet).

This is one reason I almost always use wolframalpha for calculations involving units these days; the unit handling is a godsend.



04-23-2018 11:08 AM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by Oblarg View Post
Edit: I was too quick to assume that the mistake here was the common unit confusion, please ignore the first version of my post which has now been removed.

You've made some mistake calculating amax; here is the correct calculation.

At a glance, it appears you have used the wrong value for nmotors (3 rather than 6; we are doing the calculation for the whole robot, not half of it, or else we would have to halve the mass), and also that you have used inconsistent distance units (your torque is stated in oz-inches, but your wheel diameter is in feet).

This is one reason I almost always use wolframalpha for calculations involving units these days; the unit handling is a godsend.
Thanks, that was really useful! Shows why I got terrible grades in physics back in college.

... speaking of which, I played with it a bit and still can't get the numbers for Amax working without units. Clearly I'm missing something. I'll try to show my work.

I recall from something somewhere there's a difference in how metric units and imperial units work... but according to wolfram it seems like I'm working with the right dimensional units. For the life of me I can't figure out what magic conversion factor I'm missing to make this work.

Thanks for your patience!



04-23-2018 12:25 PM

Oblarg


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
Thanks, that was really useful! Shows why I got terrible grades in physics back in college.

... speaking of which, I played with it a bit and still can't get the numbers for Amax working without units. Clearly I'm missing something. I'll try to show my work.

I recall from something somewhere there's a difference in how metric units and imperial units work... but according to wolfram it seems like I'm working with the right dimensional units. For the life of me I can't figure out what magic conversion factor I'm missing to make this work.

Thanks for your patience!
Ah, now you've run into the problem I addressed in my first (now-deleted) version of my post - your unitless equation is correct, but your calculated acceleration is in units of gs, not ft/s^2. This is because you've used lbf for your force, and lbm for your mass; their ratio is the acceleration of gravity.

You've gotta be careful about this when using imperial units; if you don't want this to happen, you have to use slugs rather than lbm for your units of mass.



04-23-2018 12:37 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by Oblarg View Post
Ah, now you've run into the problem I addressed in my first (now-deleted) version of my post - your unitless equation is correct, but your calculated acceleration is in units of gs, not ft/s^2. This is because you've used lbf for your force, and lbm for your mass; their ratio is the acceleration of gravity.

You've gotta be careful about this when using imperial units; if you don't want this to happen, you have to use slugs rather than lbm for your units of mass.
Ok, that works... but now I'm confused. I thought lbf-ft is to N-m as lb is to kg? Or rather... why does this work when I convert everything to metric -- or does it not actually work and I would need to convert kg to some other unit also?

(I'm asking because I'm trying to implement this model for pyfrc's drivetrain simulation, so I want to make sure it's implemented correctly and that I understand the units that I'm asking users to give me)



04-23-2018 12:53 PM

GeeTwo


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by virtuald View Post
I thought lbf is to N-m as lb is to kg?
No, and I'm not even sure what you're trying to do here.
  • lbf: not sure which you mean
    • pounds force - is pounds, a unit of force
    • pound feet - is torque: a force of one pound applied normally (perpendicularly) at a distance of 1 ft.
  • N-m is torque, a force of one Newton applied normally at a distance of 1 m.
  • lb is pounds, a unit of force [weight]. The unit of mass in standard/imperial is the slug, which is the mass of something which weighs ~32 lb on the surface of the earth. An lbm (pound mass) is ~1/32 slug.
  • kg is kilograms, a unit of mass. The unit of force in metric is a kg-m/s2, also known as a newton (N). A kilogram mass weighs ~9.8 N on the surface of the earth.

Edit/add: Assuming you meant foot-lb at the top, then:
  • ft-lb corresponds to N-m as
  • lb corresponds to N and as
  • slugs correspond to kg.

(By correspond, I mean that they have the same dimensions and can be converted to/from each other, not that they have the same conversion factors.)



04-23-2018 01:03 PM

virtuald


Unread Re: paper: FRC Drivetrain Characterization

Quote:
Originally Posted by GeeTwo View Post
lb is pounds, a unit of force [weight]. The unit of mass in standard/imperial is the slug, which is the mass of something which weighs ~32 lb on the surface of the earth. An lbm (pound mass) is ~1/32 slug.
That is exactly the distinction that I was missing. I had thought lb and kg were both units of mass, I see now that that isn't correct.

Thanks to everyone for your help and patience!



view entire thread

Reply

Tags

loading ...



All times are GMT -5. The time now is 12:31 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi