Command Shaping
Optional Purchase Necessary: This feature is available only if you purchased the Dynamic Controls Toolbox option.
Command Shaping removes moveinduced vibrations that occur in lightlydamped mechanical structures. It filters the Position Command of the axis so that the move does not excite vibrations that usually occur. To use Command Shaping, you must know the frequency and the damping ratio of the oscillation.
A list of all Command Shaping parameters is at the end of this page. Go to the list.
Configuring Command Shaping
To measure the frequency and calculate the damping ratio of the oscillation, use the procedures that follow.
Step 1: Configure Data Collection
 In Studio, go to the Visualize workspace.
 In the Data Visualizer module, click the Configure Signals link. The Configure Signals dialog comes into view.
 In the Axes list, select the axis where you want an oscillation to occur during motion.
 In the Signals list, select these signals:
 Position Error
 Velocity Command
 Current Feedback
 Click Add Signals to List. Data Collection adds these signals to the Configured Signals list.

In the Period (msec) list, select a sampling period that is sufficient to capture the frequency of the oscillation that occurs.
IMPORTANT: If the sampling period is not sufficient, aliasing might occur to the frequency. If aliasing occurs, then Command Shaping does not remove the oscillation.
 In the Points box, enter the number of points you want Data Collection to collect. Make sure the number is sufficient to capture a small number of oscillations.
 Click Update to apply the configured signals and close the dialog.
Step 2: Command a move that excites the payload and supplies a plot with oscillations that are easy to find.

In the Command bar in the Workspace toolbar (refer to Immediate Commands), command a short move with a high acceleration. Data Collection will capture the necessary signals. You can use the example function that follows. The $distance and $coordinatedSpeed arguments that you specify for the move might scale up or down based on your system.
MoveLinear(X, 2, 300)

Look at the plot in the Data Visualizer module.
 If you can easily see the oscillations, go to Step 3.
 If you cannot easily see the oscillations, use the SetupCoordinatedRampValue() function to increase the ramp rate of the motion. Then the move excites the payload more and the oscillations are easier to see. Use the example function that follows. If necessary, increase the ramp rate until you can easily see the oscillations.
Then go to Step 3.
SetupCoordinatedRampValue(RampMode.Rate, 1000)
Step 3. Measure the frequency of the oscillation.
 On the plot in the Data Visualizer module, leftclick to get the left cursor. Use the left cursor to select one peak of the Position Error signal that is near the start of the oscillation.
 Rightclick to get the right cursor. Use the right cursor to select the adjacent peak.
 To get an accurate indication of the frequency, make sure that you put the left and right cursors at the correct peaks of the oscillation.
 In the Cursor Data pane of Data Collection, find the frequency of your selection. Record this value so that you can use it in Step 5.
Step 4. Calculate a value for the damping ratio.
 Put the left cursor on an oscillation peak of the Position Error signal.
 Visually count, from left to right, as many peaks in the oscillation as possible while you can clearly see the damped oscillations. The number of peaks you count becomes the number of the periods of the oscillation that are included in the calculation.
Tip: The number of peaks in the oscillation that you visually count becomes the value of n for the equation in this procedure. To get the best estimate of the damping ratio, include as many peaks as possible for this value.
 Put the right cursor on the last peak that you count.
 In the left and right columns of the Cursor Data pane, find the values of the left and right cursors for the PosErr(X) signal.
 Enter these values into the equation that follows. Then use the equation to calculate the damping ratio.
Tip: A typical damping ratio is between 0.2 and 0.01.
Where:
is the value of the damping ratio that you are calculating.
is the natural logarithm
is the number of periods of the oscillation that are included in the calculation. This is the number of oscillation peaks that you visually counted.
is the PosErr(X) value of the left cursor.
is the PosErr(X) value of the right cursor.
Step 4 Example
Let's say that in Step 4B, you visually count five oscillations. In Step 4D, the Cursor Data pane of Data Collection shows the value of the PosErr(X) signal as 0.000477 mm in the left column and 0.000347 mm in the right column.
Next, you enter these values into the equation:
Where:
is the value of the damping ratio that you are calculating.
is the natural logarithm.
because five periods of oscillation were used.
is the PosErr(X) value of the left cursor.
is the PosErr(X) value of the right cursor.
Then, you calculate a damping ratio of ≈ 0.01. This oscillation is lightly damped.
Step 5. Enter values for the frequency and the damping ratio.
 To configure Command Shaping parameters in Automation1 Studio, open the Configure Workspace. In the Axes category, select the Optimization topic and find the Command Shaping module. To see the coefficient parameters, click the View Coefficients link on the topright of the module. To see the shaper parameters, click the View Shapers link.
 Set the parameters to correct values. If you are using Command Shaping for the first time, select a value for the CommandShaper0Type parameter. If it is not the first time or if you are troubleshooting and adding one more frequency and damping ratio, adjust the CommandShaper1Type parameter.
 For a shorter move time, select Standard.
 For a more robust cancellation of the oscillation, select Extended. If you select this operation, a longer move time occurs.
Tip: If you cannot get the exact value of the frequency and must use an approximate value, Aerotech recommends that you select Extended.

For the CommandShaper0Damping parameter, enter the value that you calculated for the damping ratio.

For the CommandShaper0Frequency parameter, enter the value that you measured for the frequency of the oscillation in hertz.

Enable Command Shaping by moving the toggle next to the CommandShaperSetup parameter value to Enabled.

Click Save All to apply the new command shaping parameter values to the controller. When you are prompted, reset the controller.
At this time, it is typical for the move that you commanded in Step 2 to have no oscillation at the Command Shaping frequency.
Step 6. Do a test to make sure Command Shaping removed all oscillations of the frequency.
To make sure the Command Shaping feature removed all oscillations of the frequency that you measured from the move, refer to Step 2 and command the move again. If oscillations continue to occur, refer to the Troubleshooting Command Shaping section that follows.
You can also manually adjust the calculated Command Shaping coefficient parameters. To see the coefficient parameters, click the View Coefficients link on the topright of the module. After you manually set the coefficients, if you want to recalculate the coefficients based on the set of configured shapers, click the View Shapers link, and then click Sync Coefficients.
Troubleshooting Command Shaping
Oscillations might continue to occur in the commanded move. If you have problems with the Command Shaping feature, try these solutions.
Table: Command Shaping Problems and Solutions
Problems  Solutions 

Oscillations of the same frequency continue to occur in the move that you commanded. 

Oscillations of a different frequency occur in the move that you commanded.  Do Step 2 through Step 5 again to add one more frequency and damping ratio. Make sure that you edit the CommandShaper1Type, CommandShaper1Damping, and CommandShaper1Frequency parameters. 
Command Shaping Parameters
The parameters that follow are part of the Command Shaping feature. These parameters are available in Automation1 Studio only if you purchased the Dynamic Controls Toolbox controller option.
CommandShaperCoeff00 Parameter
CommandShaperCoeff01 Parameter
CommandShaperCoeff02 Parameter
CommandShaperCoeff03 Parameter
CommandShaperCoeff04 Parameter
CommandShaperCoeff05 Parameter
CommandShaperCoeff06 Parameter
CommandShaperCoeff07 Parameter
CommandShaperCoeff08 Parameter
CommandShaperCoeff09 Parameter
CommandShaperCoeff10 Parameter
CommandShaperCoeff11 Parameter
CommandShaperCoeff12 Parameter
CommandShaperCoeff13 Parameter
CommandShaperCoeff14 Parameter