# Optimizing P-Gain

Navigation: Valve Firmware > Pressure Control > Softpump algorithm > Tuning > # Optimizing P-Gain |

Start optimization with P-Gain set to 0.1 and I-Gain set to 0.0.

The pump down routine has to be controlled as follows:

•Move control valve into close position.

•Start pump down by opening the pump isolation valve or starting the pump.

•Send the pressure set point to the valve controller.

While pumping down, chamber pressure and valve position data should be logged to compare the actual pump down curve with the ideal straight pump down line.

If the pressure follows the ideal pump down line with significant delay, the P-Gain is too low.

If the pressure oscillates around the ideal pump down line or if the valve position oscillates, P-Gain is too high.

P-Gain is optimized if the pressure follows the ideal pump down line closely and the valve position is not oscillating at all.

Example: