Quote:
Originally Posted by Ether
If you need to change the setpoint only when the speed is zero, it's pretty straightforward to generate a sinusoidal profile for smooth acceleration and deceleration.
Given the max desired acceleration M and the distance D to the new position, compute the constants T, K1, K2, and K3 as shown in the equations. Then you can use the functions a(t), v(t), and x(t) to generate a nice smooth trajectory to the new target. "t" is elapsed time from start of profile.
Note that T will be the time-to-destination and K2 will be the maximum speed.
See the example profile for M=3.5 ft/s2 and D=5 ft.
|
Ether,
I created a spreadsheet to see if I could duplicate your example. Everything matches except for your statement "K2 will be max speed". My spreadsheet shows the max speed as 3.33 (cell I17) with a K2 value of 1.66 (cell D8). What am I doing wrong? Attached is my example sheet.
-Hugh