PID controllers Lecture 18 Systems and Control Theory STADIUS - - - PowerPoint PPT Presentation

β–Ά
pid controllers
SMART_READER_LITE
LIVE PREVIEW

PID controllers Lecture 18 Systems and Control Theory STADIUS - - - PowerPoint PPT Presentation

STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics PID controllers Lecture 18 Systems and Control Theory STADIUS - Center for Dynamical Systems, Signal Processing and Data Analytics What is a PID controller? A


slide-1
SLIDE 1

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID controllers

Lecture 18

slide-2
SLIDE 2

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

What is a PID controller?

𝑣 𝑒 = πΏπ‘žπ‘“ 𝑒 + 𝐿𝑗

𝑒

𝑓 𝜐 π‘’πœ + 𝐿𝑒 𝑒𝑓 𝑒 𝑒𝑒

2

A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in process industry. Continuous-time text book equation:

Proportional Action Integral Action Derivative Action

Note: 90% (or more) of control loops in industry are PID

slide-3
SLIDE 3

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

What is a PID controller?

3

  • A proportional action π‘£π‘ž(𝑒) = πΏπ‘žπ‘“(𝑒) will have the effect of

reducing the rise time and will reduce but never eliminate the steady-state error (unless the model of the plant has a pole at 𝑑 = 0 or 𝑨 = 1).

  • An integral action 𝑣𝑗(𝑒) = 𝐿𝑗

𝑒 𝑓 𝜐 π‘’πœ will have the effect of

eliminating the steady-state error for a constant or step input, but it may make the transient response slower.

  • A derivative action 𝑣𝑒(𝑒) = 𝐿𝑒

𝑒𝑓 𝑒 𝑒𝑒

will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response. But it has the drawback of amplifying the noise present in the error signal.

slide-4
SLIDE 4

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

4

Proportional Control The discrete implementation of proportional control is identical to the continuous one. The continuous is and the discrete is

π‘£π‘ž 𝑒 = πΏπ‘žπ‘“ 𝑒 β†’ π‘‰π‘ž (𝑑) 𝐹(𝑑) = πΏπ‘ž π‘£π‘ž 𝑙 = πΏπ‘žπ‘“ 𝑙 β†’ π‘‰π‘ž(𝑨) 𝐹(𝑨) = πΏπ‘ž

where 𝑓(𝑒) or e(𝑙) is the error signal.

slide-5
SLIDE 5

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

5

Derivative Control The continuous-time Integral control is The discrete-time derivative control is

𝑣𝑒 𝑒 = 𝐿𝑒 𝑒𝑓(𝑒) 𝑒𝑒 𝑓 𝑒 β†’ 𝑉𝑒(𝑑) 𝐹(𝑑) = 𝐿𝑒𝑑

𝑣𝑒 𝑙 = 𝐿𝑒 𝑓 𝑙 βˆ’ 𝑓(𝑙 βˆ’ 1) π‘ˆ β†’ 𝑉𝑒(𝑨) 𝐹(𝑨) = 𝐿𝑒 1 βˆ’ π‘¨βˆ’1 π‘ˆ = 𝐿𝑒 𝑨 βˆ’ 1 π‘ˆπ‘¨

where π‘ˆ is the sampling time.

slide-6
SLIDE 6

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

6

Integral Control The continuous-time integral control is The discrete-time integral control is

𝑣𝑗 𝑒 = 𝐿𝑗

𝑒

𝑓 𝜐 π‘’πœ β†’ 𝑉𝑗(𝑑) 𝐹(𝑑) = 𝐿𝑗 1 𝑑 𝑣𝑗 𝑙 = 𝑣𝑗 𝑙 βˆ’ 1 + πΏπ‘—π‘ˆπ‘“(𝑙) β†’ 𝑉𝑗(𝑨) 𝐹(𝑨) = πΏπ‘—π‘ˆ 1 βˆ’ π‘¨βˆ’1 = πΏπ‘—π‘ˆπ‘¨ 𝑨 βˆ’ 1

where π‘ˆ is the sampling time.

slide-7
SLIDE 7

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

7

Digital PID controller (conventional version)

𝑉(𝑨) 𝐹(𝑨) = πΏπ‘ž + πΏπ‘—π‘ˆ βˆ™ 𝑨 𝑨 βˆ’ 1 + 𝐿𝑒 π‘ˆ βˆ™ 𝑨 βˆ’ 1 𝑨

where πΏπ‘—π‘ˆ,

𝐿𝑒 π‘ˆ , are the new integral and derivative gains

Digital PI controller Digital PD controller

𝑉(𝑨) 𝐹(𝑨) = πΏπ‘ž + πΏπ‘—π‘ˆ βˆ™ 𝑨 𝑨 βˆ’ 1 𝑉(𝑨) 𝐹(𝑨) = πΏπ‘ž + 𝐿𝑒 π‘ˆ βˆ™ 𝑨 βˆ’ 1 𝑨

𝑣 𝑙 = πΏπ‘žπ‘“ 𝑙 + 𝐿𝑒 π‘ˆ 𝑓 𝑙 βˆ’ 𝑓(𝑙 βˆ’ 1) + 𝑣𝑗 𝑙 𝑣𝑗 𝑙 = 𝑣𝑗 𝑙 βˆ’ 1 + πΏπ‘—π‘ˆπ‘“(𝑙)

slide-8
SLIDE 8

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

8

Digital PID controller (alternative version)

𝑉(𝑨) 𝐹(𝑨) = πΏπ‘ž + 𝐿𝑗 𝑑 + 𝐿𝑒𝑑

𝑑=2 π‘ˆ π‘¨βˆ’1 𝑨+1

If we discretize the continuous-time (analog) PID controller using the bilinear transformation,

𝑉(𝑨) 𝐹(𝑨) = πΏπ‘ž + πΏπ‘—π‘ˆ 𝑨 + 1 2 𝑨 βˆ’ 1 + 2𝐿𝑒 𝑨 βˆ’ 1 π‘ˆ 𝑨 + 1 = 𝛽2𝑨2 + 𝛽1𝑨 + 𝛽0 (𝑨 βˆ’ 1)(𝑨 + 1)

we obtain an alternative form for a digital PID controller where 𝛽0, 𝛽1, and 𝛽2 are design parameters.

slide-9
SLIDE 9

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog and Digital formulations

9

https://www.youtube.com/watch?v=JEpWlTl95Tw PID Math Demystified

slide-10
SLIDE 10

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog Implementation

10

𝐿𝑗 𝐿𝑒 πΏπ‘ž

reverse direct Voltmeters

The key building block is the operational amplifier (op-amp).

PV – Process Variable 𝑧(𝑒) SP – Setpoint 𝑠 𝑒 Output – Control action 𝑣(𝑒)

Manual Output Adjust

slide-11
SLIDE 11

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog Implementation

FOXBORO 62H-4E-OH M/62H Analog PID controller:

11

slide-12
SLIDE 12

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Analog Implementation

12

Analog PI Motor Speed Control https://www.youtube.com/watch?v=6W3PLiVIcmE

slide-13
SLIDE 13

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Digital Implementation

The difference equations describing a digital PID are typically implemented in a microcontroller or in an FPGA (field-programmable gate array) device. Pseudocode 𝑣 𝑙 = πΏπ‘žπ‘“ 𝑙 + 𝐿𝑒 π‘ˆ 𝑓 𝑙 βˆ’ 𝑓(𝑙 βˆ’ 1) + 𝑣𝑗 𝑙 𝑣𝑗 𝑙 = 𝑣𝑗 𝑙 βˆ’ 1 + πΏπ‘—π‘ˆπ‘“(𝑙) Difference equations

previous_error = 0 integral = 0 Start: error = setpoint – measured_value proportional = Kp*error integral = integral + Ki*sampling_time*error derivative = Kd*(error – previous_error) /sampling_time

  • utput = proporcional + integral + derivative

previous_error = error wait (samplig_time) goto Start

13

slide-14
SLIDE 14

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Digital Implementation

14

PLC (Programmable logic controller) with a digital PID control module Digital PIDs

slide-15
SLIDE 15

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

Digital Implementation

15

What is a PLC? Basics of PLCs https://www.youtube.com/watch?v=iWgHqqunsyE

slide-16
SLIDE 16

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

16

Manual Tuning The effects of each of the controller parameters, πΏπ‘ž, 𝐿𝑗 and 𝐿𝑒 on a closed-loop system are summarized in the table below.

PID gains Closed-Loop Response Rise Time Overshoot Settling time Steady-state error πΏπ‘ž ↑ Decrease Increase Small Change Decrease 𝐿𝑗 ↑ Decrease Increase Increase Eliminate 𝐿𝑒 ↑ Small change Decrease Decrease No change

Note: Keep in mind that changing one of the PID gains can change the effect of the other two. For this reason, this table should only be used as a reference when you are determining the values for πΏπ‘ž, 𝐿𝑗 and 𝐿𝑒.

slide-17
SLIDE 17

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

17

Manual Tuning One possible way is as follows (the controller is connected to the plant):

  • Set 𝐿𝑗 and 𝐿𝑒 equal to 0.
  • Increase πΏπ‘ž until you observe that the step response is fast enough

and the steady-state error is small.

  • Start adding some integral action in order to get rid of the steady

state error. Keep in mind that too much 𝐿𝑗 can cause instability.

  • Add some derivative action in order to quickly react to disturbances

and/or dampen the response.

slide-18
SLIDE 18

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

18

Heuristic Methods : Ziegler–Nichols method tuning rule

  • Set the integral and derivative gains to zero (𝐿𝑗 = 𝐿𝑒 = 0 )
  • Increase the proportional gain πΏπ‘ž until the output of the control

loop starts oscillating with a constant amplitude. The value of πΏπ‘ž at this point is referred to as ultimate gain (πΏπ‘ž = 𝐿𝑣).

  • Measure the period of the oscillations at π‘ˆ

𝑣 the output of the

closed-loop system.

  • Use 𝐿𝑣 and π‘ˆ

𝑣 to determine the gains of the PID controller

according to the following tuning rule table:

slide-19
SLIDE 19

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

19

Heuristic Methods : Ziegler–Nichols method tuning rule

Control Type 𝑳𝒒 𝑳𝒋 𝑳𝒆 P 0.5𝐿𝑣

  • PI

0.45𝐿𝑣 1.2πΏπ‘ž/π‘ˆ

𝑣

  • PD

0.8𝐿𝑣

  • πΏπ‘žπ‘ˆ

𝑣/8

PID 0.6𝐿𝑣 2πΏπ‘ž/π‘ˆ

𝑣

πΏπ‘žπ‘ˆ

𝑣/8

Pessen Integral Rule 0.7𝐿𝑣 2.5πΏπ‘ž/π‘ˆ

𝑣

3πΏπ‘žπ‘ˆ

𝑣/20

Some overshoot 0.33𝐿𝑣 2πΏπ‘ž/π‘ˆ

𝑣

πΏπ‘žπ‘ˆ

𝑣/3

No overshoot 0.2𝐿𝑣 2πΏπ‘ž/π‘ˆ

𝑣

πΏπ‘žπ‘ˆ

𝑣/3

Note: Keep in mind that we are working with heuristic tuning rules, and therefore some additional fine tuning might be necessary.

slide-20
SLIDE 20

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

20

Numerical Optimization Methods

The tuning of a PID controller is posed as a constrained optimization problem.

  • For a given set of parameters πΏπ‘ž, 𝐿𝑗 and 𝐿𝑒 run a simulation of the closed-loop

system, and compute some performance parameters (e.g. setting time, rise time, etc.) and a performance index.

  • Optimize the performance index over the three PID gains.

πΏπ‘ž, 𝐿𝑗, 𝐿𝑒 Performance Index Optimizer PID Plant Model Simulation

slide-21
SLIDE 21

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

21

Some Software Tools

Software Tool Brief Description pidtool / pidTuner It is a Matlab tool to interactively design a SISO PID controller in the feed-forward path of single-loop, unity-feedback control configuration. Pidpy It is a modular PID control library for python that supports PID auto tuning. https://pypi.python.org/pypi/pypid/ INCA PID Tuner It is a commercial tuning tool developed by IPCOS. It has a vast library of PID structures for DCS and PLC Systems including Siemens, ABB, Honeywell, Emerson, etc.

http://www.ipcos.com/advancedprocesscontrol/advanced

  • process-control/pid-tuning-software/inca-pid-tuning/
slide-22
SLIDE 22

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

22

pidtool /pidTuner - Demo https://www.youtube.com/watch?v=2tKe0caUv1I

slide-23
SLIDE 23

Systems and Control Theory

STADIUS - Center for Dynamical Systems,

Signal Processing and Data Analytics

PID Tuning

23

INCA PID Tuner – Demo https://www.youtube.com/watch?v=XH2bkq1URSg