Back to Blog
Education

How a PI Controller in a VFD Speed Control Works

Mike Keefe | November 21st, 2019

Across KEB’s line of inverters, a PI controller is used whenever closed-loop control is utilized. This blog post and the accompanying YouTube video describe how this PI controller is used in a VFD to provide precise speed and torque control of the motor.

 

 

What Is the PI Algorithm?

The PI (Proportional and Integral) controller is a commonly used method in control systems to correct for error between the commanded setpoint and the actual value based on some type of feedback.

 

KEB drives implement the PI controller in the speed control portion of the closed-loop control block diagram.

 

For KEB drives, the PI controller is implemented in the speed control portion of the closed-loop control block diagram. The command speed could be from a PLC, while the provided feedback can come from an encoder or be calculated using our Sensorless Closed Loop (SCL) control.

 

 

The first step of the PI controller is to calculate the error between the commanded and actual speed at that specific point in time. This error is then fed into the PI control algorithm, which can be broken into its respective Proportional and Integral parts.

 

 

Proportional Control

The first step of the PI controller in a VFD is the proportional control, which is the simplest of the two. The proportional control is used to respond immediately to any error between the command and actual speeds. The larger the error, the greater the proportional controller’s effect on the output to eliminate the error as quickly as possible.

The first term in this section is the Bias. This is a constant value and is typically set equal to the initial commanded output. Thus, with no initial error, there would be a smooth transition from open to closed loop.

 

 

Added to this bias are the product of the error at that point in time and the proportional controller gain. This gain is a programmable value in the KEB drive. The higher the value, the quicker the control will adapt to error. However, if the gain is too high, it will overshoot the command because it is over-controlling.

 

Graph showing command speed versus actual speed
Graphs showing VFD command speed (Black) vs. actual speed (Pink).

 

Integral Control

The second step of the PI controller is the integral control, which adds a little bit more complexity to the control. The integral control is used to eliminate long-term error and offset in the system.

 

 

Integral control still uses the proportional controller gain but adds the integral controller time constant, which is also programmable in the drive. These two parameters influence each other, so it may take some trial and error in tuning the control to get them at their ideal values when first starting up a system.

Importantly, the integral control considers the complete integral sum of the error rather than the current size of the error. Thus, the integral control will still be affecting the output if there is a built-up long-term error, even if there is no error at that specific point in time. The other thing to note about the integral term is that it is divided by the integral time constant.

Because of this, a smaller value will have more effect on the control.

 

How the PI Output is Calculated

There are three elements combined by the full PI controller. That includes:

• The bias constant
• The proportional term, which is the current error multiplied by Kc
• The integral term, which is the sum of error over time multiplied by Kc and divided by TI

All together, these produce a single output command that accounts for both immediate and accumulated error, driving the actual speed toward a setpoint.

 

PI Controller Implementation

 

Graph showing command speed and actual speed in a VFD
Graph showing the command speed (depicted with right angles) and the actual speed (curved line) as they eventually synchronize over time.

 

In the graph above, you can see the command speed jump straight from zero to the set point. However, due to real-world factors such as load inertia or current limits, the actual speed can’t perfectly follow this command.

Thus, the PI Controller in a VFD is implemented to make the actual speed follow the command as closely as possible.

 

Graph showing the proportional control implementation
The two points in time that you can estimate error values.

 

To implement the proportional controller, you would first simply calculate the error at each point in time by subtracting the actual speed from the command speed. This value would then be multiplied by the proportional control gain and then added to the bias.

Thus, a large error with a large proportional control gain would have a large effect on the output command, while a small error with a small gain would have a minimal effect.

 

Integral Control Implementation

 

Shows a graph of actual and command speed over time
The shaded area (red) is the difference between actual and command speed over time.

 

The integral control portion is more difficult to calculate because rather than simply subtracting the actual speed from the command speed, you must calculate the integral of the error from time zero to the current time. A rough estimate can be calculated by adding up all of the boxes between the command and actual value curves. This total sum of error is then multiplied by the proportional gain and divided by the integral time constant. This value is then added to the proportional term of the control algorithm to achieve the true PI controller output.

 

PI vs. PID Controller in a VFD

The “D” in PID stands for “derivative.” Where the PI corrects for current error and accumulated error over a span of time, the PID controller responds to how quickly the error is changing. This response makes it particularly useful in situations where conditions shift rapidly, and where precise transient response is important.

In most VFD applications, the loads of a given motor are inertial in nature, which means speed errors can change gradually instead of abruptly. So, the PI controller would be appropriate in this case, given that it handles the gradual change. When it comes to closed-loop motor control, PIDs may bring more complexity than the benefits justify.

 

VFD Tuning: How to Tune a PI Controller in a KEB Drive

VFD tuning is all about making small adjustments and watching how the drive responds. KEB’s Combivis 6 lets you monitor command vs. actual speed, and it does this in real time. So, you can view what each change is doing.

How to tune:
1. Set moderate proportional gain (Kc). From there, you’ll keep an eye on the speed response curve. For example: Is the drive overshooting the command speed? Or is the response too slow?
2. Adjust Kc as needed. Dial the proportional gain back if you believe it’s overshooting. Nudge it up if it seems like the response is sluggish.
3. Tune the integral time constant (TI). This will take care of any error sticking around after Kc is set.

Tip: Make small changes at a time. Kc and TI affect each other. If you make large adjustments at one time, you can wind up working in circles.

 

Where KEB Uses PI Control

KEB’s PI controller is worked into the closed-loop speed control of its COMBIVERT drive families. That includes the F6 VFD, S6 Servo Drive, and T6 Auxiliary Inverter. These drives are able to support encoder-based feedback as well as SCL control. So, precise speed control can be achieved across a range of applications.

In material handling, PI control helps keep conveyor speeds consistent. In packaging, it synchronizes axes.

In metalworking, PI control holds speeds under varying loads. And, in elevators, it can help nail precise floor-leveling. Combivis 6 is the tool that engineers in these industries use to set up and monitor the drive in each application.

 

FAQs

What’s the difference between a PI and a PID controller?
A PID adds a derivative term that responds to how quickly error is changing. A PI controller, on the other hand, corrects for current error and accumulated error over time.

How do you tune a PI controller on a VFD?
Set a moderate proportional gain (Kc). Observe the speed response in Combivis 6. Adjust the integral time constant (TI) for corrections.

Why don’t VFDs typically use the derivative term?
It amplifies noise in speed feedback signals. This can destabilize control, bringing unnecessary complexities to applications.

Is PI control the same as closed-loop control?
No. PI is the algorithm processing error in a closed-loop control system.

 

PI Controller Benefits

The PI Controller in a VFD is a relatively simple way to achieve a robust and fast responding closed-loop control system. By adjusting two parameters, the drive can quickly respond to errors between the command and actual speed while also eliminating any long-term error in the system. This allows the KEB drive to achieve precise speed control of the motor.

Interested in how the PI controller used for closed-loop control in KEB drives could benefit your machine? Contact an Applications Engineer at KEB America today.

Contact Us

Let's Work Together

Connect with us today to learn more about our industrial automation solutions and how to commission them for your application.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.