PID is acronym for Proportional Plus Integral Plus Derivative Controller.It is a control loop feedback mechanism (controller) widely used in industrial control systems due to their robust performance in a wide range of operating conditions & simplicity.In This PID Controller Introduction, I have Tried To Illustrate The PID Controller With SIMPLE Explanations & BASIC MATLAB CODE To Give You Idea About P,PI,PD & PID Controllers
For PID control, the actuating signal u(t),consists of proportional error signal added with derivative and integral of error signal e(t)
The Plant P is controlled by input u(t) which is represented as
Where Kp is the Proportional Gain,Kd is the Derivative Gain & Ki is the Integral Gain of the controller
Frequency Domain Representation of PID ControllerIn Frequency Domain (after taking Laplace Transform of both sides),the control input can be represented as
Thus ,PID controller adds pole at the origin and two zeroes to the Open loop transfer function
The Closed loop Transfer Function of the system can be written as
Physical Realisation of PID Controller Why do You Need a PID ControllerThe Characteristics of P, I, and D controllers are briefly discussed With MATLAB Code to give an insight about individual P,PI,PD,PID Controllers
But a PID controller removes steady-state error and decreases system settling times while maintaining a reasonable transient response
Example::Illustrating P, PI, PD & PID controller in MATLABFor the Given Spring-Mass-Damper System
Using DâAlembert’s Principle
Taking Laplace Transform with Zero initial conditions to get:
The transfer function between Output X(s) & input F(s) is
Assuming m=1kg,b=10 Ns/m & k=20 N/m [For Simpicity]
Which is the open loop transfer function
On Matlab Command window, typing following commands, yield Step Response of the system
G=tf(1,[1 10 20]);
Step(G);
The DC gain of the plant transfer function is 1/20, so 0.05 is the final value of the output to a unit step input. This corresponds to the steady-state error of 0.95, quite large indeed.
Furthermore, the rise time is about one second, and the settling time is about 1.5 seconds.
#Proportional ControlIn Proportional control, the actuating signal for the control action in a control system is proportional to the error signal. The error signal being the difference between the reference input signal and the feedback signal obtained from the output
The Transfer function of the controller is:
U(s) = Kp E(s) or, C(s) =Kp
The closed-loop transfer function of the Spring-Mass system with a proportional controller is:
For Kp=500
Executing following Commands in MATLAB will give output on command window
Kp = 500;
C = pid(Kp)
P=tf(1,[1 10 20])
T = feedback(C*P,1)
t = 0:0.01:2;
step (T,t);
The Step response of the system in MATLAB indicates that the proportional controller (Kp) reduces the rise time, increases the overshoot, reduces the steady state error but never eliminates it completely
This is a type-zero system and hence will have a finite steady-state error for a step input.
Large values of K lead to small steady-state error; however, they also lead to a faster, less damped responses.
If we want a small overshoot and a small steady-state error, a proportional gain alone is not enough.
#PD ControllerFor Derivative control action the actuating signal consists of proportional error signal added with derivative of the error signal
A proportional plus derivative (PD) controller has the transfer function:
Proportional-derivative (PD) control considers both the magnitude of the system error and the derivative of this error. Derivative control has the effect of adding damping to a system, and, thus, has a stabilizing influence on the system response.
The closed-loop transfer function of
the above system with a PD controller is:
—
MATLAB Code for PD Controller(Without Tuning Sample Values)Entering Following commands in MATLAB yields
Kp = 500;Kd=10;
C = pid(Kp,0,Kd);
P=tf(1,[1 10 20]);
T = feedback(C*P,1)
step(T);
Continuous-time PD controller in parallel form:
Kp + Kd * s
With Kp = 500, Kd = 10
Transfer function:
10 s + 500
—————-
s^2 + 20 s + 520
Without integral control, this is a type-zero system, and hence will have a finite steady state error to a unit step input
The derivative controller reduced both the overshoot and the Settling time, and had a small effect on the rise time and the steady-state error.
The PD controller has decreased the system settling time considerably; however, to control the steady-state error, the derivative gain Kd must be high. This decreases the response times of the system and can make it susceptible to noise.
Effects of PD Controller :-
For Integral control action, the actuating signal consists of proportional-error signal added with integral of the error signal.
Proportional-integral (PI) control considers both the magnitude of the system error signal and the integral of this error
MATLAB Code for PI Controller(Without Tuning Sample Values)Executing Following commands in MATLAB
Kp = 30; Ki=70; C = pid(Kp,Ki) P=tf(1,[1 10 20]); T = feedback(C*P,1) step(T);Continuous-time PI controller in parallel form:
1
Kp + Ki * —
s
With Kp = 30, Ki = 70
Transfer function:
30 s + 70
————————
s^3 + 10 s^2 + 50 s + 70
Using integral control makes the system type-one, so the steady-state error due to a step input is zero.
The response shows that the Integral control has removed the steady-state error and improved the transient response, but it has also increased the system settling time.
Increasing Ki increases overshoot & settling time making system response sluggish
To reduce both settling time and overshoot, a PI controller by itself is not enough
Effects of PI Controller :-
For PID control, the actuating signal u(t),consists of proportional error signal added with derivative and integral of error signal e(t)
Proportional-integral-derivative control (PID) combines the stabilizing influence of the derivative term and the reduction in steady-state error from the integral term.
The Transfer function of PID Controller
MATLAB Code for PID Controller(Without Tuning Sample Values)MATLAB Code to Be Executed for Simulating PID Controller
Kp=500,Kd=50,Ki=400; G=tf(1,[1 10 20]); C=pid(Kp,Ki,Kd); T=feedback(C*G,1); step(T,0:0.01:2);MATLAB OUTPUT FOR Continuous-time PID controller in parallel form:
1
Kp + Ki * — + Kd * s
s
With Kp = 500, Ki = 400, Kd = 50
Transfer function:
50 s^2 + 500 s + 400
————————–
s^3 + 60 s^2 + 520 s + 400
Thus, A PID controller has removed steady-state error and decreased system settling times while maintaining a reasonable transient response
While designing a PID controller, the general rule is to add proportional control to get the desired rise time, add derivative control to get the desired overshoot, and then add integral control (if needed) to eliminate the steady-state error.
Effects of PID Controller:-
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4