S-curves motion profiles add 'smoothing' segments to the traditional 3-phase trapezoidal profile (accelerate, coast, decelerate). Why is this better? The answer is beyond the motor, at the load itself.
For machines that do not use a direct drive approach, the load is 'somewhere out there' and the feedback sensor is on the motor. Beyond the motor, there may be a lead screw, a rack and pinion mechanism, bearings, linkages, and more. These mechanisms, inevitably, do not track the motor's motion perfectly, so, as you start to drive the load at high speed, the load's actual motion will take on a life of its own.
What is a S-curve?
A S-curve is a profile that recognizes that the motor profile needs, not only, to control the motor, but to minimize the amount of vibrational energy injected into the load.
Smoothing out the edges
How is this done? How is an s-curve different from a trapezoidal profile, and why does this matter to the amount of vibrational energy injected into the load mechanism?
To answer this question we must look at the shape of these two profiles. Figure 1 shows velocity profiles for an s-curve and a trapezoidal profile:
Figure 1: Velocity profiles for an S-curve and a trapezoidal profile
A full S-curve profile consists of 7 distinct phases of motion. Phase 1 starts moving the load from rest at a linearly increasing acceleration until it reaches maximum acceleration. In Phase II, the profile accelerates at this maximum acceleration rate until it must start decreasing as it approaches the maximum velocity. This occurs in Phase III when the acceleration linearly decreases until it reaches zero. In Phase IV, the velocity is constant until deceleration begins, at which point the profile decelerates in a manner symmetrical to Phases I, II and III.
A trapezoidal profile, on the other hand, has only 3 Phases. It is really a subset of an S-curve profile, with its phases corresponding to Phase II of the S-curve profile (constant acceleration), Phase IV (constant velocity), and Phase VI (constant deceleration). This fact underscores the difference between these two profiles: the s-curve profile has extra motion phases which transition between periods of acceleration and periods of no acceleration. The trapezoidal profile has no such phases and instantaneously transitions between conditions of acceleration and no acceleration, as shown in the figure above.
The motion characteristic that defines this change in acceleration, or transitional period, is known as "jerk". Jerk is a motion parameter in the same way that position, velocity, or acceleration are. Jerk is defined as the rate of change of acceleration with time. Referring back to the two profile types in the graphs above, in a Trapezoidal profile jerk (change in acceleration) is infinite at the phase transitions, while in the S-curve profile jerk is a constant value, spreading the change over a non-zero time period.
Getting rid of the jerks
S-curve profiles are smoother than trapezoidal profiles. This is evident from the graphs above. Why, however, does the S-curve profile result in less load-oscillation? The answer to this has to do with an important connection between the jerk that the load experiences and the inducement of vibrations in the load during, or after, the move is supposed to be complete.
For a given load, the higher the jerk, the greater the amount of energy that will show up as unwanted vibrations in the system, and, the broader the frequency spectrum of this vibration inducing energy will be. This means the more rapid the change in acceleration, the more powerful the vibrations will be, and the larger the number of vibrational modes that can be excited (Figure 2).
Figure 2: Vibrations from S-curve and Trapezoidal Profiles
Using this information to compare the amount, and type, of vibration energy produced by a trapezoidal profile with an S-curve profile, we see that a trapezoidal profile - because of its instantaneous change in acceleration - injects a relatively large amount of vibration energy into the system, and this vibration energy is spread over a wide range of frequencies. The S-curve profile injects lesser vibrational energy into the load and, just as importantly, the range of these vibrations cuts off rapidly at higher frequencies.
Putting S-curves to work
Now that we understand the principles involved, how can an S-curve be programmed, and what factors affect the smoothness and transfer times of the actual load?
Finding the optimum S-curve form for a given application is a matter of balancing the time spent transitioning from zero acceleration to maximum acceleration (Phases I & III) and as a percentage of the time spent at maximum acceleration (Phase II).
On one hand, if we spend nearly all our time transitioning (Phases I & III) and very little time at maximum acceleration (Phase II), the motion will be extremely smooth but the total time of the move will have increased. This is because, during Phase I, the S-curve profile travels only a short distance, therefore, the time spent during in phase at relatively low velocities will increase the overall transfer time.
On the other hand, if we spend only a small fraction of time in Phases I and III, with the remainder in Phase II, then the time of the total move will be very close to optimum for a given maximum acceleration; however, the profile will not be as smooth and may cause unwanted vibration in the load.
Often, relatively brief Phase I and III segments (relative to Phase II) can result in dramatic improvements in system smoothness and load-induced oscillation compared to a total lack of Phase I or Phase III (as is the case in a Trapezoidal profile). This is because even a short acceleration transition segment has a finite jerk value, as opposed to the zero-transition time of the trapezoidal profile which has an infinite, or undefined, value.
The following chart shows some common applications that benefit most from S-curve profiling:
In applications where transfer speeds are moderate and the load is stiff, Trapezoidal profiles may be perfectly adequate. But most applications benefit from at least some 'feathering' to reduce oscillations in the load.
Time for the rubber to hit the road
Figure 3 shows an apparatus setup in Performance Motion Devices' lab to illustrate the difference between drive motion and load motion and the important concept that to maximize load transfer time performance s-curve profile tuning is one of the best tools available.The basic elements are a linear motor, a load consisting of an inverted pendulum held by elastics and an encoder that can record the movement of the load.
Figure 3: Motion Defined by Profile S-curve/Trapezoidal
The load can rotate freely and is held in a vertical position by the tension of the elastics. This setup emulates a real-world machine where the load is connected via a mechanical assembly to the drive motor. All mechanical linkages have some 'give', which is represented by the elastics. Although exaggerated and simplified, this setup will provide useful results to illustrate some of the basic principles of S-curve motion.
We will start by driving the load using a Trapezoidal profile, as illustrated by the video below.
Notice that the load is driven into oscillation and doesn't settle down until well after the drive motor has finished moving.
The video below shows the same move, but with a good amount of s-curve added in. Notice that the load hardly vibrates at all! Despite a slightly longer profile execution time, the overall transfer time at the load is significantly lower:
The graph below shows data from the encoder and the following table provides a numerical summary of the results of the experiment.
Figure 4: Data from the motor encoder
S-curves are an important tool for minimizing the effective transfer time of a machine load, particularly when the motor is connected to the load via a mechanism. In the real world, this represents the vast majority of actual motion control applications.
S-curves work equally well for Servo systems as they do for step-driven systems and should be tuned to minimize the total transfer time, which is not just the motor but the total time taken to move and settle the load. Experimentation with a good motion capture screen is the best way to determine how much "S" to add to the motion profile and get your machine running at peak performance.
Article written by:
Founder and CEO
Performance Motion Devices
- The Mathematics of Motion Profiles
- Optimize Your Control Architecture for High Accuracy Syringe Dispensing
- Keep Your Step Motor Position with A Closed Loop Motion Control System
- Motoring to Success