Bassnut
16-06-2011, 07:37 AM
Rally, here is the lookup table. (Manually jigged a bit at the ends)
(64950,64850,64700,64650,64563,6454 5,64526,64507,64487,64466,64444,644 21,64397,64372,64347,64320,64292,64 263,64233,64201,64169,64135,64099,6 4063,64024,63984,63943,63900,63855, 63809,63760,63710,63658,63603,63546 ,63488,63426,63363,63297,63228,6315 7,63083,63006,62926,62842,62756,626 66,62573,62477,62376,62272,62164,62 052,61935,61814,61689,61559,61424,6 1284,61140,60989,60834,60673,60506, 60333,60153,59968,59776,59578,59372 ,59160,58941,58714,58479,58237,5798 7,57729,57462,57187,56904,56611,563 10,55999,55680,55351,55012,54664,54 306,53938,53560,53172,52774,52366,5 1947,51518,51079,50629,50169,49699, 49219,48728,48228,47717,47197,46667 ,46128,45579,45021,44455,43880,4329 6,42705,42106,41500,40887,40268,396 43,39012,38376,37735,37090,36441,35 789,35134,34478,33819,33160,32500,3 1839,31180,30521,29865,29210,28558, 27909,27264,26623,25987,25356,24731 ,24112,23499,22893,22294,21703,2111 9,20544,19978,19420,18871,18332,178 02,17282,16771,16271,15780,15300,14 830,14370,13920,13481,13052,12633,1 2225,11827,11439,11061,10693,10335, 9987,9648,9319,9000,8689,8388,8095, 7812,7537,7270,7012,6762,6520,6285, 6058,5839,5627,5421,5223,5031,4846, 4666,4493,4326,4165,4010,3859,3715, 3575,3440,3310,3185,3064,2947,2835, 2727,2623,2522,2426,2333,2243,2157, 2073,1993,1916,1842,1771,1702,1636, 1573,1511,1453,1396,1341,1289,1239, 1190,1144,1099,1056,1015,975,936,90 0,864,830,798,766,736,707,679,652,6 27,602,578,555,533,512,492,473,454, 436,300,250,200,150,100)
Alistair,Dan
Im useing the PICAXE Basic, not C. Cringe worthy, but for very good reasons, it was much easier and faster to code than C. The built in LCD and other hardware drivers are simple one word commands that would have taken huge effort to code in C. But there are other limitations of course.
I already have speed and accel/decel well sorted, its just the sigmoid curve manipulation left to do. BTW the PWM command in PICAXE is far too fast for half stepping , so I used pausesus and pulseout, works a treat.
Excecution overhead is not a problem, because this is all for a timelapse controller pause-move-pause action. ie the total distance travelled is divided by the number of exposures (pauses) into "slices" of motor movement, each calculated on the fly to give the illusion of smooth motion in the final sped-up video production.
So, this motion control and its accell/decell is done and not an issue, its the overall "change distance over a given time and at a given start speed to zero, smoothly" that is the problem. The sigmoid look up table already works well and is easy to use if speed and time are the only input values.
At the start of this, I couldnt even find a way of scaleing in exel, just to see what might be required to change the area under the graph, the answers in the thread fixed that, but leaves me with math I cant use in the picaxe, so it became obvious (short of mutiple lookup tables and extrapolating between them, which is still an option) that I need to manipulate the curve in other ways.
Splitting the curve into 3 doesnt look too good now as its hard to make the transition from the 2 end curves to the straight line smooth after scaling so ive thought of a few other ways.
Although I didnt want to touch the low res time axis, its seems that modifing it might be the easiest way, simply sliding it sideways, or adding time "slots" to the beginning and/or end. Or multiple table read outs of the tails in a 1,1,1,2,2,3,4,5....... 252,253,253,254,254,254 fashion to distort the curve ends without lowering resolution. Some testing showed large changes in area this way.
Dan, I cant use functions such as float, log and exp in picaxe basic (the log function is very low res), but yes, theres a challenge, scale the curve using only integer +-*/ :thumbsup:.
Im sorry if this has become a bit scatterbrain and seemingly impossible with all the inane restrictions, I do appreaciate the effort that has been put into replies, they have helped me understand the process with testing in excel.
Im convinced now that curve modification can be done, but by sort of "physical manipulation" rather than directly by math scaling.
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.