Go to Post Even worse, you could have a "Kiss the Paul" contest. I heard he squeals when you pick him up too. - AndyB [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-09-2013, 00:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
paper: Drivetrain Acceleration Model

Thread created automatically to discuss a document in CD-Media.

Drivetrain Acceleration Model by Ether
Reply With Quote
  #2   Spotlight this post!  
Unread 19-09-2013, 00:42
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,057
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Very cool. Now if only we could convince you to use variable names longer than 2 characters

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?
__________________




.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-09-2013, 01:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by Andrew Schreiber View Post
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
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.



Last edited by Ether : 19-09-2013 at 01:48.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-09-2013, 01:47
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,057
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by Ether View Post
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 View Post
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.
__________________




.
Reply With Quote
  #5   Spotlight this post!  
Unread 19-09-2013, 10:28
Nemo's Avatar
Nemo Nemo is offline
Team 967 Mentor
AKA: Dan Niemitalo
FRC #0967 (Iron Lions)
Team Role: Coach
 
Join Date: Nov 2009
Rookie Year: 2009
Location: Iowa
Posts: 803
Nemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond repute
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 24-09-2013, 23:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by Ether View Post
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.




Last edited by Ether : 25-09-2013 at 17:56.
Reply With Quote
  #7   Spotlight this post!  
Unread 13-10-2013, 15:03
Richard100 Richard100 is offline
Registered User
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Southern Maryland
Posts: 79
Richard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to behold
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-10-2013, 15:11
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by Richard100 View Post
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.


Reply With Quote
  #9   Spotlight this post!  
Unread 18-12-2013, 22:51
cadandcookies's Avatar
cadandcookies cadandcookies is offline
Director of Programs, GOFIRST
AKA: Nick Aarestad
FTC #9205 (The Iron Maidens)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Minnesnowta
Posts: 1,526
cadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond reputecadandcookies has a reputation beyond repute
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.
__________________

Never assume the motives of others are, to them, less noble than yours are to you. - John Perry Barlow
tumblr | twitter
'Snow Problem CAD Files: 2015 2016
MN FTC Field Manager, FTA, CSA, Emcee
FLL Maybe NXT Year (09-10) -> FRC 2220 (11-14) -> FTC 9205(14-?)/FRC 2667 (15-16)
VEXU UMN (2015-??)
Volunteer since 2011
2013 RCA Winner (North Star Regional) (2220)
2016 Connect Award Winner (North Super Regional and World Championship) (9205)
Reply With Quote
  #10   Spotlight this post!  
Unread 17-09-2014, 09:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by Ether View Post
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.


Reply With Quote
  #11   Spotlight this post!  
Unread 04-10-2014, 15:21
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 562
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
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?
__________________
FRC Team 4334
2012 - Archimedes Champions, IRI Champions
2013 - Western Canadian Regional Winner, Galileo Quarter-Finalilst

Reply With Quote
  #12   Spotlight this post!  
Unread 04-10-2014, 16:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model

Quote:
Originally Posted by lemiant View Post
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.


Reply With Quote
  #13   Spotlight this post!  
Unread Yesterday, 12:34
nuclearnerd's Avatar
nuclearnerd nuclearnerd is offline
Speaking for myself, not my team
AKA: Brendan Simons
FRC #5406 (Celt-X)
Team Role: Engineer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Hamilton, Ontario, Canada
Posts: 446
nuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant futurenuclearnerd has a brilliant future
Re: paper: Drivetrain Acceleration Model

I'm digging up an old thread here, but I wonder if I can ask for tech support with Ether's drivetrain simulator.

I've edited the drivetratinModel.bat file as instructed in the readme, but when I try to run the executable in windows it doesn't write a new file as expected. Running it in the shell (cmd.exe) gives me "error environment variable filename not defined".

I've used this simulator in the past, but I can't remember doing anything differently. It's very handy, if a bit clunky to use. I have a personal rule not to trust any 3rd party calculator unless I can verify it with an independant one. I'd like to run Ether's code to verify the WCP calculator (http://www.wcproducts.net/how-to-drivetrain/) and to plot some acceleration curves.

This reminds me that I've been meaning to build a GUI for Ether's code...
Reply With Quote
  #14   Spotlight this post!  
Unread Yesterday, 13:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: Drivetrain Acceleration Model


Hi Brendan,

Just saw your post. I will try to help you solve the problem.

In Windows, file extensions of the type "exe" have priority over extensions of the type "bat" when searching for a file to execute when the filename (without extension) is typed in a command window.

So when you type the filename "drivetrainModel" without extension, it executes drivetrainModel.exe instead of drivetrainModel.bat... and the bat file never gets executed and so it never has a chance to set the environment variables that the exe file is expecting.


There are 3 different ways to solve the problem you are seeing:

1) Force windows to execute the bat file by typing the full filename with the extension: drivetrainModel.bat

2) Rename the bat file to a different name, like for example "test.bat". Then just type "test" in your command window. Assuming there is no "test.exe" in the default directory, Windows will find "test.bat" and execute it.

3) Don't use a command shell. Instead, navigate to the folder in Windows and double-click on the drivetrainModel.bat file

Two more things to be aware of:

a) In your post, drivetrainModel is mis-spelled as "drivetratinModel.bat".

b) If you edited the bat file to use a filename with spaces in it, you should put the filename in quotes, like this: "my filename.CSV"

Please let me know if this fixes the problem.



Last edited by Ether : Yesterday at 13:19.
Reply With Quote
  #15   Spotlight this post!  
Unread 19-09-2013, 11:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
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



Last edited by Ether : 19-09-2013 at 11:54.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:03.

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


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