# How to know Max Velocity and Max Acceleration of our robot?

I just start using team 364 BaseFalconSwerve to run our drivetrain. And I wonder how to know Max Velocity and Max Acceleration of our robot?
After trying, I discovered that Max Acceleration is related to robot rotation. But I don’t know why.

What brand did you buy and what gear ratio?

It might be for acceleration limiting, which would be affected by your center of mass and whatever wheelbase width you have
This is a good post explaining that. (Second half of the post)

However, I could be completely wrong and it’s asking about motor power.

SDS mk4i 2L
But those constant can also be related to robot weight?

It is a little hard for me, because it is beyond my academic level. Is there an easy way for me to calculate? For example, I have seen a sheet for robot PID constants.

I mean, you could just guess. I assume your max acceleration is going to be around 1g, or ~10 m/s^2
If your robot’s center of gravity is too high, it will tip under that acceleration. So, a very very conservative limit would be around 5 m/s^2. I’m sure almost every robot can accelerate faster than that, though. We just want to make sure that we accelerate slow enough so we don’t tip.
I assume max velocity is just the fastest speed that the code will let you go, so you could leave that uncapped or at 16 ft/s for a pretty normal speed.

You’ll have to convert those units to whatever the code wants, though.

3 Likes

I see.
However, I still have a question, what is the real max number of those constants? I think I will modify it from big to small so that our robot can run as fast as possible.

For acceleration, assuming that you won’t be able to tip at all, it depends, on a lot of things. If it’s a full size robot, I wouldn’t expect more possible acceleration than ~9.6 m/s^2, because you are probably using treaded wheels and their coefficient of friction would get you around there. Motor power is also something that would effect that, maybe bring it down to ~9.4 m/s^2, depending on current limits, you robot weight, and what motors you are using.

With your gearing, NEOs have a theroretical max speed of 14.5 ft/s while falcons have a theroretical max speed of 16.3 ft/s. Neither of those speeds will ever be reached with that gearing, because of resistance in the geartrain and limited acceleration space

Thank you very much!

There’s a low tech way of getting a tape measure and marking out every foot as hash marks. Then record your robot going full speed and see how many ft/s it is.

Is that mean I need to set a number bigger than it can actually run when testing?

I am not exactly sure what you are asking? The above answers are based on theoretical (which will get you very close) ways to know your max velocity. If you are looking for your practical (physical) speed the way I would do it would be current limit your drivetrain in code and remove any acceleration curves on your controls. Then set up the markers on the carpet and then go from standing still to max speed. However, at 14 ft/s you are going to need a lot of room. I’m not exactly sure how useful or practical doing this is but science is science.

I understand your method now, and I will try it. Thank you!

Perhaps the roboRIO’s accelerometer data and/or drive motor encoder measurements could be used instead for a somewhat more accurate number

1 Like

This is what SysID does (with drive encoders, not the accelerometer)

Using SysID with swerve can be troublesome