# Interdependence of Kp, Ki, and Kd in PID control

#### abtj90

As shown in the attached photo, I have highlighted in yellow the purpose of a specific gain: Kp or Ki or Kd.

For example, Kp is especially useful for improving rise time.

But I am unable to understand and absorb the sentence that is underlined in red.

Are they really interdependent? If so, why?

#### Attachments

• 74.8 KB Views: 32

#### Dave

Are they independent? No!
Ki (Integration) increases the control adjustment the longer the process variable deviated from your set point.
Kd (differentiation) immediately bumps the control command intended to reduce the time needed to achive the set point.

Start with low proportional first, and only with time add in intergration, and in rare cases differential corrections.

#### abtj90

Are they independent? No!
Ki (Integration) increases the control adjustment the longer the process variable deviated from your set point.
Kd (differentiation) immediately bumps the control command intended to reduce the time needed to achive the set point.

Start with low proportional first, and only with time add in intergration, and in rare cases differential corrections.

#### Dave

They are coupled, as part of a closed loop, though the dynamic response of your sensor, the dynamic response of your controlled device, and the dynamic response of the process you are aiming to control!

#### pnachtwey

If you are asking if the individual PID gains can be changed independently, they can. However, there are fomulas for calculating the each of the PID gains that use the closed loop pole locations to calculate the controller gains, P, I and D. For instance, if I tune a small motor in torque mode and controlling position, One needs to know the motor's open loop gain and time constant. Then all the controller gains can be calculated just by where you want the closed loop poles to be.
This video shows how autotuning a small servo motor is done.
deltamotion.com/peter/Videos/AutoTuneTest2.mp4
Towards the end I am moving up a slider bar. Moving the slider bar up moves the closed loop poles farther to the left on the negative real axis in the s plane. The goal is to place the 3 closed loop poles on the negative real axis so there is no overshoot and the decay in any error is fast. Notice that ALL three controller gains change together because they are all dependent on the open loop gain, the open loop time constant and how far to the left on the negative real axis in the s-plane I want to place the 3 closed loop poles. So yes, the P,I,D gains can be changed independently if you don't care where the closed loop poles will be but if you are trying to place the closed loop poles then all the gains are dependent on the same parameters so they will change together.

The OP's diagram is garbage. Yes, this gain does this and that gain does that but what is really happening is that when you change a gain, you are changing where the closed loop pole locations are and usually not for the better. People think about this wrong. They change gains by trial and error until they get an acceptable response when they should be choosing the response they want and place the closed loop poles to get that response. Then calculate the resulting controller gains from the motor parameters and the closed loop pole locations.

#### GMcc

Regarding the sentence that is underlined in red, this may be about some PID controllers where actual effect of Ki and Kd are multiplied by Kp

#### Dave

Least we forget, all these strategies, presume a linear system, 100% realiability of all sensors, control devices, and a stable process response to all changes large or small.

#### pnachtwey

Regarding the sentence that is underlined in red, this may be about some PID controllers where actual effect of Ki and Kd are multiplied by Kp
If the controller gain by the P and D terms then the P and D terms are expressed as time constants, not gains.

Dave said:
Least we forget, all these strategies, presume a linear system, 100% realiability of all sensors, control devices, and a stable process response to all changes large or small.
The plants don't need to be linear if you have the formulas as a function of the plant parameters. Then the gains can be changed as the plant changes.
This video shows how to control a non-linear system that is not stable when it is pointing straight up. The first video shows a student controlling the system. The motion is smooth.
deltamotion.com/peter/Videos/Non-Linear-Lab_Medium.mp4
The second video shows how it is done.
deltamotion.com/peter/Videos/Swing Arm.mp4

Usually, controllers have software that detects sensor failure. What is a problem is coarse feedback resolution, noise and asynchronous sampling. This makes it hard or impossible to use the differential term.

#### Dave

"Usually, controllers have software that detects sensor failure."
Perhaps for some failures, but not all.
In some processes, multiple sensors from different suppliers are mandated, with Quintuple CPU and memory redundancies to avoid catastropic control failures.

"What is a problem is coarse feedback resolution, noise and asynchronous sampling. This makes it hard or impossible to use the differential term."
Agreed, yet there are some cases where it might be required.

#### pnachtwey

"Usually, controllers have software that detects sensor failure."
Perhaps for some failures, but not all.
So why don't you name one?

In some processes, multiple sensors from different suppliers are mandated, with Quintuple CPU and memory redundancies to avoid catastropic control failures.
Yes, so why have multiple sensors if you can't tell which one(s) are bad?

"What is a problem is coarse feedback resolution, noise and asynchronous sampling. This makes it hard or impossible to use the differential term."
Agreed, yet there are some cases where it might be required.
We use model based control when necessary. Model based control can estimate the true acceleration more accurately than just taking the second derivative of quantized position data.