Questions tagged [pid-controller]

A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in industrial control systems.

A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in industrial control systems. A PID controller calculates an "error" value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process control outputs.

The PID controller algorithm involves three separate constant parameters, and is accordingly sometimes called three-term control: the proportional, the integral and derivative values, denoted P, I, and D. Simply put, these values can be interpreted in terms of time: P depends on the present error, I on the accumulation of past errors, and D is a prediction of future errors, based on current rate of change. The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve, a damper, or the power supplied to a heating element.

In the absence of knowledge of the underlying process, a PID controller has historically been considered to be the best controller. By tuning the three parameters in the PID controller algorithm, the controller can provide control action designed for specific process requirements. The response of the controller can be described in terms of the responsiveness of the controller to an error, the degree to which the controller overshoots the setpoint, and the degree of system oscillation. Note that the use of the PID algorithm for control does not guarantee optimal control of the system or system stability.

Some applications may require using only one or two actions to provide the appropriate system control. This is achieved by setting the other parameters to zero. A PID controller will be called a PI, PD, P or I controller in the absence of the respective control actions. PI controllers are fairly common, since derivative action is sensitive to measurement noise, whereas the absence of an integral term may prevent the system from reaching its target value due to the control action.

170 questions
12
votes
6 answers

I don't understand Integral part of PID controller

I dont understand integral part of PID controller. Let's assume this pseudocode from Wikipedia: previous_error = 0 integral = 0 start: error = setpoint - measured_value integral = integral + error*dt derivative = (error - previous_error)/dt …
user561838
  • 331
  • 1
  • 4
  • 8
10
votes
3 answers

How do I use a PID controller?

I'm currently working on a temperature controller. I have a Temperature_PID() function that returns the manipulated variable (which is the sum of the P, I, and D terms) but what do I do with this output? The temperature is controlled by PWM, so 0%…
thecooltodd
  • 264
  • 1
  • 3
  • 11
9
votes
2 answers

tuning pid in systems with delay

I need to tune PI(D) gains in a system which has a quite large delay. It's a common temperature controller, but the temperature probe is far away from the heater. Some further info: the response of the probe is delayed about 10 seconds from any…
Mark
  • 4,338
  • 7
  • 58
  • 120
6
votes
2 answers

Simulink: PID Controller - difference between back-calculation and clamping for anti-windup?

I need to implement an anti-windup (output limitation) for my PID controller. Simulink is offering two options: back calculation and clamping (documentation) which seem to deliver equal results. I know what back calculation is doing mathematically.…
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
5
votes
1 answer

Kalman Filter on PID

I'm not sure if this goes here, but I'm having a bit of trouble understanding the Kalman filter. What I want to do is condition a sensor with a PID compensator to find the optimal gains for the PID filter. This is a sort of pole balancing problem…
Cenoc
  • 11,172
  • 21
  • 58
  • 92
5
votes
1 answer

Gekko(python) for lap time optimization

I was wondering if it was a good idea to use Gekko to solve a lap time optimization: finding the optimal path on a track to minimize total time by controlling the steering angle and the power output. I'm fairly new to optimal control problem so if…
trimat
  • 101
  • 4
5
votes
2 answers

How to deal with the discontinuity of yaw angle at 180 degree

I'm working on a vehicle control and using a 9DOF sensor (accelerometer, magnetometer and gyroscope). For the yaw angle, I have a discontinuity problem at pi rad. (180 deg.). I'm controlling the vehicle with a PID controller and when the vehicle…
tarik
  • 153
  • 2
  • 10
4
votes
0 answers

PID Controller that works on percentages instead of absolute units?

I am working on a PID Control software simulator for teaching PID Control concepts interactively. I am working on an example for a Velocity controller. I have the example working, but I really want the input to my process to be in percentage instead…
user177800
4
votes
1 answer

PID Control Loops with large and unpredictable anomalies

Short Question Is there a common way to handle very large anomalies (order of magnitude) within an otherwise uniform control region? Background I am working on a control algorithm that drives a motor across a generally uniform control region. …
Adam Lewis
  • 7,017
  • 7
  • 44
  • 62
3
votes
1 answer

Python: Producing a graph of a module which contains a feedback mechanism

I'm fairly new to programming and I'm trying to produce a simple zero-dimensional energy balance model in Python 2.7 IDLE, to calculate surface temperatures of the Earth and have added a ice albedo feedback, i.e. if the temperature output of the …
3
votes
2 answers

Quadcopter PID Controller for distance

I am trying to use a PID controller to stop a quadcopter at a specific location while travelling horizontally, however currently it overshoots/undershoots depending on the max velocity. I have tried manually tuning the P,I and D gains with limited…
Brien Crean
  • 2,599
  • 5
  • 21
  • 46
3
votes
2 answers

process identification with Modelica models and PID controller design

I try to build a PID controller for a valve in my model, I plan to do some process identification, get the system response to a step pulse and the transfer function of the system, then I could design the PID controller. But I am not sure if there is…
Jack
  • 1,094
  • 6
  • 16
3
votes
2 answers

Double pid loop

I am working on a robotic project, that involves controlling the position of a large robotic arm. The suggestion was to use a double PID loop, and I am wondering what is involved in this. As it was described to me, the first PID loop should deal…
Matthew FL
  • 1,612
  • 3
  • 18
  • 22
3
votes
3 answers

Python: how to interrupt, then return to while loop, without goto?

I'm running a simple PID control program in python. Basically an infinite while loop, which reads from sensors then calculates the appropriate control signal, as well as outputs diagnostic info to the terminal. However, sometimes while watching the…
Paul L
  • 131
  • 3
3
votes
4 answers

Balancing robot PID tuning

I'm trying to build a two-wheeled balancing robot for fun. I have all of the hardware built and put together, and I think I have it coded as well. I'm using an IMU with gyro and accelerometers to find my tilt angle with a complimentary filter for…
Steven McConnon
  • 2,650
  • 2
  • 16
  • 21
1
2 3
11 12