. |
S-Curve Jerk AlgorithmThe move type, S_CURVE_JERK supports a jerk-specified S-Curve accel/decel profile. This algorithm is only available with custom firmware. For more information, see Controller Firmware. In the custom firmware, the Trapezoidal and S-Curve algorithm is replaced with the S-Curve Jerk algorithm. In the standard firmware, the S-Curve Jerk motion type is not supported and if specified, the MPI will return a "profile not supported" error. The S-Curve Jerk algorithm is ideal for making final adjustments to a move during the deceleration portion of the move and for making smoother transitions from one motion to the next. Also, the S-Curve Jerk algorithm makes it possible to exactly specify the maximum accel and decel and jerk values. The standard S-Curve algorithm first calculates the trapezoidal profile move from the specified velocity, accel, and decel values. Then the algorithm re-calculates the profile, deriving the accel, decel, and jerk values from the specified jerk percent. Since the algorithm always uses an initial Accel = 0, the start profiles and the modify profiles are calculated the same. The algorithm achieves identical move times for the Trapezoidal and S-Curve profiles by increasing the maximum acceleration, depending on the specified jerk percent. This algorithm is very efficient and easy to understand. The custom S-Curve Jerk algorithm calculates the move profile based on the specified velocity, accel, decel, and jerk values. It is a complex algorithm, which iteratively solves for the profile based on the initial and final conditions for velocity and acceleration. The resultant trajectory is limited by the specified velocity, acceleration, and jerk. The S-Curve Jerk algorithm does not support a specified jerk percent and is computationally intensive. Note: If your application does not require modifying S-Curve move profiles during execution, use the standard Trapezoidal or S-Curve algorithm. If your application requires motion profile modifications during acceleration or deceleration, and the acceleration rates are high, contact MEI to discuss a custom S-Curve Jerk algorithm. Below is a comparison of a modified motion with both algorithms.
S-Curve Algorithm: Notice the Modify calculations assume the initial acceleration
Parameters for jerk values should range from a minimum of amax* amax / vmax (amax is just reached when accelerating from 0 to vmax) and a maximum of amax / sample period (amax is reached in one sample period). In the S-Curve Jerk algorithm, changes to the jerk will also change the time needed to complete a motion. For example, a large value of jerk will have a shorter time, but increase the "jerkiness" of the motion (see fig 1). Conversely, a small value of jerk will have a longer time, but a much smoother motion (see fig 2).
The S-Curve Jerk parameters, accelerationJerk and decelerationJerk are located in the MPITrajectory{.} structure. When these are non-zero, the acceleration profile uses the specified jerk and acceleration to ramp an axis(es) to constant velocity and then decelerate to a stop. If accelerationJerk or decelerationJerk is zero, the MPI will return a "parameter invalid" error. Custom S-Curve Jerk Limitations: The S-Curve Jerk algorithm has the following limitations:
MPI 03.04.xx (and older) For the move type, MPIMotionTypeS_CURVE, the MPI calculates an appropriate jerk value based on the specified velocity, acceleration, and jerkPercent. The jerk value is computed according to the following formula: If jerkPercent is zero, the jerk value is computed so that the maximum acceleration is reached in one sample period. With the S-Curve algorithm, the time for a move would not change as jerkPercent value was varied. This is also true for this S-Curve algorithm, as long as the move reaches maximum velocity. In short moves, where maximum velocity is not reached, setting jerkPercent to be small will result in a quicker move than if you were to set jerkPercent to be large. WARNING! The same jerkPercent values may cause different profiles with the special S-Curve Jerk algorithm (implemented in firmware that supports the MPIMotionTypeS_CURVE_JERK move type) than with the standard S-Curve algorithm (implemented in firmware that does not support the MPIMotionTypeS_CURVE_JERK move type). This is because the special S-Curve Jerk algorithm treats the commanded acceleration as a maximum value, not to be exceeded. The new S_Curve algorithm behaves similarly to the previous algorithm, except for its attributes. MPIMotionAttrMaskDELAY can now be used with any start motion, but never with motion modify. MPIMotionAttrMaskAPPEND can be used with any motion, as long as it is not preceded by a motion that has a final velocity. MEIMotionAttrMaskNO_REVERSAL returns a MPIMotionMessagePROFILE_ERROR if the given specifications would result in a move with a reversal, thereby preventing the move from being executed. MPIMotionTypeTRAPEZOIDAL, MPIMotionTypeS_CURVE, and MPIMotionTypeS_CURVE_JERK MPIMotionAttrMaskRELATIVE, when used with MPIMotionTypeTRAPEZOIDAL, MPIMotionTypeS_CURVE and MPIMotionTypeS_CURVE_JERK means that the final position is relative to the beginning position of the motion. MEIMotionAttrMaskFINAL_VEL can be used with MPIMotionTypeTRAPEZOIDAL, MPIMotionTypeS_CURVE and MPIMotionTypeS_CURVE_JERK, but should be used with caution as it may not be possible for the controller to compute a trajectory to meet these criteria, which would cause a MPIMotionMessagePROFILE_ERROR to be returned, and the move to be ignored. Multi-Axis Motion Neither MPIMotionAttrMaskSYNC_START nor MPIMotionAttrMaskSYNC_END MPIMotionAttrMaskSYNC_START or MPIMotionAttrMaskSYNC_END but not both Both MPIMotionAttrMaskSYNC_START and MPIMotionAttrMaskSYNC_END MPIMotionTypeVELOCITY MPIMotionTypeVELOCITY moves allow a final velocity to be specified without a final point. MPIMotionAttrMaskSYNC_START and/or MPIMotionAttrMaskSYNC_END MEIMotionAttrMaskFINAL_VEL MPIMotionAttrMaskRELATIVE
|
| | Copyright © 2001-2021 Motion Engineering |