RSS Daily tech news
  • New quantum algorithm solves “impossible” materials problem in seconds
    A new quantum-inspired algorithm has cracked a problem so massive that conventional supercomputers struggle to even approach it. Researchers used the method to simulate extraordinarily complex quantum materials known as quasicrystals, opening the door to powerful new quantum devices and ultra-efficient electronics. The work could help scientists design advanced topological qubits and materials for future […]
  • The hidden atomic gap that could break next-generation computer chips
    A major obstacle may be standing in the way of the next generation of ultra-tiny computer chips. Researchers discovered that many promising 2D materials lose their advantages because an invisible atomic-scale gap forms when they are combined with insulating layers. That tiny gap weakens electronic performance and could prevent further miniaturization. The team says new […]
  • Stanford’s new chip boosts light 100x with surprisingly low energy
    Researchers at Stanford have developed a compact optical amplifier that dramatically boosts light signals using very little power. By recycling energy inside a looping resonator, the device achieves strong amplification with minimal noise and wide bandwidth. Its efficiency and small size mean it could run on batteries and be integrated into consumer electronics. This breakthrough […]
  • Scientists capture electrons forming strange patchy patterns inside quantum materials
    Researchers have, for the first time, directly visualized how electronic patterns known as charge density waves evolve across a phase transition. Using cutting-edge microscopy, they found these patterns form unevenly, breaking into patches influenced by tiny structural distortions. Unexpectedly, small pockets of order persist even above the transition temperature. This reveals that electronic order fades […]
  • First ever atomic movie reveals hidden driver of radiation damage
    Researchers have visualized atoms in motion just before a radiation-driven decay process occurs, revealing a surprisingly dynamic scene. Instead of remaining fixed, the atoms roam and rearrange, directly influencing how and when the decay unfolds. This “atomic movie” shows that structure and motion play a central role in radiation damage mechanisms. The findings could improve […]
  • MIT scientists finally see hidden quantum “jiggling” inside superconductors
    MIT physicists have built a powerful new microscope that uses terahertz light to uncover hidden quantum motions inside superconductors. By compressing this normally unwieldy light into a tiny region, they were able to observe electrons moving together in a frictionless, wave-like state for the first time. This discovery opens a new window into how superconductors […]

PID tuning methods

by Florius
Educational slide showing a graph of a PID-controlled system’s step response. The plot displays overshoot, oscillation, and settling behavior as the process value (green) approaches the set point (blue). The image focuses on techniques for tuning PID parameters using a PIC microcontroller and MPLAB X IDE.

Rule-based PID tuning methods asssume that there is a system response that can be put into an easy mathematical description. The  characteristics of this response can be derived from experiments by either putting a step response on an open loop, or by tuning a closed loop system in a certain way. Note that the tuning methods described here are very sensitive to any discrepancies with respect to the assumed process (in this case a First Order Plus Dead Time, FOPDT). Deviations to the time delay will greatly degrade the PID performance.

The important PID parameters of the general PID control algorithm are presented here:

\[u(t) = K_P \left( e(t) + \frac{1}{T_I} \int_{0}^{t}  e(t) dt + T_D \frac{e(t)}{dt}  \right)\]
where

u(t) = Controller output
Kp = Proportional Gain
Ti = Integral time
TD = Derivative time
e(t) = error between setpoint and process value.

1. Heuristic tuning

This is basically the trial-and-error method. With enough experience of PID parameters, you can roughly estimate the initial guess. Especially with just a proportional controllers, you might want to give this method a try. With existing systems, you might want to tweak the parameters slightly.

In the following table I show the effects of what happens when you increase a parameter independently.

Parameter Rise Time Overshoot Settling time Steady-state error Stability
Kp
Decrease
Increase
Small change
Decrease
Degrade
Ki
Eliminate
Increase
Increase
Eliminate
Degrade
Kd
Minor change
Decrease
Decrease
No effect in theory
improve if increase is small

2. Ziegler-Nichols closed-loop tuning method

The Ziegler-Nichols closed-loop tuning method allows you to use the ultimate gain value, KU, and the ultimate period of oscillations, TU to calculate to calculate KC, Ti, and TD in a system with feedback. The Ziegler-Nichols closed-loop tuning method is limited to tuning processes that cannot run in an open-loop environment. To determine the values of these parameters, and to calculate the tuning constants, use the following procedure:

1. Set Ki = KD = 0 and start with a low value for KP.

Graph showing the step response of a system controlled by a PID controller with low gain settings. The process value rises slowly toward the set point with little to no overshoot, illustrating a stable but sluggish system reaction. Used to demonstrate the effect of low proportional gain in control tuning.

2. Increase KP until you reach undamped response, which for my particular system happens to be KP = 4.2.

Graph depicting a step response with an underdamped system behavior due to high PID gain. The process value overshoots and oscillates significantly before settling, demonstrating the effects of aggressive tuning on system stability. Useful for visualizing tuning pitfalls in PID control.

3. Record the Ultimate Gain (KU = 4.2), which is the proportional gain at the moment of undamped response and its corresponding Ultimate Period of oscillation (TU = 15 s) in seconds.

Graph illustrating a PID-controlled system operating at ultimate gain, where the process value exhibits continuous oscillations without settling. This condition is used in the Ziegler–Nichols tuning method to determine critical gain and period for calculating optimal PID parameters.

4. Utilize the parameters directly extracted from the Ziegler-Nichols table using the two values previously obtained. Referencing the table below, you can explore various control configurations, ranging from a simple P control to combinations of P, I, and D. It’s worth noting the table’s organization, featuring columns for both TI and TD, along with separate columns for the corresponding KI and KD values, depending on the parameter needed.

Table summarizing the Ziegler–Nichols tuning rules for PID controllers. It lists formulas to calculate proportional (Kp), integral (Ti), and derivative (Td) constants based on the system's ultimate gain (Ku) and ultimate period (Tu). Useful for configuring P, PI, and PID control modes in embedded systems.

You can integrate the obtained KP, TI, and TD (or KI and KD) into your system. Presented below are the outcomes for my particular system employing either P, PI, or PID control. While tuning all three parameters might offer optimal performance, it’s prudent to exercise caution when tuning the derivative term in the PID controller. Various factors, such as noise interference and unprecise sampling timing in discrete measurements, can introduce instability. Despite this, the inclusion of the derivative term theoretically yields the best results, as demonstrated by the settling times showcased below.

Graph showing a step response of a system under a well-tuned PID controller. The process value quickly reaches the set point with minimal overshoot and no sustained oscillation, demonstrating optimal tuning for fast and stable system performance.

3. Ziegler-Nichols open-loop tuning method

Table outlining the Cohen–Coon tuning formulas for PID controllers based on process reaction curve parameters. It includes expressions for calculating Kp, Ti, and Td depending on delay and time constants, providing an alternative to Ziegler–Nichols for process control applications.

The Ziegler-Nichols open-loop tuning method is quite a popular technique for PID controllers. The basic test requires that the response of the system be recorded as a function over time, preferably in some sort of plot as shown here. From there, you can determine the valeus of these parameters and calculate the tuning constants, by using the following procedure:

  1. Create an open-loop test.
  2. From the process response curve, determine the time delay (L), or also called dead time or lag.
  3. Measure the time constant T. To do this accurately, take the time difference between the intersection at the end of the time delay and where it is reaching 63% of its total change.
  4. Measure the value  that the response reaches at steady-state, and note the step change itself, X0 (the height of the step change).
  5. Determine the tuning constants in the table below by using the the Ziegler-Nichols open-loop tuning equation: \[K_0 = \frac{X_0}{K}\frac{\tau}{L}\]
Table presenting the open-loop Ziegler–Nichols tuning method for PID control. It uses the process’s time delay (L) and time constant (T) from the step response to compute the proportional gain (Kp), integral time (Ti), and derivative time (Td) for P, PI, and PID controllers.

Advantages:

  • Quick and easy.
  • Popular method.
  • Less disruptive than the Ziegler-Nichols closed-loop tuning method.

Disadvantages:

  • The values TI and TD are based solely on the proportional measurement.
  • It does not work for I, D and PD controllers.
  • Approximations of the gains may not work for different systems.

4. Cohen-Coon tuning method

Table displaying Cohen–Coon tuning equations for calculating proportional gain (Kp), integral time (Ti), and derivative time (Td) for P, PI, and PID controllers. Based on process dynamics such as delay time (L) and time constant (T), the method is ideal for first-order processes with dead time.

The Cohen-Coon tuning method corrects the slow, steady-state response given by the Ziegler-Nichols method when there is a large dead time L, relative to the time constant τ. This method only works in practice if L is large, otherwise unreasonably large controller gains will be predicted. Hence it only works for first-order models with a time delay.

It has a similar procedure as the Ziegler-Nichols open-loop tuning method, but note that the step change can only be introduced when the system is at steady-state.

For the Cohen-Coon method, there is again a set of predetermined settings to get a minimum offset and a standard decay ratio of 1/4 WDR. This means that the amplitude of oscillations reduces by 75% with each cycle. This creates a faster response, but can also be more oscillatory. With the values of K, L and T, you can find the right parameters to optimize Cohen-Coon predictions in this table.

Advantages:

  • Used for systems with time delay.
  • Quicker closed-loop reponse time.

Disadvantages:

  • Might lead to unstable closed-loop systems.
  • Can only be used for first order systems with large process delays.
  • Can only be done when the system is in steady-state
  • Approximations of the gains may not work for different systems.
Florius

Hi, welcome to my website. I am writing about my previous studies, work & research related topics and other interests. I hope you enjoy reading it and that you learned something new.

More Posts

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.