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
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
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.
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
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.
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?
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
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
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.
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
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”.
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?
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
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
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.
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.
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
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
lecture 4
Dr. Ali Karimpour Apr 2014
PID Controllers
19
Bias
lecture 4
Dr. Ali Karimpour Apr 2014
deg/2 VoltsK p
PID Controllers
20
PI Controller
How to remove steady state error?
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.
lecture 4
Dr. Ali Karimpour Apr 2014
PID Controllers
22
PI Controller
Integral control may cause overshoot and oscillations.
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.
lecture 4
Dr. Ali Karimpour Apr 2014
PID Controllers
24
PID 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.
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.
lecture 4
Dr. Ali Karimpour Apr 2014
PID Controllers
27
Stability
Reason for instability
• Phase lag caused by dead time or backlash.
• Positive feedback.
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
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
)حلقه بسته(نوسانی بروش نیکولز زیگلرطراحی
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
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مثال عددي
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
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
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.
حالت حلقه باز نیکولز زیگلرطراحی
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
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
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
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:
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
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!
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
lecture 4
Dr. Ali Karimpour Apr 2014
42
Problem arise in D part of controller:
PID Controller Problems
lecture 4
Dr. Ali Karimpour Apr 2014
43
Solving the problem arise in D part of controller:
PID Controller Problems
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:
lecture 4
Dr. Ali Karimpour Apr 2014
45
Problem arise in Integral part of controller (Windup):
PID Controller Problems
No limit case
With limiter
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?
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
lecture 4
Dr. Ali Karimpour Apr 2014
48
Problem arise in Integral part of controller (Windup):
PID Controller Problems
lecture 4
Dr. Ali Karimpour Apr 2014
49
PID Controller Problems
PID controller with Anti-windup.
lecture 4
Dr. Ali Karimpour Apr 2014
50
PID Controller Problems
Industrial PID controller with Anti-windup.
lecture 4
Dr. Ali Karimpour Apr 2014
51
Digital PID Controller
or
Digital PID Controllers
lecture 4
Dr. Ali Karimpour Apr 2014
52
Digital PID Controller
or
Digital PID Controllers
lecture 4
Dr. Ali Karimpour Apr 2014
Digital PID Controllers
53
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
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).
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
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
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.
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 ?
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.
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.
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.
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
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.
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
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
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
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
Top Related