.

# Measurement-based Feedforward Tuning:

## Acceleration Feedforward

The Kaff term can be calculated if you know the DAC output versus commanded acceleration for a decent sample of motion types.

Acceleration feedforward on the XMP is calculated as follows:

Acceleration feedforward contribution to DAC (DAC counts)
= commanded acceleration (encoder counts / sample2) * Kaff (sample2 * DAC counts / encoder counts)

Kaff (sample2 * DAC counts / encoder counts) = Acceleration feedforward contribution to DAC (DAC counts) / commanded acceleration (encoder counts / sample2)

Ideally, we would use measured acceleration rather than commanded acceleration, but getting an accurate measured acceleration can be difficult.

Acceleration and friction feedforward are equally applicable to PID and PIV.

## Walkthrough

The first step is to find a move that consists of high accelerations in a trapezoidal profile. The constant velocity section does affect the result (an extremely long move is not required). The example here was performed on a Trust TA9000 test stand.

The move had the following trajectory parameters:

 Move length - 10,000 counts  Max Velocity - 80,000 counts / sec  Accel / Decel - 300,000 counts / sec2  2,000 Hz sample rate

First, measure the steady state DAC output for the acceleration and deceleration portions of the move. The key is to measure the DAC output at the very end of the move, once the ringing has had a chance to die down. Take a look at the examples below to see where to measure the DAC level.

Measuring DAC Command Level During Acceleration
Red - Commanded Accleration
White - DAC Command

The plot above shows that steady state DAC command value for the acceleration portion was 9741 DAC counts.

The next step is to measure the DAC command during deceleration.

Measuring DAC Command Level During Deceleration
Red - Commanded Accleration
White - DAC Command

The plot above shows that the steady state DAC command value during deceleration was -6692 DAC counts.

Now calculate the acceleration rate in counts / sample2. You will need the commanded acceleration rate in counts / second2 and the sample rate in Hz.

Acceleration (counts / sample2) = Acceleration (counts / second2) / (sample rate (Hertz))2

In this example our acceleration rate is:
300,000 (counts / second2) / (2,000 Hz)2 = 0.075 (counts / sample2)

In a very simple case you would just measure the DAC output and divide it by the acceleration. In this example you would get 9,741 / 0.075 = 129,880. Although this is one way of calculating Kaff, we are not compensating for friction and in most systems, friction is not negligable. In our example, neglecting friction would result in a ~26% error in Kaff.

To compensate for friction, use the average of the DACaccel and –DACdecel instead of just the DACaccel. The equation to do this is:

Kaff = (DACaccel - DACdecel) / 2 / Accel

In this example, we get Kaff = (9,741 - (-6,692) ) / 2 / 0.075 = 109,553

A Kaff = 109,553 is a decent number for this particular axis. The ideal Kaff value on this axis is about 103,000 at this sample rate, which is an error of about 6%. This error is mainly attributed to the unsophisticated method for getting the DAC level.

To show the significance of measuring the Kaff term, let's compare the system with the same PID values used above with Kvff and Kfff added, so the only tuning parameter not included is Kaff. The same move as above will be used.

Following Error with NO Acceleration Feedforward (Kaff)
Red - Commanded Accleration
White - Position Error

A peak position error of 102 encoder counts is seen without acceleration feedforward (Kaff).

Following Error with Acceleration Feedforward (Kaff)
Red - Commanded Accleration
White - Position Error

The peak position error with acceleration feedforward (Kaff) is 13 counts. That is an 87% reduction in peak position error! You can also see that there is a significant reduction in settling time.

 Legal Notice  |  Tech Email  |  Feedback        Copyright © 2001-2021 Motion Engineering