PID with VFD
What Is PID Control with a VFD?
PID control with a VFD means automatically changing motor speed to keep a measured process variable close to a desired value. Instead of simply telling the drive to run at a fixed frequency such as 40 Hz, the system continuously reads real process feedback and adjusts motor speed as demand changes.
A water-pressure system is an easy example. If the required pipe pressure is 5 bar, that value becomes the SP – Setpoint. A pressure transmitter measures the actual pressure, called the PV – Process Value.
If pressure falls to 4.2 bar, the PID controller increases the VFD output frequency. If pressure rises above the target, it reduces frequency. The operator therefore does not have to keep adjusting motor speed manually as water demand changes.
The basic control loop is:
Setpoint → PID Calculation → VFD Frequency → Motor / Pump → Process → Sensor → Feedback → PID
One important distinction is that the controlled variable does not have to be motor speed. A VFD process PID loop can regulate pressure, flow, level, temperature, vacuum or another measurable process quantity. Motor speed is simply the actuator used to influence that process.
PID simulation · How does it work? · What are P, I and D? · PID tuning · FAQ
Try VFD PID pressure control
Set the required pressure in the educational model below and start the system. Then increase water demand. Process pressure initially falls, after which the PID controller raises VFD frequency and increases pump speed.
You can also change Kp, Ki and Kd to see why a loop can become slow, overshoot the target or begin to oscillate.
Note: This simplified model is intended to demonstrate PID behaviour. It must not be used to size a real pump, piping system, sensor or drive.
How does the PID controller inside a VFD work?
The controller continuously compares two values:
SP – Setpoint: the value we want.
PV – Process Value: the value actually measured by the sensor.
The difference between them is the error:
Error = Setpoint − Feedback
If the required pressure is 5 bar and the sensor measures 4 bar, the error is +1 bar. The PID controller responds by increasing its output, causing the VFD to raise motor frequency.
As pressure approaches 5 bar, the error becomes smaller and the correction is reduced. The objective is not to run the motor at maximum speed, but to produce only the speed required to maintain the process target.
Why does a PID loop need a sensor?
Without feedback, the controller cannot know the actual process condition. A pressure-control system uses a pressure transmitter; a flow-control system may use a flowmeter, and a level-control system uses a suitable level sensor.
A common industrial feedback signal is 4–20 mA. For example, a 0–10 bar pressure transmitter may be scaled as:
4 mA = 0 bar
12 mA = 5 bar
20 mA = 10 bar
The drive analog input must be configured for the correct signal type. Connecting a 4–20 mA transmitter while the input is configured as 0–10 V produces an incorrect process value before PID tuning even begins.
For a wider introduction to measurement devices, see What is a sensor?.
What do P, I and D mean?
P – Proportional responds to the present error. A large difference between setpoint and feedback produces a stronger correction.
If proportional gain is too low, the system can respond slowly. If it is too high, the process may repeatedly move above and below the setpoint.
I – Integral accumulates error over time and helps remove the small steady-state offset that can remain with proportional control alone.
For example, if a pressure system remains at 4.8 bar while the target is 5 bar, integral action gradually increases the command until that persistent error is reduced.
Too much integral action can cause overshoot and slow oscillation because the accumulated correction may continue to influence the output after the process reaches the target.
D – Derivative responds to how quickly the error is changing. It can provide damping when a process is approaching the setpoint too quickly.
Derivative action is also sensitive to measurement noise. For many relatively slow pump and pressure systems, a PI controller may be a practical starting point, with derivative action added only when the process genuinely benefits from it.
For the wider control theory, see What do P, I and D mean?.
How is PID related to the VFD frequency reference?
In ordinary VFD operation, output frequency may be commanded from a keypad, potentiometer, analog signal, fieldbus or PLC.
See VFD frequency reference for the basic principle.
When process PID is active, the operator does not necessarily command motor frequency directly. The PID algorithm calculates the required speed or frequency reference from the process error.
Manual control: “Run the motor at 40 Hz.”
PID process control: “Keep the pipe at 5 bar and determine the required motor speed automatically.”
Is process PID the same as closed-loop motor speed control?
No. Both use feedback, but the measured variable can be completely different.
Closed-loop motor control may use an encoder to measure actual motor speed or position. A process PID loop may instead measure pipe pressure, flow, tank level or temperature.
A pump can therefore operate without a motor encoder while the overall pressure process still operates as a closed feedback loop through the pressure transmitter.
Where should VFD PID commissioning begin?
First verify the feedback signal. If the transmitter produces 4–20 mA, configure the correct analog input type and scale 4 mA and 20 mA to the correct engineering values.
Verify engineering units. A value shown as 50 may mean 50%, 5.0 bar or another scaled quantity depending on the drive configuration.
Check controller direction. In a pressure-boosting pump, lower pressure should normally result in higher speed. If frequency falls as pressure falls, the PID action may be configured in the wrong direction.
Check minimum and maximum speed limits. A PID controller cannot produce more process output once the drive is already at its maximum permitted frequency.
Remember acceleration and deceleration ramps. Even an aggressive PID command cannot make the motor respond faster than the drive's configured ramps and the physical machine allow.
Start conservatively. Proportional action can first be increased until the process responds clearly. Integral action can then be added to remove persistent error. Derivative action should be used only where it genuinely improves the process.
Parameter names vary greatly between manufacturers. One drive may use Kp, Ki and Kd, while another uses gain, integral time and derivative time. Values should therefore not be copied blindly from one drive model to another.
Why is PID direction important?
When pipe pressure falls in a booster-pump application, speed normally needs to increase. Other processes may require the opposite output behaviour.
Manufacturers may describe this using terms such as direct, reverse, inverted or deviation inversion.
The most useful commissioning question is:
When PV moves below the target, which way must the actuator move to correct the process?
What are PID Sleep and Wake functions?
In water systems, demand may become very low at night. The PID controller can continue reducing pump speed until the motor runs slowly for long periods even though almost no water is being used.
A sleep function can stop the pump when demand remains low and the required conditions are met. The drive can continue monitoring process pressure while the motor is stopped.
When pressure falls below the configured wake-up level, the drive restarts the pump and resumes PID regulation.
This can reduce unnecessary low-speed operation, running hours and, in suitable pumping systems, energy consumption.
Does PID automatically save energy?
The main purpose of PID is process regulation, not energy saving.
However, in variable-demand pumps and fans, maintaining the process by reducing motor speed instead of running continuously at full speed can result in substantial energy benefits. The actual saving depends on the load, process curve and operating profile.
Built-in VFD PID or PLC PID?
For a simple system with one pump and one pressure transmitter, the PID controller built into the VFD can be an elegant and economical solution.
A PLC becomes more attractive when the process includes several pumps, valves, sequencing, redundancy, recipes, multiple control loops, advanced alarms or supervisory logic.
The two approaches can also be combined. A PLC may provide the setpoint and operating logic while the fast process loop remains inside the VFD.
For the wider PID knowledge tree, see PID Control FAQ.
Common VFD PID mistakes
Incorrect transmitter scaling: A 0–10 bar sensor incorrectly scaled as 0–100 bar makes correct PID regulation impossible.
Mixing 4–20 mA and 0–10 V inputs: The electrical input and parameter configuration must match the transmitter.
Wrong controller direction: The output moves the process farther away from the setpoint instead of correcting it.
Excessive proportional gain: The process can oscillate continuously around the target.
Too much integral action: Slow oscillation and overshoot can appear.
Minimum frequency set too high: The pump continues producing too much pressure during low demand.
Poor sleep/wake settings: The pump may repeatedly start and stop or fail to wake when required.
Ignoring analog-signal noise: Motor and VFD cables can introduce interference into low-level feedback wiring if routing, shielding and grounding are poor.
VFD PID FAQ
Do I need a PLC to use PID with a VFD?
No. Many drives include an internal process PID controller and can read a suitable analog process transmitter directly.
Does PID control motor speed or pressure?
The process variable is the real target. In a pressure system PID regulates pressure, while motor speed is the manipulated output used to achieve that pressure.
Can a pressure transmitter connect directly to a VFD?
Often yes, provided the drive has a compatible analog input and the transmitter's signal, power and wiring requirements are satisfied.
Is 4–20 mA better than 0–10 V?
Both are widely used. Current-loop signals can offer advantages in many industrial installations and over longer cable runs, but the correct choice depends on the available equipment and application.
Does process PID require an encoder?
Normally not for pressure, flow or level control. Feedback comes from the corresponding process sensor rather than from a motor encoder.
Must the D term always be used?
No. Many processes can be controlled successfully with PI control. Derivative action should be added only if it provides a measurable benefit.
Why is the drive at maximum frequency but pressure is still too low?
Possible causes include insufficient pump capacity, leaks, incorrect rotation, valve position, incorrect sensor scaling, a restrictive frequency limit or a mechanical pump problem.
Why does pressure keep moving around the setpoint?
PID tuning, process delay, sensor noise, ramp settings and the physical dynamics of the piping system should all be considered.
Why does the loop respond slowly after I change the setpoint?
Low controller gains, long VFD ramps, filtering, process inertia or output limits can slow the response.
What does the potentiometer do when PID is enabled?
Depending on drive configuration, an analog potentiometer may be used to adjust the PID setpoint rather than directly commanding output frequency.
Related VFD and PID topics
What Is a VFD? · Frequency Reference · P, I and D Components · PID Control FAQ · PID Pressure Control
