5. Controller Design

Pi Control

PI Control in Controller Design

Imagine students, trying to keep a room at a comfortable temperature, or making a conveyor belt move at exactly the right speed in a factory 🏭. In both cases, the system needs a controller that can react when things go wrong and guide the output back toward the desired value. One of the most important controllers used in engineering is the PI controller, which combines proportional action and integral action.

What you will learn

By the end of this lesson, you should be able to:

  • Explain the main ideas and terminology behind PI control.
  • Describe how PI control works in a feedback system.
  • Connect PI control to the wider topic of Controller Design.
  • Use examples to show why PI control is useful in real systems.
  • Summarize how PI control helps reduce steady-state error.

PI control is used in many real-world systems because it gives a strong balance between speed, accuracy, and simplicity. It is especially useful when a system must reach a target and stay there without a long-lasting error.

What PI control means

A PI controller uses two parts:

  • Proportional control responds to the current error.
  • Integral control responds to the accumulated error over time.

The error is usually written as $e(t)$, where $e(t)=r(t)-y(t)$. Here, $r(t)$ is the desired setpoint and $y(t)$ is the measured output.

The control signal is often written as:

$$u(t)=K_p e(t)+K_i \int_0^t e(\tau)\, d\tau$$

In this equation:

  • $u(t)$ is the controller output.
  • $K_p$ is the proportional gain.
  • $K_i$ is the integral gain.
  • $e(t)$ is the error between desired and actual output.

This equation shows the main idea of PI control: the controller reacts both to the present error and to the history of error. If the output has been below the target for a while, the integral term grows and pushes the system harder in the correct direction.

How the proportional part works

The proportional term is the simplest part of the controller. It produces an output that is directly related to the current error:

$$u_P(t)=K_p e(t)$$

If the error is large, the response is large. If the error is small, the response is small. This makes the system react quickly 🚀.

Example

Suppose a drone is flying at a desired height of $10\,\text{m}$, but its actual height is $8\,\text{m}$. The error is

$$e(t)=10-8=2\,\text{m}$$

If $K_p=3$, then the proportional response is

$$u_P(t)=3\times 2=6$$

This tells the drone to increase its lift.

However, proportional control alone may still leave a small error. That leftover difference is called steady-state error. For example, a heater using only proportional control may get close to the target room temperature but not quite reach it, because once the room warms up, the error becomes smaller and the controller weakens.

How the integral part works

The integral term adds up error over time:

$$u_I(t)=K_i \int_0^t e(\tau)\, d\tau$$

This term is important because it keeps track of how long the error has been present. Even if the current error is small, a persistent error makes the integral grow. That means the controller keeps increasing its effort until the error is removed.

Why this matters

Suppose a water tank is supposed to stay at a certain level. If water is leaving the tank slowly, proportional control may not fully restore the exact level. The integral term notices that the level has been below target for a long time and increases the control action until the tank returns to the setpoint.

This is the main reason PI control is so useful: it can eliminate steady-state error in many systems.

The PI controller as a whole

A PI controller combines both terms:

$$u(t)=K_p e(t)+K_i \int_0^t e(\tau)\, d\tau$$

The two parts work together:

  • The proportional term gives a quick response.
  • The integral term corrects long-term offset.

This combination often gives better performance than either part alone. In a feedback system, the controller keeps checking the output, comparing it with the target, and adjusting the input.

Real-world example: speed control

Consider an electric motor driving a fan. The desired speed is $1500\,\text{rpm}$, but a load is added and the speed drops to $1450\,\text{rpm}$. The error is

$$e(t)=1500-1450=50\,\text{rpm}$$

The proportional part increases the motor input right away. If the speed remains slightly below $1500\,\text{rpm}$ for some time, the integral part builds up and keeps increasing the command until the motor reaches the target speed.

This is useful because many motors face changing loads. PI control helps them stay at the correct speed even when conditions change.

Why PI control is important in controller design

Controller design is about choosing a control strategy that makes a system behave the way you want. Engineers often choose between proportional, PI, PID, and other controllers depending on the task.

PI control is a major part of this topic because it offers a practical balance:

  • It is simpler than a full PID controller.
  • It usually performs better than proportional-only control.
  • It can remove steady-state error in many systems.

In many industrial processes, PI control is a standard choice. Examples include:

  • temperature control in ovens 🔥
  • motor speed control
  • liquid level control in tanks
  • pressure control in pipelines

These systems often do not need a derivative term. The derivative part is useful in some cases, but it can also be sensitive to noise. PI control is often easier to tune and more robust in practice.

Tuning the gains

The values of $K_p$ and $K_i$ strongly affect how the system behaves.

If $K_p$ is too small

The controller may respond too slowly and feel weak. The system can take a long time to reach the target.

If $K_p$ is too large

The system may respond too aggressively and overshoot the target. It may also oscillate.

If $K_i$ is too small

The system may still have a small steady-state error for too long.

If $K_i$ is too large

The integral term may grow too fast, causing overshoot and instability. This is sometimes called integral windup when the integral term becomes too large while the actuator is limited.

Example of tuning logic

If a heater is too slow to reach the desired temperature, an engineer may increase $K_p$ to speed up the response. If the heater reaches close to the target but stops short, $K_i$ can be increased so the controller keeps pushing until the exact temperature is reached.

Good tuning is about balance. The best controller is not simply the strongest one; it is the one that gives the desired performance without excessive overshoot or oscillation.

PI control in a feedback loop

PI control is normally used in a closed-loop system. The output is measured and fed back to the controller.

A basic feedback process looks like this:

  1. Compare the desired value and measured output.
  2. Compute the error $e(t)$.
  3. Use the PI formula to calculate $u(t)$.
  4. Apply the control input to the plant or system.
  5. Measure the new output and repeat.

This loop happens continuously in many systems. The controller does not need to know everything about the plant. It only needs feedback from the output.

Simple classroom analogy

Think of students adjusting a shower tap 🚿. If the water is too cold, you turn the hot tap more. If it stays too cold for a while, you keep adjusting until the temperature is right. The proportional part is like reacting to the current difference. The integral part is like remembering that the temperature has been wrong for several moments and pushing more until the error disappears.

Limitations and practical considerations

PI control is very useful, but it is not perfect.

Some important limitations are:

  • It may respond more slowly than a well-tuned PID controller.
  • Too much integral action can cause overshoot.
  • It may not perform well if the system changes too quickly or has strong delays.
  • Real actuators have limits, so the controller output cannot increase forever.

Engineers often test PI controllers using simulation or experiments before using them in a real machine. They look at response time, overshoot, oscillation, and steady-state error.

Despite these limits, PI control remains one of the most widely used controllers in industry because it is effective and reliable for many processes.

Conclusion

PI control is a key idea in Controller Design. It combines proportional action, which reacts to the current error, with integral action, which reacts to error over time. This makes it especially useful for removing steady-state error and keeping systems accurate.

students, when you study PI control, focus on how the two terms work together. Proportional control gives speed, while integral control gives long-term correction. Together, they help many real systems such as motors, heaters, pumps, and tanks operate smoothly and accurately. That is why PI control is such an important part of Control and Mechatronics.

Study Notes

  • PI control means Proportional + Integral control.
  • The error is $e(t)=r(t)-y(t)$.
  • The PI control law is $u(t)=K_p e(t)+K_i \int_0^t e(\tau)\, d\tau$.
  • The proportional term gives a fast response to the current error.
  • The integral term adds up past error and helps remove steady-state error.
  • PI control is commonly used in temperature, speed, level, and pressure control.
  • Too much $K_p$ can cause overshoot or oscillation.
  • Too much $K_i$ can cause overshoot and integral windup.
  • PI control is a major part of controller design because it balances simplicity, accuracy, and practical performance.
  • Understanding PI control helps explain how feedback systems adjust themselves to reach a desired output.

Practice Quiz

5 questions to test your understanding

Pi Control — Control And Mechatronics | A-Warded