The Ziegler-Nichols tuning method is used to determine PID controller gains (Kp, Ki, Kd) based on the process model's stability point. The method involves: 1) Increasing Kp until the output oscillates at a frequency f0, defining the maximum gain Kmax. 2) Calculating gains using formulas based on Kmax and f0. 3) Applying the gains to a simulated hydraulic valve position control model, reducing steady state error and stabilizing the output. Further tuning can refine the gains.