SlideShare a Scribd company logo
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

More Related Content

What's hot

Tuning of pid controller
Tuning of pid controllerTuning of pid controller
Tuning of pid controller
Subhankar Sau
 
Controller ppt
Controller pptController ppt
Controller pptgourav0077
 
P, PI AND PID CONTROLLER
P, PI AND PID CONTROLLERP, PI AND PID CONTROLLER
P, PI AND PID CONTROLLER
karan sati
 
PID Controller
PID ControllerPID Controller
PID Controllersaishah72
 
PID Controllers
PID Controllers PID Controllers
PID Controllers
Hussain K
 
PID controller in control systems
PID controller in control systemsPID controller in control systems
PID controller in control systems
khalaf Gaeid
 
Class 15 control action and controllers
Class 15   control action and controllersClass 15   control action and controllers
Class 15 control action and controllers
Manipal Institute of Technology
 
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,...
Waqas Afzal
 
PID Controller Tuning
PID Controller TuningPID Controller Tuning
PID Controller TuningAhmad Taan
 
Pid control by Adarsh singh
Pid control  by Adarsh singhPid control  by Adarsh singh
Pid control by Adarsh singh
Adarsh Singh
 
Pid controller
Pid controllerPid controller
Pid controller
Anjushree Sukumaran
 
Pneumatic controllers
Pneumatic controllersPneumatic controllers
Pneumatic controllers
bestinkallely
 
PID Control
PID ControlPID Control
Types of Controllers PID PD I PD
Types of Controllers PID PD I PDTypes of Controllers PID PD I PD
Types of Controllers PID PD I PD
Anaseem Hanini
 
Control systems engineering
Control systems engineeringControl systems engineering
Control systems engineering
Anisur Rahman
 
Modern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control SystemModern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control System
Amr E. Mohamed
 
Pid controllers
Pid controllersPid controllers
Pid controllers
Hussain K
 
Control system lectures
Control system lectures Control system lectures
Control system lectures
Naqqash Sajid
 
PID Control Basics
PID Control BasicsPID Control Basics
PID Control Basics
Yokogawa1
 
Chapter 1 basic components of control system
Chapter  1  basic components of control systemChapter  1  basic components of control system
Chapter 1 basic components of control system
Harish Odedra
 

What's hot (20)

Tuning of pid controller
Tuning of pid controllerTuning of pid controller
Tuning of pid controller
 
Controller ppt
Controller pptController ppt
Controller ppt
 
P, PI AND PID CONTROLLER
P, PI AND PID CONTROLLERP, PI AND PID CONTROLLER
P, PI AND PID CONTROLLER
 
PID Controller
PID ControllerPID Controller
PID Controller
 
PID Controllers
PID Controllers PID Controllers
PID Controllers
 
PID controller in control systems
PID controller in control systemsPID controller in control systems
PID controller in control systems
 
Class 15 control action and controllers
Class 15   control action and controllersClass 15   control action and controllers
Class 15 control action and controllers
 
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,...
 
PID Controller Tuning
PID Controller TuningPID Controller Tuning
PID Controller Tuning
 
Pid control by Adarsh singh
Pid control  by Adarsh singhPid control  by Adarsh singh
Pid control by Adarsh singh
 
Pid controller
Pid controllerPid controller
Pid controller
 
Pneumatic controllers
Pneumatic controllersPneumatic controllers
Pneumatic controllers
 
PID Control
PID ControlPID Control
PID Control
 
Types of Controllers PID PD I PD
Types of Controllers PID PD I PDTypes of Controllers PID PD I PD
Types of Controllers PID PD I PD
 
Control systems engineering
Control systems engineeringControl systems engineering
Control systems engineering
 
Modern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control SystemModern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control System
 
Pid controllers
Pid controllersPid controllers
Pid controllers
 
Control system lectures
Control system lectures Control system lectures
Control system lectures
 
PID Control Basics
PID Control BasicsPID Control Basics
PID Control Basics
 
Chapter 1 basic components of control system
Chapter  1  basic components of control systemChapter  1  basic components of control system
Chapter 1 basic components of control system
 

Viewers also liked

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)
Nick Guan
 
Lec 13
Lec 13Lec 13
Lec 1
Lec 1Lec 1
Lec 4
Lec 4Lec 4
تصنيف أنظمة التحكم
تصنيف أنظمة  التحكمتصنيف أنظمة  التحكم
تصنيف أنظمة التحكم
Dr. Munthear Alqaderi
 
Control system
Control systemControl system
Control system
Dr. Munthear Alqaderi
 
Lec 10
Lec 10Lec 10
PID Control system for Dummies
PID Control system for DummiesPID Control system for Dummies
PID Control system for Dummies
Abarajithan Gnaneswaran
 
Lec 11
Lec 11Lec 11
Pid controllers
Pid controllersPid controllers
Pid controllers
Abhishek Mehta
 
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
Carol Smith
 

Viewers also liked (11)

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
 
Pid controllers
Pid controllersPid controllers
Pid controllers
 
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
 

Similar to PID Control System

Lecture9.pdf
Lecture9.pdfLecture9.pdf
Lecture9.pdf
RajKD5
 
4470838.ppt
4470838.ppt4470838.ppt
4470838.ppt
MuhammadMubeen58
 
Pid controller by Mitesh Kumar
Pid controller by Mitesh KumarPid controller by Mitesh Kumar
Pid controller by Mitesh Kumar
Mitesh Kumar
 
Control project
Control projectControl project
Control project
Omar BOUZOURRAA
 
UNIT-V.ppt
UNIT-V.pptUNIT-V.ppt
Vivek mishra197
Vivek mishra197Vivek mishra197
Vivek mishra197
vivek mishra
 
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
 
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
HarshKumar649
 
Mechatroincs universitty for students .ppt
Mechatroincs universitty for students .pptMechatroincs universitty for students .ppt
Mechatroincs universitty for students .ppt
mohamed abd elrazek
 
Mechatroincs universitty for students .ppt
Mechatroincs universitty for students .pptMechatroincs universitty for students .ppt
Mechatroincs universitty for students .ppt
mohamed abd elrazek
 
Introduction to control system 2
Introduction to control system 2Introduction to control system 2
Introduction to control system 2
turna67
 
ppipdcontroller-190829154906.pdf
ppipdcontroller-190829154906.pdfppipdcontroller-190829154906.pdf
ppipdcontroller-190829154906.pdf
JeevaJeeva410662
 
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...
MIbrar4
 
lesson2.ppsx
lesson2.ppsxlesson2.ppsx
lesson2.ppsx
SivaSankar306103
 
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
Charlton Inao
 
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATIONcontrollers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
rahulkatre9
 

Similar to PID Control System (20)

Lecture9.pdf
Lecture9.pdfLecture9.pdf
Lecture9.pdf
 
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
 
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
 
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATIONcontrollers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
controllers ITS TYPES AND CLASSIFICATION BASED ON APPLICATION
 
Control
ControlControl
Control
 

Recently uploaded

CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 

Recently uploaded (20)

CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 

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