# Optimization P-Gain

Navigation: Valve Firmware > Pressure Control > PI algorithm > Tuning > # Optimization P-Gain |

While optimizing P-Gain, the gas flow determined above has to be constant at all time.

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

Set chamber pressure to SP2, wait until the pressure is stable. Set pressure to SP1. If the transition from SP2 to SP1 results in a significant pressure over shoot or even does not stabilize at all, the P-Gain is too high. If there is no over shoot and the pressure reaches SP1 asymptotically and very slow, P-Gain is too low.

The optimal P-Gain value is found if the transition from SP2 to SP1 results in a slight pressure over shoot. It does not matter if there is still a deviation between SP1 and actual pressure.

Example: