.

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?

We will start at Kpp = 0.001 and turn it up in a similar fashion to the other parameters.

1,000 count move
50,000 count / sec velocity
300,000 count / sec²
Red - Command Position
Yellow - Actual Position
White - Position Error
Kpv = 5,000
Ka1 = 0.7
Kpp = 0.001
VintMax = 32767 
 

We will not look at every result until we see significant changes in the plot. In the plot below, we have turned up Kpp = 0.01.

1,000 count move
50,000 count / sec velocity
300,000 count / sec²
Red - Command Position
Yellow - Actual Position
White - Position Error
Kpv = 5,000
Ka1 = 0.7
Kpp = 0.01
VintMax = 32767 
 

You can see that the main difference between Kiv = 0.01 and Kiv = 0.1 is reduced Position Error (white). Our goal is to adjust Kpp to get the fastest settling possible while keeping the position error to a minimum. The settling will be much faster after we apply the position integral.

1,000 count move
50,000 count / sec velocity
300,000 count / sec²
Red - Command Position
Yellow - Actual Position
White - Position Error
Kpv = 5,000
Ka1 = 0.7
Kpp = 0.1
VintMax = 32767 
 

At Kpp = 0.3, you can start to see ringing at the end of the move on the Position Error (white). At this point, we will want to turn down Kpp. First, let's turn up Kpp so we can see what happens with excessive Kpp.

1,000 count move
50,000 count / sec velocity
300,000 count / sec²
Red - Command Position
Yellow - Actual Position
White - Position Error
Kpv = 5,000
Ka1 = 0.7
Kpp = 0.3
VintMax = 32767 
 

We can see the ringing becomes more severe at Kpp = 0.5.

image

1,000 count move
50,000 count / sec velocity
300,000 count / sec²
Red - Command Position
Yellow - Actual Position
White - Position Error
Kpv = 5,000
Ka1 = 0.7
Kpp = 0.5
VintMax = 32767 
 

At this point, we will set Kpp back to Kpp = 0.1 and move on to the Applying the Position Loop Integral (Kip). See Comparing Different Move Times with Different Under Damped Peaks for additional information on settling time and Kaff, which can help reduce ringing.

Previous | Next


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