![]() |
paper: Drivetrain Acceleration Model
Thread created automatically to discuss a document in CD-Media.
Drivetrain Acceleration Model by Ether |
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? |
Re: paper: Drivetrain Acceleration Model
Quote:
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:
* when not slipping. when slipping, you'd have to use the kinetic friction force and back-calculate the motor torque. |
Re: paper: Drivetrain Acceleration Model
Quote:
Quote:
|
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.
|
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 |
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)!
|
Re: paper: Drivetrain Acceleration Model
Quote:
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/ |
Re: paper: Drivetrain Acceleration Model
Quote:
|
Re: paper: Drivetrain Acceleration Model
Quote:
|
Re: paper: Drivetrain Acceleration Model
Quote:
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. |
Re: paper: Drivetrain Acceleration Model
Quote:
|
Re: paper: Drivetrain Acceleration Model
Quote:
http://bl.ocks.org/schreiaj/raw/6604...06fc207f7a970/ |
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. |
Re: paper: Drivetrain Acceleration Model
Quote:
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. |
Re: paper: Drivetrain Acceleration Model
Quote:
|
Re: paper: Drivetrain Acceleration Model
Quote:
|
Re: paper: Drivetrain Acceleration Model
|
Re: paper: Drivetrain Acceleration Model
Quote:
Turns out "variable *" compiles to "variable * variable" as opposed to throwing a compile error. |
Re: paper: Drivetrain Acceleration Model
Quote:
At line 75, "A*4/10" should be "A*n/10". |
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.
|
Re: paper: Drivetrain Acceleration Model
Quote:
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. |
Re: paper: Drivetrain Acceleration Model
Quote:
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. |
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.
|
Re: paper: Drivetrain Acceleration Model
Quote:
|
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. |
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. |
Re: paper: Drivetrain Acceleration Model
Quote:
So I collected everything together in one place and posted it here. |
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? |
Re: paper: Drivetrain Acceleration Model
Quote:
Quote:
Thanks for the words of encouragement. |
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... |
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. |
Re: paper: Drivetrain Acceleration Model
That solves it! I was running the executable, not the .bat file. My mistake, thanks!
|
| 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