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)

SoftwareBug2.0 21-09-2013 15:57

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1292303)
I structured the code to make it very simple to change the rolling resistance model if you want to. It takes only 2 keystrokes (^2) 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^2;

Um... "^" is xor in C.

Tom Line 21-09-2013 17:41

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by SoftwareBug2.0 (Post 1292312)
Um... "^" is xor in C.

Someone slipped into excel mode in the middle of a line of C. :D

Ether 21-09-2013 21:04

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Tom Line (Post 1292326)
Someone slipped into excel mode in the middle of a line of C. :D

Actually...
Octave, Maxima, SciLab, AWK, and RLaB :-)



Andrew Schreiber 21-09-2013 23:38

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1292340)
Actually...
Octave, Maxima, SciLab, AWK, and RLaB :-)



Which is still less weird than the weird case of coffeescript that I found while porting this by accident...

Turns out "variable *" compiles to "variable * variable" as opposed to throwing a compile error.

Ether 23-09-2013 16:51

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1291995)
- added total drive motor amps to output

There's a small error in the build 9/19/2013_1112a code.

At line 75, "A*4/10" should be "A*n/10".



Andrew Schreiber 23-09-2013 17:03

Re: paper: Drivetrain Acceleration Model
 
My current JS port has some minor typos that I haven't had the chance to hunt down yet. I'm working with Emscripten to compile the C code to Javascript which should mean I can integrate your changes faster too.

Ether 23-09-2013 17:22

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Andrew Schreiber (Post 1292685)
...should mean I can integrate your changes faster too.

That would be great.

I want to add battery voltage drop so mentors can use the model as a visual teaching tool to show students why low resistance in the motor wires and connections really does matter.



Ether 24-09-2013 23:13

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1291947)
the model does not account for voltage drops due to heavy currents through the wires, the wire connection points, the battery' s internal resistance...


9/24/2013 added updated C code (build 2013-09-24_2231) which includes motor voltage drops due to circuit resistance.


9/24/2013 added an explanation how the voltage drop model was derived.




Richard100 13-10-2013 15:03

Re: paper: Drivetrain Acceleration Model
 
Ether - Very nice, thanks for developing this. Do you think it could be extended to include wheelbase parameters and predict motor current draw when turning (say differential steering)? We've had trouble in this area during drive system design.

Ether 13-10-2013 15:11

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Richard100 (Post 1296168)
Ether - Very nice, thanks for developing this. Do you think it could be extended to include wheelbase parameters and predict motor current draw when turning (say differential steering)? We've had trouble in this area during drive system design.

Possibly. You can find several links here for static analysis of turning force (which relates to motor current) for skid-steer vehicles.



cadandcookies 18-12-2013 22:51

Re: paper: Drivetrain Acceleration Model
 
The executable works very well functionally-- I was able to run it with no problems and create some nice graphs based on it.

The only problem I've noticed is that I really have no idea what any of the variables are until I look back into the original program for comments.

I don't think I've quite expressed my appreciation for this program enough-- it is really nice to have such a good model for generating a good estimate of how fast a given drive train setup will move.

brennonbrimhall 02-01-2014 15:44

Re: paper: Drivetrain Acceleration Model
 
Based on the discussion on this thread (see posts #24 and #28), I've ported Ether's/Andrew Schreiber's C code to Java, and made a GUI front-end with charting. It's not the most pretty thing ever coded, but it may help to make the calculator more accessible by non-programmers. You can find the source code here, with .jar file releases here.

I'd appreciate any feedback you might have.

Ether 17-09-2014 09:20

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by Ether (Post 1296169)
You can find several links here for static analysis of turning force (which relates to motor current) for skid-steer vehicles.

Due to changes made by the web host, many of those links are now broken.

So I collected everything together in one place and posted it here.



lemiant 04-10-2014 15:21

Re: paper: Drivetrain Acceleration Model
 
Thank you so much for making this. You're my go-to resource for FRC physics and the community wouldn't be the same without you.
On line 84 voltage drop is calculated, but you don't ever seem to account for it when calculating the torque of the motors, is that correct?

Ether 04-10-2014 16:19

Re: paper: Drivetrain Acceleration Model
 
Quote:

Originally Posted by lemiant (Post 1402892)
On line 84 voltage drop is calculated, but you don't ever seem to account for it when calculating the torque of the motors, is that correct?

No. It is accounted for in the motor torque calculation. See the last paragraph in the voltage drop model rev E.pdf document:

Quote:

In the C code, there is an accel(V) function which computes the vehicle acceleration given its speed V. The vehicle speed V is directly related to the motor speed Wm through the wheels and the transmission, assuming no wheel slip. This motor speed Wm is then used in the formula Tm=Toffset-Tslope*Wm derived above to obtain the motor torque (see line 77 in the code). By using this formula for motor torque, the voltage drops due to current are automatically included in the calculation.
If you change the values of Rone and/or Rcom, you will definitely see the effect of changed voltage drop in the model's output.

Thanks for the words of encouragement.




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

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