Sunteți pe pagina 1din 10

PID CONTROLLER IMPLEMENTATION USING MATLAB

Introduction

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

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

cs1567

PROBLEM EXAMPLE

overshoot

Ripple

setpoint

Increase the quantity until you get to the setpoint

Temperature, angle, speed, etc

If too much, reduce the quantity, until the setpoint

cs1567

CLOSED LOOP CONTROLLER

error

setpoint

controller

signal

system

output

measured quantity

closed loop because it has feedback


output is measured at a certain frequency
signal is generated at a certain frequency
which frequency is not smaller?

cs1567

PROPORTIONAL CONTROL

Good alternative to on-off control: more control

Signal becomes proportional to the error

Need to find out value of constant P

P ( setpoint output )
Example, car speed for cruise control
Tuning the controller is a hard job
If P is too high, what happens?
If P is too low, what happens?

Typically a prop cntrl decreases response time


(quickly gets to the setpoint) but increases
overshoot
5

cs1567

ADDING DERIVATIVE CONTROL

To avoid (or reduce) overshoot/ripple, take


into account how fast are you approaching
the setpoint

If very fast, overshoot may be forthcoming:


reduce the signal recommended by the
proportional controller
If very slow, may never get to setpoint: increase
the signal
In general: D ( current measure previous
measure)

PD controllers are slower than P, but less


oscillation, smaller overshoot/ripple
6

cs1567

INTEGRAL CONTROL

There may still be error in the PD controller

For example, the output is close to setpoint

Take the sum of the errors over time, even if


theyre small, theyll eventually add up

P is very small and so is the error, discretization of signal


will provide no change in the P controller
D controller will not change signal, unless there is
change in output

I * sum_over_time (setpoint output)

Again the main problem is the value of I


Can we let sum grow to infinity?

Simulation Output

Applications
1)Used in Motor drive systems
2)PID forms the basis for higher complex
process controllers.

References
[1] Stuart Bennett, Development of the PID controller,
http://www.ieeecss.org/CSM/library/1993/dec1993/w05HistoricalPerspec
tive.pdf, May 2009
[2] Kiam Heong Ang, Gregory Chong, Student Member, IEEE, and Yun
Li, Member, IEEE, PID Controller System Analysis, Design and Technology,
http://www.ieeexplore.ieee.org/iel5/87/31218/01453566.pdf, Dec
1999
[3] Paul Avery,Yaskawa Electric America, Inc. Waukegan, Introduction
to PID control, http://machinedesign.com/sensors/introduction-pidcontrol,
June 2014
[4] Gregory K. McMillan, Industrial Applications of PID Control,
http://emersonprocessxperts.com/wp-content/uploads/2011/12/IndustrialApplications-of-PID-Control.pdf, Sept 2014

S-ar putea să vă placă și