|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Fastest Possible Canburglar
I wrote a python script to calculate the fastest possible canburglar you could make if it was powered by motors... it appears to be in the 20 ms range. This was inspired by the can burglar from 973 that we were putting on our robot in place of the "tail" at the championship. Let me know what you think.
I attached the python file as canburglar.txt and a pdf which I used for some of the equations. Here is the code: import math ## Using SI Units - kg, m, s, current in Amperes, angles are printed in degrees but calculations are in radians ##System t = 0 e = 2.718281828459045 dt = 0.001 rod_mass = .15 # kg rod_length = 2.5 # m hook_mass = .05 # kg J = ((16/48) * rod_mass * (rod_length ** 2)) + hook_mass * (rod_length ** 2) ## rod moment of inertia + hook moment of inertia angle = 0 terminalangle = 90 * (math.pi / 180) # in radians #Motor Banebots RS-775 down-regulated to 12v motor_num = 4 motor_stall_I = 100 motor_stall_T = 1.175 motor_free_omega = 13000 * math.pi * 2 geardown = 1 test_endpoint = 3000 print(motor_free_omega) def getVelocity(): power_term = -((motor_stall_T * motor_num * geardown)/ (J * (motor_free_omega / geardown))) * t return (motor_free_omega / geardown) * (1 - e ** power_term) lowestt = 1, 1, 10000 # low geardown, high geardown, time while (geardown <= test_endpoint): #print("terminal velocity = " + str(motor_free_omega / geardown / (2 * math.pi))) while angle < terminalangle: angle += getVelocity() * dt t += dt print("terminal velocity = " + str(motor_free_omega / geardown / (2 * math.pi)) + " rpm " + " geardown = " + str(geardown) + " angle = " + str(angle / (math.pi / 180) ) + " t = " + str(t) + " velocity = " + str(getVelocity() / (2 * math.pi)) + " rpm " + " \n") #print("geardown = " + str(geardown) + " angle = " + str(angle / (math.pi / 180) ) + " t = " + str(t)) if (lowestt[2] > t): lowestt = geardown, geardown, t elif lowestt[2] == t: lowestt = lowestt[0], geardown, t t = 0 angle = 0 geardown += 1 print("fastest canburglar, geardown = " + str(lowestt[0]) + " :") geardown = lowestt[0] while angle < terminalangle: angle += getVelocity() * dt t += dt print("terminal velocity = " + str(motor_free_omega / geardown / (2 * math.pi)) + " rpm " + " geardown = " + str(geardown) + " angle = " + str(angle / (math.pi / 180) ) + " t = " + str(t) + " velocity = " + str(getVelocity() / (2 * math.pi)) + " rpm " + " \n") if (test_endpoint == lowestt[1]): print("******************************************* ************************************************** **********************************************") print("**************** Warning, you may not have found the absolute minimum for cangrabber speed. Increase test_endpoint. ***********************") print("******************************************* ************************************************** **********************************************") else: print(" Choose a gear ratio between " + str(lowestt[0]) + " and " + str(lowestt[1])) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|