The trapezoidal shape is said to eliminate the possibility of the O-ring popping out, unlike standard round-shape O-rings that rely on being pinched by the groove retaining ring for seal retention.
Figure 1 You can implement this velocity-profile section in software that you can use to provide digital or analog motor control. Figure 2 You use subtraction to calculate the area under the curve ...