View Single Post
  #13   Spotlight this post!  
Unread 10-08-2015, 12:04
Hugh Meyer's Avatar
Hugh Meyer Hugh Meyer is offline
Registered User
FRC #1741 (Red Alert Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Greenwood Indiana
Posts: 158
Hugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud of
Re: Elevator Motion Profiling / PID Ramping

Quote:
Originally Posted by Ether View Post

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
Attached Files
File Type: xls ExampleFromCDByHugh.xls (56.5 KB, 13 views)