Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Extra Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=68)
-   -   paper: Drivetrain Acceleration Model (http://www.chiefdelphi.com/forums/showthread.php?t=119442)

Ether 19-09-2013 00:36

paper: Drivetrain Acceleration Model
 
Thread created automatically to discuss a document in CD-Media.

Drivetrain Acceleration Model by Ether

Andrew Schreiber 19-09-2013 00:42

Re: paper: Drivetrain Acceleration Model
 
Very cool. Now if only we could convince you to use variable names longer than 2 characters :p

Am I correct in assuming that Tm = Ts*(1-V/Vfree); on line 55 could also be used to figure out approximate current draw? Or am I over simplifying this?

Ether 19-09-2013 01:19

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Andrew Schreiber (Post 1291946)
Am I correct in assuming that Tm = Ts*(1-V/Vfree); on line 55 could also be used to figure out approximate current draw?

Yes. Kt, the motor torque constant, is Newton_meters per amp. So you can calculate the motor amps A=Tm/Kt*. For a CIM, Kt≈0.018 Nm/A. You could modify the C code to output amps so it could be plotted.

However, the model does not account for voltage drops due to heavy currents through the wires, the wire connection points, the battery' s internal resistance, changes in motor resistance due to temperature, etc so the accuracy of Tm (and the current) will be affected. Also, Kt is not strictly constant - it varies somewhat with motor temperature.

Quote:

Very cool. Now if only we could convince you to use variable names longer than 2 characters :p
I've been programming since 1969 and I've never liked long variable names. To me it makes the code much less readable. I like the code to look like the way I would write the equations. I know opinions differ on this matter.


* when not slipping. when slipping, you'd have to use the kinetic friction force and back-calculate the motor torque.



Andrew Schreiber 19-09-2013 01:47

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1291947)
Yes. Kt, the motor torque constant, is Newton_meters per amp. So you can calculate the motor amps A=Tm/Kt. For a CIM, Kt≈0.018 Nm/A. You could easily modify the C code to output amps so it could be plotted.

However, the model does not account for voltage drops due to heavy currents through the wires, the wire connection points, the battery' s internal resistance, changes in motor resistance due to temperature, etc so the accuracy of Tm (and the current) will be affected. Also, Kt is not strictly constant - it varies somewhat with motor temperature.

So, close enough for determining if it's bad or not but not close enough to be an "accurate model".


Quote:

Originally Posted by Ether (Post 1291947)
I've been programming since 1969 and I've never liked long variable names. To me it makes the code much less readable. I like the code to look like the way I would write the equations. I know opinions differ on this matter.

Twas just a joke, I know the equations look like this but I've always found annotating them with english names helped me understand what was going on. Course, that was the second thing I did with this (first was read what heun integration was). Thanks for sharing this.

Nemo 19-09-2013 10:28

Re: paper: Drivetrain Acceleration Model
 
This is cool. I wouldn't have looked up Heun's method if I hadn't seen this thing. I also wouldn't have looked up rolling resistance. This white paper has given me some homework. Hopefully I can include those two things into the calculator I've been playing with. Thanks very much for posting goodies like this.

Ether 19-09-2013 11:36

Re: paper: Drivetrain Acceleration Model
 

I posted an update/correction to the C code:

- fixed an error in the English-to-SI conversion constants

- modified the accel function to better reflect the relationship between friction and rolling resistance

- added total drive motor amps to output



Nathan Streeter 19-09-2013 12:49

Re: paper: Drivetrain Acceleration Model
 
Can't look at this in-depth right now... but thank you very much for another great resource! This looks quite useful... particularly if k1, k2, and k3 are given real, semi-accurate values (not just assumptions)!

Andrew Schreiber 19-09-2013 13:09

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1291995)

I posted an update/correction to the C code:

- fixed an error in the English-to-SI conversion constants

- modified the accel function to better reflect the relationship between friction and rolling resistance

- added total drive motor amps to output



Dangit man, I just finished converting to coffeescript and started putting a front end on it! Mind posting your diffs?

http://bl.ocks.org/schreiaj/raw/6604...a78a8c98eda1b/ It's still missing the axis so it's kinda useless to get numbers out of but I'll post the updated version tonight once I get the axis un-inverted.

Current coffeescript port available at https://gist.github.com/schreiaj/660...a78a8c98eda1b/

Ether 19-09-2013 13:14

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Andrew Schreiber (Post 1292003)
Mind posting your diffs?

There's a CSdiff report in the posted ZIP file that contains the revised C code :-)



Andrew Schreiber 19-09-2013 13:29

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1292005)
There's a CSdiff report in the posted ZIP file that contains the revised C code :-)



Thanks, I'll get those integrated sometime in the near future.

Ether 19-09-2013 13:46

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Andrew Schreiber (Post 1292008)
Thanks, I'll get those integrated sometime in the near future.

I've got visitors coming over in 15 minutes.

Later this evening I'll strip out all the non-functional changes and give you a report of the minimum changes needed.

It's not a lot, once I get rid of the non-functional changes.



Ether 19-09-2013 16:37

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Andrew Schreiber (Post 1292003)
http://bl.ocks.org/schreiaj/raw/6604...a78a8c98eda1b/... I'll post the updated version tonight...

Thanks for doing this. I'm hoping your user-friendly interface will generate more interest and technical discussion, and maybe even inspire teams to conduct tests and make their data available.



Andrew Schreiber 19-09-2013 17:04

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1292020)
Thanks for doing this. I'm hoping your user-friendly interface will generate more interest and technical discussion, and maybe even inspire teams to conduct tests and make their data available.



Here's the updated version (haven't put your code changes in yet) but I did make it a little easier to read.

http://bl.ocks.org/schreiaj/raw/6604...06fc207f7a970/

IKE 21-09-2013 08:51

Re: paper: Drivetrain Acceleration Model
 
Thanks for putting this together.

I put together this "Drag Estimator" for my HS supermileage team years ago. It is based off of the Empirical rolling resistance and wind resistance test given in the Bosch automotive handbook.

http://www.epulaski.k12.in.us/tech/s...ign/design.htm

For rolling resistance, this gives a constant coefficient and a v^2 coefficient.

Ether 21-09-2013 13:53

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by IKE (Post 1292285)
For rolling resistance, this gives a constant coefficient and a v^2 coefficient.

I'm glad you brought this up.

I structured the code to make it very simple to change the rolling resistance model if you want to. It takes only 2 keystrokes to change the rolling resistance model from
L = Kro+Krv*V; (line #68 in the 9/19/2013_1112a code)
to
L = Kro+Krv*V*V;
In fact, you could make the rolling resistance any function of V, or even use a look-up table if you have experimental data.

However, I think the V*V term only comes into play due to air resistance at speeds much higher than FRC robot speeds. It would be enlightening to see some actual data of rolling resistance vs speed for a typical FRC robot (with drivetrain mechanically disengaged from wheels) on FRC carpet surface.






All times are GMT -5. The time now is 16:50.

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