AUTOMATIC CONTROL SYSTEMSprofsite.um.ac.ir/~karimpor/autocontrol/lec2_aut_con.pdf · •Regulatory...
Transcript of AUTOMATIC CONTROL SYSTEMSprofsite.um.ac.ir/~karimpor/autocontrol/lec2_aut_con.pdf · •Regulatory...
Ali KarimpourAssociate Professor
Ferdowsi University of Mashhad
References:1- Modern Control Technologies: Components and Systems, 2nd Edition, by Kilian, Delmar Publication Co, ٢٠٠۵
AUTOMATIC CONTROLAUTOMATIC CONTROLSYSTEMSSYSTEMS
lecture 2
Ali Karimpour Apr 2013
2
Lecture 2
Feedback Control PrincipalsFeedback Control PrincipalsTopics to be covered include: Introduction Performance Criteria On-off Controllers PID Controllers PIP Controllers Fuzzy Logic Controllers
lecture 2
Ali Karimpour Apr 2013
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 2
Ali Karimpour Apr 2013
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 2
Ali Karimpour Apr 2013
On-off Controllers
5
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 2
Ali Karimpour Apr 2013
On-off Controllers
6
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 2
Ali Karimpour Apr 2013
PID Controllers
7
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
lecture 2
Ali Karimpour Apr 2013
PID Controllers
8
Proportional control is • simple, • makes sense, and• the basis of most control systems, but • has one fundamental problem“steady-state error”.
lecture 2
Ali Karimpour Apr 2013
deg/2 VoltsK p
PID Controllers
9
Example: 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 2
Ali Karimpour Apr 2013
PID Controllers
10
Example: 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.55 AoutputController 2.0
VAVAgainController /38.1/029.01oz in./
251oz/ in. 1
lecture 2
Ali Karimpour Apr 2013
PID Controllers
11
Example: In the previous example 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 istorqueMotor
145.0029.02587.025 isatError
side) oz(load in.50side)oz(motor in.5)145.038.1(25 istorqueMotor
lecture 2
Ali Karimpour Apr 2013
PIP Controllers
12
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 2
Ali Karimpour Apr 2013
PIP Controllers
13
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 2
Ali Karimpour Apr 2013
PIP Controllers
14
Another Example of P controller
Design set point for a 6 gal/min output.
Full opening of valve leads to 10 gal/min so : set point = 0.6*5v=3v.
lecture 2
Ali Karimpour Apr 2013
PIP Controllers
15
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 2
Ali Karimpour Apr 2013
PIP Controllers
16
Bias
lecture 2
Ali Karimpour Apr 2013
deg/2 VoltsK p
PID Controllers
17
PI Controller
How to remove steady state error?
lecture 2
Ali Karimpour Apr 2013
PID Controllers
18
PI ControllerThe proportional feedback system is (KP = 10 in. · oz/deg) and has been modified to include integral feedback.
lecture 2
Ali Karimpour Apr 2013
PID Controllers
19
PI Controller
Integral control may cause overshoot and oscillations.
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 2
Ali Karimpour Apr 2013
PID Controllers
20
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 2
Ali Karimpour Apr 2013
PID Controllers
21
PID Control
lecture 2
Ali Karimpour Apr 2013
PIP Controllers
22
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 2
Ali Karimpour Apr 2013
23
Tuning of PID Controllers
Because of their widespread use in practice, we present below several methods for tuning PID controllers. Actually these methods are quite old and date back to the 1950’s. Nonetheless, they remain in widespread use today.In particular, we will study.
Ziegler-Nichols Oscillation Method Ziegler-Nichols Reaction Curve Method Cohen-Coon Reaction Curve Method Time domain design Frequency domain design
PIDتنظیم کنترلرهاي
lecture 2
Ali Karimpour Apr 2013
24
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 2
Ali Karimpour Apr 2013
25
PIDKTT19.0
Kp Ki Kd
2127.0
DKTT
PIDDKTT12.1
P
حالت حلقه باز نیکولز زیگلرطراحی
DKTT1
216.0
DKTT
KT16.0
Ziegler-Nichols Reaction Curve Method(Open-Loop Case)
lecture 2
Ali Karimpour Apr 2013
26
Numerical Example
Example4: Consider step response of an open-loop system as:
مثال عددي
sesGTTCK
DsT
D 20140)(sec20sec,5,40 :So 1
lecture 2
Ali Karimpour Apr 2013
27
PI 09.09.0 1 DKTT
Kp Ki Kd
0054.027.021
DKTT
PID 12.02.1 1 DKTT
P 1.01 DKT
T
012.06.021
DKTT
3.06.0 1 KT
sesGTTCK
DsT
D 20140)(sec20sec,5,40 :So 1
1.0)( sKP
ssKPI
0054.009.0)(
ss
sKPID 3.0012.012.0)(
Numerical Example مثال عددي
lecture 2
Ali Karimpour Apr 2013
28
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 2
Ali Karimpour Apr 2013
29
PI cK45.0
Kp Ki Kd
TKc54.0
PID TKc2.1 TKc075.0cK6.0
P cK5.0
Ziegler-Nichols Oscillation Method(Closed-loop))حلقه بسته(نوسانی بروش نیکولز زیگلرطراحی
lecture 2
Ali Karimpour Apr 2013
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.
30
Numerical Exampleمثال عددي
lecture 2
Ali Karimpour Apr 2013
31
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.
حل
17.2075.065.22.18.46.0 TKKTKKKK cdc
icp
lecture 2
Ali Karimpour Apr 2013
32
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 2
Ali Karimpour Apr 2013
PID Controllers
33
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 2
Ali Karimpour Apr 2013
PID Controllers
34
Stability
Reason for instability
• Phase lag caused by dead time or backlash.
• Positive feedback.
lecture 2
Ali Karimpour Apr 2013
35
Digital PID Controller
or
Digital PID Controllers
lecture 2
Ali Karimpour Apr 2013
36
Digital PID Controller
or
Digital PID Controllers
lecture 2
Ali Karimpour Apr 2013
Digital PID Controllers
37
lecture 2
Ali Karimpour Apr 2013
38
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 2
Ali Karimpour Apr 2013
39
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 2
Ali Karimpour Apr 2013
40
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
Is the microprocessor ok for this system?
Yes
lecture 2
Ali Karimpour Apr 2013
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.
41
lecture 2
Ali Karimpour Apr 2013
PIP Controllers
42
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
43
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
44
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
45
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
46
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
47
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
48
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
0.2*1+0.4*0.6=0.44
0.44/0.6=1
lecture 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
49
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 2
Ali Karimpour Apr 2013
Fuzzy Logic Controllers
50
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 2
Ali Karimpour Apr 2013
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.
51
lecture 2
Ali Karimpour Apr 2013
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?
52
lecture 2
Ali Karimpour Apr 2013
Exercises
8- 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?
9- 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?
53
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.
6- What is the necessary condition that allows PIP control to be used?
7- What problem is solved and what new problem is created with the addition of integralfeedback?