|
PIV Tuning:
Applying the Position Loop Gain (Kpp)
At this point, we have a tuned velocity loop and need
to tune the position loop. The position loop consist of a proportional
and integral term.

Before You Start
When we tuned the velocity loop, we looked mainly at
velocity measurement. With the position loop, we will look mainly at the
position feedback. We will look at Position Error, DAC output and Commanded
velocity. We will use the commanded velocity to get a measure of where
we are in the motion we are commanding (it's easier to see the start and
stop of a motion in the velocity trace than the position trace). How do
I change from collecting velocity data to position data?
Start with a Kpp of 0.001 for low to medium resolution
systems. Use a Kpp of 0.000 01 for high resolution systems. Command the
same motion that you were using for the velocity loop tuning.
You can see that the position error plot goes off scale
because we have not set the scaling yet. Adjust the Y Scale until you
get the view you want.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.001
|
You can see that the position error plot goes off scale
because we have not set the scaling yet. Adjust the Y Scale until you
get the view you want.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.001
|
We will turn up Kpp until we see overshoot on the position
error that is acceptable or see other unacceptable behavior (noise). Turn
up Kpp in increments (~200%) until you find this limit. The following
figures show the progress from a very small Kpp (0.001) to the Kpp value
where instability sets in (0.4). At that point, turn down Kpp for a margin
of stability.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.002
|
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.004
|
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.01
|
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.02
|
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.04
|
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.1
|
Note the change in scale.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.2
|
Since we are starting to see some oscillation on the
position error plot, we will make smaller jumps in Kpp (50%).
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.3
|
We are getting to be on the verge of instability judging
from the increase in position error ringing. We will turn up gain until
we see instability. Let's cut to the chase and see the limiting value.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.4
|
Now that we have the limiting value, turn it down by
2/3.
|
|
| |
1,000 count move
50,000 count / sec velocity
300,000 count / sec2 accel / decel |
Red - Commanded Velocity
Green - Actual Velocity
White - DAC Output |
| |
Kpv = 9,000
Ka1 = 0.7
Kiv = 400
VintMax = 32767
Kpp = 0.133
|
Previous | Back to Table of Contents
|