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
2
votes
1 answer

PID feedback & Position Controller with DC motor/encoder

I'm having a hard time getting both PID feedback and positioning to run at the same time. My thought to calculate the RPM is to: start a timer and count encoder pulses using an interrupt. use some simple math to convert to RPM. reset variables…
1
vote
1 answer

cannot use MATLAB function'lsim()' properly

I am encountering trouble while attempting to achieve the same response as Simulink using MATLAB code. Here is my MATLAB code: The system contains only a pid and state-space model M = 1.5; m = 0.5; l = 10; g = 9.8; %% state space A = [0 1 0 0; 0 0…
魏嘉伟
  • 11
  • 1
1
vote
0 answers

How do I use PID controllers to go to a desired position while maintaining an angle of zero?

What are the details of your problem? I am controlling a miniature gantry crane head using PID controllers. I am able to move the crane head along the x- and y-axis to their desired position. My issue is that both the x-axis controller and my angle…
elomarjc
  • 11
  • 2
1
vote
2 answers

Implement a PID control in C++ for a motor with absolute encoder

Sorry if my question is too stupid, but I can't figure out how to solve my problem. I have a motor with a gearbox and I also have an absolute encoder mounted on the gearbox shaft. I need to make the output shaft rotate in a range from -90 to +90 and…
Marcus Barnet
  • 2,083
  • 6
  • 28
  • 36
1
vote
0 answers

Follow a constantly varying input signal with a PID Controller

I got a TF of my plant G(s) = s + 10/3s^3 + 8s^2 + 30s + 25 and I would like to implement a PID controller so that the system closely follows the varying input signal, I used r(t) = 0.5sin(t) + 0.5. How can I calculate the correct setting for Kp, Ki…
Senti
  • 63
  • 6
1
vote
0 answers

How to continue with the PID controller ouptut

I am trying to use a PID controller to achieve a target FPS and Latency. For the PID controller, I used https://github.com/tekdemo/MiniPID. This is how I set it up in a while loop: while(true){ /* Create the command with all the given…
KazeKoda
  • 11
  • 3
1
vote
0 answers

termination character invalid pyvisa

I have a Temperature controller that I can communicate with it via USB, you have two types of commands, getters and setters. Commands such as B2 will get the current fan mode, expected response either 0 or 1. Command b2 will set the fan mode,…
Achilles
  • 51
  • 5
1
vote
2 answers

How to keep the output signal of a PID block unchanged after a fixed time point?

I build a fluid model with a PID control system, and I wanna run my model until reaching a steady state and then keep the output signal of the PID system unchanged, so I could do step excitation stability tests. But right now I am not sure how to…
Jack
  • 1,094
  • 6
  • 16
1
vote
1 answer

MATLAB: How to find plant given PID values, closed loop transfer function, and step response graph?

I was given a step response graph, and from it, obtained a transfer function. The loop includes a plant and a PID controller, and I know the PID values that produced the output graph. I verified that the transfer function I found was correct by…
1
vote
0 answers

How to make a low pass filter for a differential equation for PID control?

So I'm trying to model a correct PID system in python but if I add some noise to the signal (by say a sensor) the D term starts overreacting. I know this is quite common and people fix it using a low pass filter yet I have no idea how to implement…
ZeusBeer
  • 89
  • 6
1
vote
3 answers

Technique for balancing controller input and output

I have a system where I use RS232 to control a lamp that takes an input given in float representing voltage (in the range 2.5 - 7.5). The control then gives a output in the range 0 to 6000 which is the brightness a sensor picks up. What I want is to…
Mozy
  • 31
  • 3
1
vote
2 answers

Is there a Block component to keep the PID controller signal steady and unchanged for 100 seconds

I got PID controller, I want to add a block so that the PID output signal would keep steady and unchanged at some timepoint, and after 100 seconds, the PID output signal would begin to work normally again. Is there a block component like this in…
Jack
  • 1,094
  • 6
  • 16
1
vote
0 answers

Unity3D Wheel Collider PID Controller?

I'm trying to make a wheel collider PID controller based on the following tutorial: https://www.habrador.com/tutorials/pid-controller/1-car-follow-path/ I made a revision to the FixedUpdate method to modify the steer direction based on the angle…
1
vote
1 answer

Is there a better way to simulate PID control in Python with Scipy's solve_ivp()?

I am working on a homework problem. I'm trying to simulate a PID control in Python with Scipy's integrate.solve_ivp() function. My method is to run the PID code within the right-hand-side of the function, using global variables and appending them to…
squeegene
  • 467
  • 1
  • 5
  • 18
1
vote
0 answers

PID controllers simulink

Labview uses P= 4.3 , I = 0.12, D =0.03 ( I collected data) Simulink uses P = 110 , I = 15, D= 40 Step response is almost the same. My question is how I can set my simulink to use the same PID controllers as in Labview?
Alabq
  • 11
  • 2
1 2
3
11 12