Ziegler–Nichols PID starting values and control valve Cv sizing
Two instrumentation calculations: classic Ziegler–Nichols PID starting settings and the basic liquid control valve Kv and Cv equation, with limits of each.
Part 1: what the Ziegler–Nichols calculator does
The classic closed-loop Ziegler–Nichols method starts from two measured quantities: the ultimate gain Ku, the proportional gain at which the loop oscillates steadily, and the ultimate period Pu, the time of one oscillation. The Ziegler–Nichols PID tuning calculator converts these into starting P, PI or PID settings.
- P: Kp = 0.5 Ku
- PI: Kp = 0.45 Ku, Ti = Pu ÷ 1.2
- PID: Kp = 0.6 Ku, Ti = Pu ÷ 2, Td = Pu ÷ 8
- Ki = Kp ÷ Ti and Kd = Kp × Td
Worked examples for tuning
Example A. Ku = 4.0 and Pu = 30 s, PID. Kp = 0.6 × 4.0 = 2.4. Ti = 30 ÷ 2 = 15 s. Td = 30 ÷ 8 = 3.75 s. Ki = 2.4 ÷ 15 = 0.16 per second. Kd = 2.4 × 3.75 = 9 seconds. With the same Ku and Pu as PI: Kp = 1.8, Ti = 25 s, Ki = 0.072; as P: Kp = 2.0.
Example B. Ku = 2.5 and Pu = 48 s, PI. Kp = 0.45 × 2.5 = 1.125. Ti = 48 ÷ 1.2 = 40 s. Ki = 1.125 ÷ 40 = 0.028125, shown by the calculator rounded to 0.0281 per second.
If the controller uses proportional band, band (%) is commonly 100 ÷ gain, so a gain of 2.4 corresponds to about 41.7 %. Confirm this against the controller manual, because conventions differ.
Limits of Ziegler–Nichols tuning
The values are a starting point and the values often give an aggressive response with overshoot, so they usually need to be detuned. Finding Ku and Pu means driving the loop to sustained oscillation, which is not safe or acceptable on every process and should only be attempted under the site procedure with operations agreement. Gain may be expressed as proportional band, time units differ between vendors, and some controllers use series, parallel or other algorithm forms. A few steps are usually needed: record Ku and Pu from a trend, calculate the starting set, apply a reduced gain first (for example by lowering Kp and lengthening Ti) and watch the next setpoint or load change before going further. The method does not account for noise, valve backlash, measurement filtering, deadtime-dominant processes or interacting loops.
Part 2: liquid control valve Cv
The control valve Cv calculator uses the basic equation for turbulent, non-choked liquid flow. Q is flow in m3/h, ΔP is pressure drop across the valve in bar and SG is specific gravity relative to water:
- Kv = Q × √(SG ÷ ΔP)
- Cv = Kv ÷ 0.865, which is about 1.156 × Kv
Kv is in m3/h per √bar and Cv in US gpm per √psi. The calculator does not include viscosity correction, choked or flashing flow, cavitation, pipe reducers or valve recovery factors.
Worked examples for Cv
Example C. Water, Q = 50 m3/h, ΔP = 2 bar, SG = 1. Kv = 50 × √(1 ÷ 2) = 35.3553. Cv = 35.3553 ÷ 0.865 = 40.8732.
Example D. A liquid with SG = 0.85, Q = 30 m3/h, ΔP = 1.5 bar. Kv = 30 × √(0.85 ÷ 1.5) = 22.5832. Cv = 22.5832 ÷ 0.865 = 26.1077.
Example E. Same water service at several flows with ΔP held at 3 bar: 80 m3/h needs Kv = 46.1880 (Cv 53.3966) and 5 m3/h needs Kv = 2.8868 (Cv 3.3373). If a valve had a hypothetical rated Cv of 63, the 40.8732 of example C would use about 65 % of that rating. These values show how widely the required coefficient moves with flow, which is why minimum, normal and maximum conditions all need checking. In practice the available drop usually changes with flow, so using one fixed drop is an approximation.
Common mistakes
- Treating Ziegler–Nichols values as final tuning and not detuning for overshoot.
- Entering gain in the wrong form, such as proportional band as if it were gain.
- Mixing time units between seconds and minutes.
- Forcing a loop to oscillate on a process that cannot tolerate it.
- Entering valve flow in the wrong unit or ΔP in kPa or psi instead of bar.
- Selecting a valve with a rated Cv exactly equal to the result, with no margin.
- Using the equation for gas, steam, flashing or highly viscous liquids.
- Sizing only at the normal flow, so that the valve sits near closed at minimum flow or near fully open at maximum.
Checks before you trust the result
- Confirm the controller algorithm form, time units and gain convention in its documentation.
- Change settings in small steps and observe the response, with the process owner aware.
- For the valve, confirm the pressure drop is across the valve at the stated flow, not a system total.
- Check cavitation, flashing, noise, rangeability and fail position with the manufacturer sizing method; the IEC 60534-2-1 equations are the usual reference for final selection.
- Treat both results as estimates, not as final design data.
Frequently asked questions
Why does Ziegler–Nichols often overshoot?
It was designed for a fast response to disturbances rather than low overshoot, so detuning is normally needed.
What if I cannot oscillate the loop?
Use another tuning approach recommended by the controller or process owner. This calculator needs Ku and Pu.
Is Cv the same as Kv?
No. They use different units. This calculator divides Kv by 0.865 to obtain Cv.
Should the valve be sized exactly to the calculated Cv?
No. Select a valve with a larger rated value and then check the working travel at minimum, normal and maximum flow with the manufacturer method.
Recording data
Record the controller tag, algorithm form, units, Ku, Pu, the settings before and after, and the observed response. For valves record flow, drop, SG, temperature, the calculated Kv and Cv, and the selected valve rating. A dated record of each change to the tuning, with the reason, makes it possible to return to a previous set of values if a change makes the loop worse. Keep the source of each input, such as a datasheet, a measured trend or a process assumption, so that the basis can be reviewed later.