SlideShare ist ein Scribd-Unternehmen logo
1 von 20
ASHEESH K. SHAHI
asheeshshahiece@gmail.com
Department of Electronics and Comm.,
Amity School of Engineering & Technology (ASET), Amity
University, Uttar Pradesh, India
1
Feedback Control
 Say you have a system controlled by an actuator
 Hook up a sensor that reads the effect of the actuator
(NOT the output to the actuator)
 You now have a feedback loop and can use it to control
your system!
2
Actuator Sensor
Introduction to PID
 Stands for Proportional, Integral, and Derivative
control
 Form of feedback control
3
Simple Feedback Control (Bad)
double Control (double setpoint, double current) {
double output;
if (current < setpoint)
output = MAX_OUTPUT;
else
output = 0;
return output;
}
 Why won't this work in most situations?
4
Simple Feedback Control Fails
 Moving parts have
inertia
 Moving parts have
external forces
acting upon them
(gravity, friction,
etc)
5
Proportional Control
 Get the error - the distance between the setpoint
(desired value) and the actual value
 Multiply it by Kp, the proportional gain
 That's your output!
double Proportional(double setpoint, double
current, double Kp) {
double error = setpoint - current;
double P = Kp * error;
return P;
}
6
Proportional Tuning
 If Kp is too large, the
sensor reading will
rapidly approach the
setpoint, overshoot, then
oscillate around it
 If Kp is too small, the
sensor reading will
approach the setpoint
slowly and never reach it
7
What can go wrong?
 When error nears zero, the output of a P controller
also nears zero
 Forces such as gravity and friction can counteract a
proportional controller and make it so the setpoint is
never reached (steady-state error)
 Increased proportional gain (Kp) only causes jerky
movements around the setpoint
8
Proportional-Integral Control
 Accumulate the error as time passes and multiply by
the constant Ki. That is your I term. Output the sum of
your P and I terms.
double PI(double setpoint, double current,
double Kp, double Ki) {
double error = setpoint - current;
double P = Kp * error;
static double accumError = 0;
accumError += error;
double I = Ki * accumError;
return P + I;
}
9
PI controller
 The P term will take
care of the large
movements
 The I term will take
care of any steady-
state error not
accounted for by the
P term
10
Limits of PI control
 PI control is good for most embedded applications
 Does not take into account how fast the sensor
reading is approaching the setpoint
 Wouldn't it be nice to take into account a prediction
of future error?
11
Proportional-Derivative Control
 Find the difference between the current error and the error
from the previous timestep and multiply by the constant
Kd. That is your D term. Output the sum of your P and D
terms.
double PD(double setpoint, double current, double
Kp, double Kd) {
double error = setpoint - current;
double P = Kp * error;
static double lastError = 0;
double errorDiff = error - lastError;
lastError = error;
double D = Kd * errorDiff;
return P + D;
}
12
PD Controller
 D may very well stand for
"Dampening"
 Counteracts the P and I
terms - if system is
heading toward setpoint,
 This makes sense: The
error is decreasing, so
d(error)/dt is negative
13
PID Control
 Combine P, I and D terms!
double PID(double setpoint, double current,
double Kp, double Ki, double Kd) {
double error = setpoint - current;
double P = Kp * error;
static double accumError = 0;
accumError += error;
double I = Ki * accumError;
static double lastError = 0;
double errorDiff = error - lastError;
lastError = error;
double D = Kd * errorDiff;
return P + I + D;
}
14
Effects of increasing a parameter
independently
PARAMETER
Kp Ki Kd
RISE TIME DECREASE DECREASE MINOR
CHANGE
OVERSHOOT INCREASE INCREASE DECREASE
SETTLING TIME SMALL
CHANGE
INCREASE DECREASE
STEADY STATE
ERROR
DECREASE INCREASE NO EFFECT
STABILITY DEGRADE DEGRADE IMPROVE IF Kd
IS SMALL
15
PID Tuning
 Start with Kp = 0, Ki = 0, Kd = 0
 Tune P term - System should be at full power unless
near the setpoint
 Tune Ki until steady-state error is removed
 Tune Kd to dampen overshoot and improve
responsiveness to outside influences
 PI controller is good for most embedded applications,
but D term adds stability
16
Effects of varying PID parameters
on the step response of a system
17
PID Applications
 Robotic arm movement (position control)
 Temperature control
 Speed control (ENGR 151 TableSat Project)
18
Conclusion
 PID uses knowledge about the present, past, and
future state of the system, collected by a sensor, to
control
 In PID control, the constants Kp, Ki, and Kd must be
tuned for maximum performance
19
Questions?
20

Weitere ähnliche Inhalte

Was ist angesagt?

Proportional integral and derivative PID controller
Proportional integral and derivative PID controller Proportional integral and derivative PID controller
Proportional integral and derivative PID controller
Mostafa Ragab
 
PID Controller Tuning
PID Controller TuningPID Controller Tuning
PID Controller Tuning
Ahmad Taan
 
Lecture 4 ME 176 2 Mathematical Modeling
Lecture 4 ME 176 2 Mathematical ModelingLecture 4 ME 176 2 Mathematical Modeling
Lecture 4 ME 176 2 Mathematical Modeling
Leonides De Ocampo
 

Was ist angesagt? (20)

Pid controllers
Pid controllersPid controllers
Pid controllers
 
Pid controllers
Pid controllersPid controllers
Pid controllers
 
PID controller in control systems
PID controller in control systemsPID controller in control systems
PID controller in control systems
 
Pid controller
Pid controllerPid controller
Pid controller
 
Modern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of SystemsModern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of Systems
 
Proportional integral and derivative PID controller
Proportional integral and derivative PID controller Proportional integral and derivative PID controller
Proportional integral and derivative PID controller
 
Pid controller
Pid controllerPid controller
Pid controller
 
PID Controller Tuning
PID Controller TuningPID Controller Tuning
PID Controller Tuning
 
Model Reference Adaptive Control.ppt
Model Reference Adaptive Control.pptModel Reference Adaptive Control.ppt
Model Reference Adaptive Control.ppt
 
Pid control
Pid controlPid control
Pid control
 
Pid controller
Pid controllerPid controller
Pid controller
 
PID Control
PID ControlPID Control
PID Control
 
State space analysis shortcut rules
State space analysis shortcut rulesState space analysis shortcut rules
State space analysis shortcut rules
 
PID Controllers
PID ControllersPID Controllers
PID Controllers
 
Ch7 frequency response analysis
Ch7 frequency response analysisCh7 frequency response analysis
Ch7 frequency response analysis
 
Ch5 transient and steady state response analyses(control)
Ch5  transient and steady state response analyses(control)Ch5  transient and steady state response analyses(control)
Ch5 transient and steady state response analyses(control)
 
Modern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI SystemsModern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI Systems
 
Me314 week08-stability and steady state errors
Me314 week08-stability and steady state errorsMe314 week08-stability and steady state errors
Me314 week08-stability and steady state errors
 
Lecture 4 ME 176 2 Mathematical Modeling
Lecture 4 ME 176 2 Mathematical ModelingLecture 4 ME 176 2 Mathematical Modeling
Lecture 4 ME 176 2 Mathematical Modeling
 
PID controller, P, I and D control Comparison PI, PD and PID Controller P, I,...
PID controller, P, I and D control Comparison PI, PD and PID Controller P, I,...PID controller, P, I and D control Comparison PI, PD and PID Controller P, I,...
PID controller, P, I and D control Comparison PI, PD and PID Controller P, I,...
 

Andere mochten auch

Andere mochten auch (10)

Document control system with iot help (rfid &amp; raspberry pi)
Document control system with iot help (rfid &amp; raspberry pi)Document control system with iot help (rfid &amp; raspberry pi)
Document control system with iot help (rfid &amp; raspberry pi)
 
Lec 13
Lec 13Lec 13
Lec 13
 
Lec 1
Lec 1Lec 1
Lec 1
 
Lec 4
Lec 4Lec 4
Lec 4
 
تصنيف أنظمة التحكم
تصنيف أنظمة  التحكمتصنيف أنظمة  التحكم
تصنيف أنظمة التحكم
 
Control system
Control systemControl system
Control system
 
Lec 10
Lec 10Lec 10
Lec 10
 
PID Control system for Dummies
PID Control system for DummiesPID Control system for Dummies
PID Control system for Dummies
 
Lec 11
Lec 11Lec 11
Lec 11
 
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
 

Ähnlich wie PID Control System

Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...
ssuser27c61e
 

Ähnlich wie PID Control System (20)

Lecture9.pdf
Lecture9.pdfLecture9.pdf
Lecture9.pdf
 
Pid control by Adarsh singh
Pid control  by Adarsh singhPid control  by Adarsh singh
Pid control by Adarsh singh
 
p i d controller
p i d controllerp i d controller
p i d controller
 
P I D CONTOLLER
P I D CONTOLLERP I D CONTOLLER
P I D CONTOLLER
 
4470838.ppt
4470838.ppt4470838.ppt
4470838.ppt
 
Pid controller by Mitesh Kumar
Pid controller by Mitesh KumarPid controller by Mitesh Kumar
Pid controller by Mitesh Kumar
 
Control project
Control projectControl project
Control project
 
1578385.ppt
1578385.ppt1578385.ppt
1578385.ppt
 
UNIT-V.ppt
UNIT-V.pptUNIT-V.ppt
UNIT-V.ppt
 
Vivek mishra197
Vivek mishra197Vivek mishra197
Vivek mishra197
 
Control tutorials for matlab and simulink introduction pid controller desig...
Control tutorials for matlab and simulink   introduction pid controller desig...Control tutorials for matlab and simulink   introduction pid controller desig...
Control tutorials for matlab and simulink introduction pid controller desig...
 
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ SimulinkSimulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
Simulation and Comparison of P, PI, PID Controllers on MATLAB/ Simulink
 
Mechatroincs universitty for students .ppt
Mechatroincs universitty for students .pptMechatroincs universitty for students .ppt
Mechatroincs universitty for students .ppt
 
Mechatroincs universitty for students .ppt
Mechatroincs universitty for students .pptMechatroincs universitty for students .ppt
Mechatroincs universitty for students .ppt
 
Introduction to control system 2
Introduction to control system 2Introduction to control system 2
Introduction to control system 2
 
ppipdcontroller-190829154906.pdf
ppipdcontroller-190829154906.pdfppipdcontroller-190829154906.pdf
ppipdcontroller-190829154906.pdf
 
P, PI AND PID CONTROLLER
P, PI AND PID CONTROLLERP, PI AND PID CONTROLLER
P, PI AND PID CONTROLLER
 
Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...Analysis and Design of PID controller with control parameters in MATLAB and S...
Analysis and Design of PID controller with control parameters in MATLAB and S...
 
lesson2.ppsx
lesson2.ppsxlesson2.ppsx
lesson2.ppsx
 
Week 14 pid may 24 2016 pe 3032
Week  14 pid  may 24 2016 pe 3032Week  14 pid  may 24 2016 pe 3032
Week 14 pid may 24 2016 pe 3032
 

Kürzlich hochgeladen

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

PID Control System

  • 1. ASHEESH K. SHAHI asheeshshahiece@gmail.com Department of Electronics and Comm., Amity School of Engineering & Technology (ASET), Amity University, Uttar Pradesh, India 1
  • 2. Feedback Control  Say you have a system controlled by an actuator  Hook up a sensor that reads the effect of the actuator (NOT the output to the actuator)  You now have a feedback loop and can use it to control your system! 2 Actuator Sensor
  • 3. Introduction to PID  Stands for Proportional, Integral, and Derivative control  Form of feedback control 3
  • 4. Simple Feedback Control (Bad) double Control (double setpoint, double current) { double output; if (current < setpoint) output = MAX_OUTPUT; else output = 0; return output; }  Why won't this work in most situations? 4
  • 5. Simple Feedback Control Fails  Moving parts have inertia  Moving parts have external forces acting upon them (gravity, friction, etc) 5
  • 6. Proportional Control  Get the error - the distance between the setpoint (desired value) and the actual value  Multiply it by Kp, the proportional gain  That's your output! double Proportional(double setpoint, double current, double Kp) { double error = setpoint - current; double P = Kp * error; return P; } 6
  • 7. Proportional Tuning  If Kp is too large, the sensor reading will rapidly approach the setpoint, overshoot, then oscillate around it  If Kp is too small, the sensor reading will approach the setpoint slowly and never reach it 7
  • 8. What can go wrong?  When error nears zero, the output of a P controller also nears zero  Forces such as gravity and friction can counteract a proportional controller and make it so the setpoint is never reached (steady-state error)  Increased proportional gain (Kp) only causes jerky movements around the setpoint 8
  • 9. Proportional-Integral Control  Accumulate the error as time passes and multiply by the constant Ki. That is your I term. Output the sum of your P and I terms. double PI(double setpoint, double current, double Kp, double Ki) { double error = setpoint - current; double P = Kp * error; static double accumError = 0; accumError += error; double I = Ki * accumError; return P + I; } 9
  • 10. PI controller  The P term will take care of the large movements  The I term will take care of any steady- state error not accounted for by the P term 10
  • 11. Limits of PI control  PI control is good for most embedded applications  Does not take into account how fast the sensor reading is approaching the setpoint  Wouldn't it be nice to take into account a prediction of future error? 11
  • 12. Proportional-Derivative Control  Find the difference between the current error and the error from the previous timestep and multiply by the constant Kd. That is your D term. Output the sum of your P and D terms. double PD(double setpoint, double current, double Kp, double Kd) { double error = setpoint - current; double P = Kp * error; static double lastError = 0; double errorDiff = error - lastError; lastError = error; double D = Kd * errorDiff; return P + D; } 12
  • 13. PD Controller  D may very well stand for "Dampening"  Counteracts the P and I terms - if system is heading toward setpoint,  This makes sense: The error is decreasing, so d(error)/dt is negative 13
  • 14. PID Control  Combine P, I and D terms! double PID(double setpoint, double current, double Kp, double Ki, double Kd) { double error = setpoint - current; double P = Kp * error; static double accumError = 0; accumError += error; double I = Ki * accumError; static double lastError = 0; double errorDiff = error - lastError; lastError = error; double D = Kd * errorDiff; return P + I + D; } 14
  • 15. Effects of increasing a parameter independently PARAMETER Kp Ki Kd RISE TIME DECREASE DECREASE MINOR CHANGE OVERSHOOT INCREASE INCREASE DECREASE SETTLING TIME SMALL CHANGE INCREASE DECREASE STEADY STATE ERROR DECREASE INCREASE NO EFFECT STABILITY DEGRADE DEGRADE IMPROVE IF Kd IS SMALL 15
  • 16. PID Tuning  Start with Kp = 0, Ki = 0, Kd = 0  Tune P term - System should be at full power unless near the setpoint  Tune Ki until steady-state error is removed  Tune Kd to dampen overshoot and improve responsiveness to outside influences  PI controller is good for most embedded applications, but D term adds stability 16
  • 17. Effects of varying PID parameters on the step response of a system 17
  • 18. PID Applications  Robotic arm movement (position control)  Temperature control  Speed control (ENGR 151 TableSat Project) 18
  • 19. Conclusion  PID uses knowledge about the present, past, and future state of the system, collected by a sensor, to control  In PID control, the constants Kp, Ki, and Kd must be tuned for maximum performance 19