control in instrumentation -...

68
Ali Karimpour Associate Professor Ferdowsi University of Mashhad CONTROL IN CONTROL IN INSTRUMENTATION INSTRUMENTATION References: 1- Modern Control Technologies: Components and Systems, 2 nd Edition, by Kilian, Delmar Publication Co, ٢٠٠۵ 2- Principles and Practice of Automatic Process Control. 3 rd Edition, by C. A. Smith and A. B. Corripio, John Wiley & Sons 3- Power Points of Dr. Hamed Molla Ahmadian

Upload: others

Post on 20-Jan-2020

37 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

Ali KarimpourAssociate Professor

Ferdowsi University of Mashhad

CONTROL IN CONTROL IN INSTRUMENTATIONINSTRUMENTATION

References:1- Modern Control Technologies: Components and Systems, 2nd Edition, by Kilian, Delmar Publication Co, ٢٠٠۵ 2- Principles and Practice of Automatic Process Control. 3rd Edition, by C. A. Smith and A. B. Corripio, John Wiley & Sons3- Power Points of Dr. Hamed Molla Ahmadian

Page 2: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

2

Lecture 4

Feedback Control PrincipalsFeedback Control PrincipalsTopics to be covered include: Introduction Performance Criteria On-off Controllers PID Controllers PIP Controllers Fuzzy Logic Controllers

Page 3: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Introduction

3

a) Heating systems

• Regulatory control despitethe presence of disturbances

• Supervisory control for SP

b) Servomechanism systems

• Tracking control

• More accurate model

c) Fuzzy logic control: A new and increasingly important type of control that does not use mathematical models but mimic the skill and experience of a human operator.

Page 4: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Performance Criteria

4

Performance criteria are various measurable parameters that indicate how good (or bad) the control system is.

• Transient (moving) parameters• Steady-state (not changing) parameters.

Transient response of a robot.

• Rise time (T)

• Overshoot and P.O.

• Settling time

• Steady-state error

Page 5: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

On-off Controllers

5

Two-point control: (also called on–off control) is the simplest type of closed-loop control strategy.

a b

c d e

f

All On-Off controller has a Dead band or Hysteresis.

Page 6: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

On-off Controllers

6

Two-point control: (also called on–off control) is the simplest type of closed-loop control strategy.

Mostly suitable on slow-moving systems where it is acceptable for the controlled variable to move back-and-forth between the two limit points.

Reducing Tcyc?

Page 7: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

7

Error Amplifier

potRR

Difference Amplifier

PVSPSPPVerror VVVRRV

RRV

1

2

1

2

Inverting Amplifier

PVSPSPPVerror VVVRRV

RRV )(

2

3

2

3

Page 8: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

8

On-Off Controllers

On-Off Controllers

2, errorsatz VVVif

6.0 zV

2,6.0 errorz VVif

satz VV

satz VV satV

2

6.0zVsatV

2

221

2 satVRR

R

Page 9: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

On-off Controllers

9

Three-position control: is similar to two-point control, except in this case the controller has three states, such as forward–off–reverse

Typical Operation:

Strong Motors.

Weak Motors.

Page 10: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

10

We now consider more sophisticated control strategies that require “smart” controllers that use op-amps or a microprocessor.

• Proportional control

Explain the behavior if deg/2 VoltsK p

Real output

Real controlleroutput

Page 11: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

11

Proportional control is • simple, • makes sense, and• the basis of most control systems, but • has one fundamental problem“steady-state error”.

Page 12: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

deg/2 VoltsK p

PID Controllers

12

Example1: Derive Dead bandof system if the motor need 6 volts to rotates (since of friction).

Clearly dead band is 6 deg.

Other sources of dead band?

Compensation methods?

Page 13: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

13

Example2: Specify the controller required to position the robot arm to within 5 deg of the set point.

Total friction and gravity will beLess than 50 in. oz in the load side.

A 350 Deg. Pot is used.

Controller output is in A.

Answer:

oz in.5 bemust uemotor torq5at AoutputcontrollerSo 2.0

VAgainController /38.1AgainController 2.0029.05

Page 14: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

14

Example3: In the example2 Suppose set point is set by 0.87 VAnd the arm is at 0 deg.Specify the situation.

Answer:

87.0isError

AoutputController 2.138.187.0

side) oz(load in.300side)oz(motor in.302.125 istorqueMotorMotor start to rotate till the torque at load side reach to 50 in.oz.

side)oz(motor in.5side) oz(load in.50 istorqueMotor 0.2 a I

2.038.1029.087.0 PV25PV

Page 15: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

15

BiasOne way to deal with the gravity problem is to have the controller add in a constantvalue (to its output) that is just sufficient to support the weight.

Page 16: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

16

Another Example of P controller

The flow sensor provides an output signal of 0-5 V, which correspond to 0-10 gal/min.

The flow valve is operated with a signal of 0-5 V, where 0 V corresponds to completelyclosed and 5 V is all the way open.

Design a 50% proportional band and set the controller value.

Page 17: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

17

Another Example of P controller

What is the output flow rate if we assign set point as 3v.

Exact output for set point =3v. 2(3-0.5x)=0.5x x=4 gal/min

Page 18: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

18

Another Example of P controller

Exercise1: a) Draw block diagram of above system.b) Find the value of output flow in gal/minc) Set the value of set point such that output be exactly 6 gal/min

Page 19: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

19

Bias

Page 20: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

deg/2 VoltsK p

PID Controllers

20

PI Controller

How to remove steady state error?

Page 21: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

21

PI ControllerThe proportional feedback system is (KP = 10 in. · oz/deg) and has been modified to include integral feedback.

Page 22: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

22

PI Controller

Integral control may cause overshoot and oscillations.

Page 23: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

23

Derivative Control

One solution to the overshoot problem is to include derivative control.

Derivative control “applies the brakes,” slowing the controlled variable just before it reaches its destination.

Page 24: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

24

PID Control

Page 25: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

25

PI controller

Exercise2: a) Draw block diagram of above system with PI controller.b) Find the value of output flow in gal/minc) Find the output of Integral part of controller.

Page 26: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

26

Stability

A stable system is one where the controlled variablewill always settle out at or near the set point.

An unstable system is one where, under some conditions, the controlled variable drifts awayfrom the set point or breaks into oscillations that get larger and larger until the system saturates on each side.

Page 27: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PID Controllers

27

Stability

Reason for instability

• Phase lag caused by dead time or backlash.

• Positive feedback.

Page 28: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

28

Tuning of PID Controllers

Because of their widespread use in practice, we present below several methods for tuning PID controllers. In particular, we will study.

Ziegler-Nichols Oscillation Method Ziegler-Nichols Reaction Curve Method Cohen-Coon Reaction Curve Method Controller Synthesis(Dahlin Response) Minimizing ISE or IAE Time Domain Design Frequency Domain Design

PIDتنظیم کنترلرهاي

)11(_ sTsT

KControllerPID d

i

)1)(11(_ '

'sT

sTKControllerPID d

i

Page 29: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

29

Ziegler-Nichols Oscillation Method(Closed-loop)

This procedure is only valid for open loop stable plants and it is carried out through the following steps

Set the true plant under proportional control, with a very small gain.

Increase the gain until the loop starts oscillating. Note that linear oscillation is required and that it should be detected at the controller output.

Record the controller critical gain Kc and the oscillation period of the controller output, T.

Adjust the controller parameters according to Table

)حلقه بسته(نوسانی بروش نیکولز زیگلرطراحی

Page 30: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

30

PI cK45.0

K Ti Td

T83.0

PID T5.0 T125.0cK6.0

P cK5.0

Ziegler-Nichols Oscillation Method(Closed-loop))حلقه بسته(نوسانی بروش نیکولز زیگلرطراحی

)11(_ sTsT

KControllerPID d

i

This method leads to quarter decay ratio response

Page 31: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Example5: Consider a plant with a model given by

Find the parameters of a PID controller using the Z-N oscillation method. Obtain a graph of the response to a unit step input reference.

31

Numerical Exampleمثال عددي

Page 32: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

32

Solution

Applying the procedure we find:Kc = 8 and ωc = 3. T=3.62

Hence, from Table, we have

The closed loop response to a unit step in the reference at t= 0 is shown in the next figure.

حل

4525.0125.081.15.08.46.0 TTTTKK dic

)4525.081.111(8.4_ ss

ControllerPID

Page 33: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

33

Response to step reference

0 5 10 150

0.5

1

1.5Step response for PID control

Time (sec)

Ampl

itude

پاسخ سیستم به پله

ss

sCPID 17.265.28.4)(

117.201.017.265.28.4)(

ss

ssCPID

Page 34: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

34

Ziegler-Nichols Reaction Curve Method(Open-Loop Case)

For open-loop tuning, we first find the plant parameters by applying a step input to the open-loop system.

The plant parameters K, TD and T1 are then found from the result of the step test as shown in Figure.

حالت حلقه باز نیکولز زیگلرطراحی

Page 35: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

35

PIDKTT19.0

K Ti Td

PIDDKTT12.1

P

حالت حلقه باز نیکولز زیگلرطراحی

DKTT1

DT2 DT5.0

Ziegler-Nichols Reaction Curve Method(Open-Loop Case)

)11(_ sTsT

KControllerPID d

i

DT33.3

This method leads to quarter decay ratio response

Page 36: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

36

Numerical Example

Example4: Consider step response of an open-loop system as:

مثال عددي

sesGTTCK

DsT

D 20140)(sec20sec,5,40 :So 1

Page 37: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

37

PIDKTT

19.0

K Ti Td

DT33.3

PIDDKTT12.1

PDKT

T1

sesGTTCK

DsT

D 20140)(sec20sec,5,40 :So 1

1.0)( sKP

ssKPI

0054.009.0)(

ss

sKPID 3.0012.012.0)(

Numerical Example مثال عددي

DT2 DT5.0

Page 38: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

38

Controller Synthesis Method (Dahlin Response)

)داهلینبر اساس پاسخ ( کنترلرتحلیلی طراحی

)()(1)()(

)()()(

sGsGsGsG

sRsCsT

c

c

)(1)(

)(1)(

sTsT

sGsG

c

Following response was suggested by Dahlin

11)(

sT

sTc

sTsGsG

c

c

1)(

1)(

Tc is the time constant of the closed loop response and, being adjustable:

Page 39: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

39

Controller Synthesis Method (Dahlin Response)

)داهلینبر اساس پاسخ ( کنترلرتحلیلی طراحی

sTsGsG

c

c

1)(

1)(

Let G(s) be a constant process so:

controller integralpurea11)(sTK

sGc

c

Let G(s) be an integral process so:

sKsG )( controller alproportion purea11)(

cc

c KTsTKssG

Let G(s) be a FO process so:

1)(

TsKsG controller PIa)11(11)(

TsKTT

sTKTssG

cc

c

Page 40: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

40

Controller Synthesis Method (Dahlin Response)

)داهلینبر اساس پاسخ ( کنترلرتحلیلی طراحی

sTsGsG

c

c

1)(

1)(

Let G(s) be a second order process so:

Let G(s) be a FOTD process so:

)1)(1()(

21

sTsTKsG )1)(11(1)1)(1()( 2

1

121

sTsTKT

TsTK

sTsTsGcc

c

LseTsKsG

1)( Ls

cc

Lsc eTsKT

TsTKe

TssG )11(11)(

It is not realizable!

Page 41: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

41

Controller Synthesis Method (Dahlin Response)

)داهلینبر اساس پاسخ ( کنترلرتحلیلی طراحی

)(1)(

)(1)(

sTsT

sGsGc

Let Ls

c

esT

sT

11)(

Let G(s) be a FOTD process so:Lse

TsKsG

1)( Ls

cc

Lsc eTsKT

TsTKe

TssG )11(11)(

It is notrealizable!

Ls

c

Ls

c

Ls

Lsc esTKTs

esTe

KeTssG

111

11)(

sL

sL

e Ls

21

21

)'1

21

)(11()(

)(sT

sL

TsLTKTsGc

c

)(2

'LT

LTTc

c

Page 42: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

42

Problem arise in D part of controller:

PID Controller Problems

Page 43: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

43

Solving the problem arise in D part of controller:

PID Controller Problems

Page 44: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

44

Problem arise in Integral part of controller (Windup):

PID Controller Problems

Consider thesystem:

But always in real systems we have limiter so:

Page 45: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

45

Problem arise in Integral part of controller (Windup):

PID Controller Problems

No limit case

With limiter

Page 46: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

46

Problem arise in Integral part of controller (Windup):

PID Controller Problems

With limiter

This is windup!

Removing windup effect?

Page 47: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

47

Problem arise in Integral part of controller (Windup):

PID Controller Problems

This is controller with anti-windup.

How to choose Tt?

Choose TD < Tt < Ti A rule of thumb suggest Tt = √TDTi

Page 48: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

48

Problem arise in Integral part of controller (Windup):

PID Controller Problems

Page 49: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

49

PID Controller Problems

PID controller with Anti-windup.

Page 50: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

50

PID Controller Problems

Industrial PID controller with Anti-windup.

Page 51: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

51

Digital PID Controller

or

Digital PID Controllers

Page 52: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

52

Digital PID Controller

or

Digital PID Controllers

Page 53: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Digital PID Controllers

53

Page 54: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

54

Sampling rate

In a digital control system, sample rate is the number of times per second a controller reads in sensor data and produces a new output value.Shannon’s sampling theorem ?Aliasing

Digital PID Controllers

Page 55: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

55

Sampling rate

Digital PID Controllers

In practice, a sampling rate of at least ten times the highest frequency in the system is usually sufficient.In most systems, sampling is done once at the beginning of each pass through the program loop (that is, one sample for each iteration).

Page 56: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

56

Sampling rate

Digital PID Controllers

Example5: A microprocessor-based control system runs at a clock speed of 1 MHz.

• 55 instructions with an average execution time of 4 clocks/instruction

• 8-bit ADC with a 100-μs conversion time

What is the maximum sample rate?

Maximum sample rate is: 3.125 kHz

We choose 0.5 ms as sampling period.Does the microprocessor ok for this system?

Yes

Page 57: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PIP Controllers

The set point has been defined as the place where you want the controlled variable to be.

In a dynamic system, such as a robot arm, the desired position is a moving target, in which case we are concerned with path control.

There are two ways to implement path control:

• Carrot-and-horse

• Feedforward, or PIP approach

A Proportional + Integral + Preview (PIP) controller is a system thatIncorporates information of the future path in its current output.

57

Page 58: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

PIP Controllers

58

A Proportional + Integral + Preview (PIP) controller is a system thatIncorporates information of the future path in its current output.

Notice that the feed forward term,is proportional to the difference between where the controlled object is and whereit must be in the future.

Page 59: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

59

Fuzzy logic, a relatively new concept in control theory, is simply the acceptance of principles that have existed since the beginning of time:

Real-world quantities are not usually“all or nothing” or “black and white” but something in-between

Time of Fajr?

Weather ?

Page 60: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

60

Fuzzy logic controllers are modeled after the natural way people arrive at solutions:

• We apply different solution methodologies (rules), depending on the value of the stimulus.

• We frequently apply more than one of our “rules” at the same time to a single problem.• We accept a certain amount of imprecision, which allows us to arrive at workable solutions to problems.

Temperature is 20 degree.

Parking a car.

Page 61: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

61

Fuzzy logic was first proposed by L. A. Zadeh working at Berkeley in 1965.

However, Japanese industry really embraced the idea and developed applications in the area of fuzzy logic control.

The Nissan system claims to cut fuel consumption by 12-17%.

Fuzzy logic-controlled washing machines adjust the amount of water, amount of detergent, and cycle time to how dirty and how many clothes are in the load.

Page 62: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

62

Example 7: A One-Input System

• Rule 1: If the temperature is cool, then turn up the gas.• Rule 2: If the temperature is medium , then the gas is OK.• Rule 3: If the temperature is warm, then turn down the gas.

Page 63: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

63

Example of a One-Input System

For example, if the temperature sensor reported 64°, the quantisizer would determine that 64° is 20% cool and 40% medium

Smallest Max Largest Max

Centroid of areaMean of max

Bisector of area

Page 64: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

64

Example8: A Two-Input System

• Rule 1: If T is cool and lowering, then increase the gas sharply.• Rule 2: If T is cool and steady, then increase the gas.• Rule 3: If T is cool and raising, then the gas is OK.• Rule 4: If T is medium and lowering, then increase the gas.• Rule 5: If T is medium and steady, then the gas is OK.• Rule 6: If T is medium and raising, then decrease the gas.

• Rule 7: If T is warm and lowering, then the gas is OK.• Rule 8: If T is warm and steady, then decrease the gas.• Rule 9: If T is warm and raising, then decrease the gas sharply.

Page 65: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Fuzzy Logic Controllers

65

Find the output if T=64 degree and increasing 0.6 degree/min

• Rule 2: If T is cool and steady, then increase the gas.

• Rule 3: If T is cool and raising, then the gas is OK.

• Rule 5: If T is medium and steady, then the gas is OK.

• Rule 6: If T is medium and raising, then decrease the gas.

0.2 0.1 +2

0.2 0.5 0

0.4 0.1 0

0.4 0.5 -2

0.02 +2 = 0.04

0.1 0 = 0

0.04 0 = 0

0.2 -2 = -0.4

Page 66: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Exercises

1- A thermostat is used to maintain a temperature of 87° F. An accurate recording of the room temperature is shown in Figure 11.42. The respective cut-in and cut-off points are currently 84° and 90°. What would you predict the cycle time would be if the cut-in and cut-off points were respectively changed to 86° and 88°?

2- A robot arm was commanded to go to a new position. Its response was recorded and isshown in following Figure. Determine the rise time, overshoot, settling time, and steady-state error of the response.

66

Page 67: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Exercises

3-(a)Define Kp for shown system.(b) For output sensor of 2.5v and set Point of 3v, define valve input voltage(suppose Bias resistor=0).(c) If sensor steady state tarnsferfunction be 0.75 V.min/gal, set point resistor 500 ohm and Valve input voltege 3v, find the Bias Resistor?

67

Page 68: CONTROL IN INSTRUMENTATION - karimpor.profcms.um.ac.irkarimpor.profcms.um.ac.ir/imagesm/354/stories/con_ins/control_inst_4.pdf · CONTROL IN INSTRUMENTATION References: 1-Modern Control

lecture 4

Dr. Ali Karimpour Apr 2014

Exercises

9- For the single-input fuzzy logic temperature controller specified in example 7, determine the defuzzified output for a temperature of 62°. Does your answer make sense?

10- For the two-input fuzzy logic temperature controller specified in Example 8, determine the defuzzified output for a temperature of 76° and ΔT of –0.3 deg/ min. Does your answer make sense?68

5- Draw a block diagram for an analog PID controller, indicating the function that eachblock performs.

4- Explain how the addition of integral feedback in a proportional control system eliminatessteady-state error.

7- What is the necessary condition that allows PIP control to be used?

8- What problem is solved and what new problem is created with the addition of integralfeedback?

6- Derive a PID controller for following system according three mentioned method in thelecture.

)13)(130)(110(8.0)(

ssssG