* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download controlkhati 21
Survey
Document related concepts
Public address system wikipedia , lookup
Signal-flow graph wikipedia , lookup
Ringing artifacts wikipedia , lookup
Dynamic range compression wikipedia , lookup
Integrating ADC wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Regenerative circuit wikipedia , lookup
Distributed control system wikipedia , lookup
Opto-isolator wikipedia , lookup
Negative feedback wikipedia , lookup
Wien bridge oscillator wikipedia , lookup
Control theory wikipedia , lookup
Transcript
بسم ا ...الرحمن الرحيم سیستمهای کنترل خطی پاییز 1389 دکتر حسین بلندي -دکتر سید مجید اسما عیل زاده :review 2 :review 3 Control Configurations 4 Control Configurations 5 Controll er Type 6 Controll er Type 7 8 Controll er Type 9 Historical note The first application of PID controller was in 1922 by Minorsky on ship steering. Minorsky (1922) “Directional stability of automatically steered bodies”, J. Am. Soc. Naval Eng., 34, p.284. This was the first mathematical treatment of the type of controller that is now used to control almost all industrial processes. The current situation Despite the abundance of sophisticated tools, including advanced controller design techniques, PID controllers are still the most widely used controller structure in modern industry, controlling more that 95% of closed-loop industrial processes. Different PID controllers differ in the way how their parameters be tuned, manually, or automatically. Most of the DCS systems have built-in routines to perform autotuning of PID controllers based on the loop characteristics. They are often called: auto-tuners. The PID Algorithm • The PID algorithm is the most popular feedback controller algorithm used. It is a robust easily understood algorithm that can provide excellent control performance despite the varied dynamic characteristics of processes. • As the name suggests, the PID algorithm consists of three basic modes: the Proportional mode, the Integral mode & the Derivative mode. PID controllers P, PI or PID Controller • When utilizing the PID algorithm, it is necessary to decide which modes are to be used (P, I or D) and then specify the parameters (or settings) for each mode used. • Generally, three basic algorithms are used: P, PI or PID. • Controllers are designed to eliminate the need for continuous operator attention. Cruise control in a car and a house thermostat are common examples of how controllers are used to automatically adjust some variable to hold a measurement (or process variable) to a desired variable (or set-point) Controller Output • The variable being controlled is the output of the controller (and the input of the plant): provides excitation to the plant system to be controlled • The output of the controller will change in response to a change in measurement or set-point (that said a change in the tracking error) PID Controller • In the s-domain, the PID controller may be represented as: Ki U ( s) K p K d s E ( s) s • In the time domain: de(t ) u (t ) K p e(t ) K i e(t )dt K d 0 dt t proportional gain integral gain derivative gain PID Controller • In the time domain: de(t ) u (t ) K p e(t ) K i e(t )dt K d 0 dt t • The signal u(t) will be sent to the plant, and a new output y(t) will be obtained. This new output y(t) will be sent back to the sensor again to find the new error signal e(t). The controllers takes this new error signal and computes its derivative and its integral gain. This process goes on and on. Definitions • In the time domain: de(t ) u (t ) K p e(t ) K i e(t )dt K d 0 dt 1 t de(t ) K p e(t ) e(t )dt Td 0 T dt i t integral time constant where Ti proportional gain derivative time constant Kp Ki , Kd Td Kp integral gain derivative gain PID structures Standard PID controllers have the following structures: Proportional only: Proportional plus Integral: Proportional plus derivative: Proportional, integral and derivative: What is an Op-Amp? • An Operational Amplifier is an electronic device used to perform mathematical operations in a circuit – they are generally abbreviated as “Op-Amps” • Op-Amps are high gain devices that amplify a signal using an external power supply • They are composed of multiple transistors, resistors, and capacitors • Common types of op-amps: • • • • • Inverting Non-Inverting Integrating Differential Summing What is an Op-Amp? • All op-amps use a voltage supply (Vcc) to amplify the signal • The supply voltages can either have equal value but opposite signs, or the low side is grounded and the high side has a value of twice the voltage input • Some common applications of op-amps: • Low Pass Filters • Strain Gauges • PID Controllers +Vcc V- VV - V+ V + Inverting Input Vou tVout Vou t V+ Non-Inverting Input -Vcc Typical 8 Pin Op-Amp Amplifier Gain • All op-amps can be represented by the formula: Vout = K (V+ - V-) V Vout - • Where K is the gain, and is a property of the individual op-amp • This gain should be distinguished from the gain of the op-amp circuit which is generally denoted by Av V + Op-Amp Av = Vout / Vin • A potential source of confusion comes from failing to properly distinguish between the op-amp and the op-amp circuit Op-Amp Circuit Comparator • A comparator is an example of an open-loop op-amp +Vcc Vout i- = 0A V- Vin - i+ = 0A + V+ Vin + If V+ > VIf V+ < V- Vou + Vsat t Vcc Vout = Vsat ≈ Vcc Vout = -Vsat ≈ - Vcc Vin+ Vin- - Vsat Summing Op-Amp • Application of a non-inverting opamp and Millman‘s theorem (1) Millman’s theorem: VinA VinB VinC RA RB RC V' 1 1 1 R A RB RC R2 (2) R1 Vin RA A Vin RB B V- - V+ + V’ Vin RC C (1) Vout = VinA + VinB + VinC Vout if RA = RB = RC = R V ' 1/ 3 ( VinA VinB VinC ) (2) Non-inverting Op-Amp: R2 Vout 1 V' R1 R if 1 2 3 R1 Vout 3 x 1/ 3 ( VinA VinB VinC ) Substraction (Differential) Op-Amp • Applying Kirchhoff’s Rules and Op-Amp Calculation Rules yields: Vout = VinA - VinB R4 R2 R3 R4 VinA VinB Vout R1 R2 R3 R3 R4 if R1 = R2 = R3 = R4 Vout VinA VinB Note: if R1 = R3 = R and R2 = R4 = a R Vout a VinA VinB Vin R3 V- - B Vin A R1 V+ R2 + Vout Derivative Op-Amp R Vin Vin C R V- - V+ + (RC) Vout d dt Vout Applying Kirchhoff’s Rules and Op-Amp Calculation Rules yields: dVin ( t ) Vout ( RC) dt Integrating Op-Amp C Vin Vin R R V- V+ + Vout 1 RC Vout Applying Kirchhoff’s Rules and Op-Amp Calculation Rules yields: 1 t Vout Vin d RC 0 dt PID Controller – System Block Diagram P VSET VERROR I Output Process VOUT D VSENSOR Sensor •Goal is to have VSET = VOUT •Remember that VERROR = VSET – VSENSOR •Output Process uses VERROR from the PID controller to adjust Vout such that it is ~VSET Applications PID Controller – System Circuit Diagram Signal conditioning allows you to introduce a time delay which could account for things like inertia System to control Calculates VERROR = -(VSET + VSENSOR) -VSENSOR Applications PID Controller – PID Controller Circuit Diagram VERROR Adjust Change Kp RP1, RP2 Ki RI, CI Kd RD, CD VERROR PID 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 Controller Effects • A proportional controller (P) reduces error responses to disturbances, but still allows a steady-state error. • When the controller includes a term proportional to the integral of the error (I), then the steady state error to a constant input is eliminated, although typically at the cost of deterioration in the dynamic response. • A derivative control typically makes the system better damped and more stable. Closed-loop Response Rise time P Decrease Maximum overshoot Increase I Decrease Increase Settling time Small change Increase D Small change Decrease Decrease Steadystate error Decrease Eliminate Small change • Note that these correlations may not be exactly accurate, because P, I and D gains are dependent of each other. Example problem of PID • Suppose we have a simple mass, spring, damper problem. • The dynamic model is such as: mx bx kx f • Taking the Laplace Transform, we obtain: ms2 X (s) bsX (s) kX (s) F (s) • The Transfer function is then given by: X ( s) 1 2 F ( s) ms bs k Example problem (cont’d) • Let m 1kg , b 10 N .s / m , k 20 N / m , f 1N • By plugging these values in the transfer function: X ( s) 1 2 F ( s) s 10s 20 • The goal of this problem is to show you how each of K p , K i and K d contribute to obtain: fast rise time, minimum overshoot, no steady-state error. Ex (cont’d): No controller • The (open) loop transfer function is given by: X ( s) 1 2 F ( s) s 10s 20 • The steady-state value for the output is: X ( s) 1 xss lim x(t ) lim sX ( s) lim sF ( s) t s 0 s 0 F ( s) 20 Ex (cont’d): Open-loop step response • 1/20=0.05 is the final value of the output to an unit step input. • This corresponds to a steady-state error of 95%, quite large! • The settling time is about 1.5 sec. Ex (cont’d): Proportional Controller • The closed loop transfer function is given by: Kp X ( s) F ( s) Kp s 2 10s 20 Kp s 2 10s (20 K p ) 1 2 s 10s 20 Ex (cont’d): Proportional control • Let K p 300 • The above plot shows that the proportional controller reduced both the rise time and the steady-state error, increased the overshoot, and decreased the settling time by small amount. Ex (cont’d): PD Controller • The closed loop transfer function is given by: K p Kd s X ( s) F ( s) K p Kd s s 2 10s 20 K p Kd s s 2 (10 K d ) s (20 K p ) 1 2 s 10s 20 Ex (cont’d): PD control • Let K p 300, K d 10 • This plot shows that the proportional derivative controller reduced both the overshoot and the settling time, and had small effect on the rise time and the steady-state error. Ex (cont’d): PI Controller • The closed loop transfer function is given by: K p Ki / s X ( s) F ( s) K p s Ki s 2 10s 20 K p Ki / s s 3 10s 2 (20 K p ) s K i 1 2 s 10s 20 Ex (cont’d): PI Controller • Let K p 30, K i 70 • We have reduced the proportional gain because the integral controller also reduces the rise time and increases the overshoot as the proportional controller does (double effect). • The above response shows that the integral controller eliminated the steady-state error. Ex (cont’d): PID Controller • The closed loop transfer function is given by: K p K d s Ki / s X ( s) F ( s) K d s 2 K p s Ki s 10s 20 3 K p K d s K i / s s (10 K d ) s 2 (20 K p ) s K i 1 s 2 10s 20 2 Ex (cont’d): PID Controller • Let K p 350, K i 300, K d 5500 • Now, we have obtained the system with no overshoot, fast rise time, and no steady-state error. Ex (cont’d): Summary P PD PI PID PID Controller Functions • Output feedback from Proportional action compare output with set-point • Eliminate steady-state offset (=error) from Integral action apply constant control even when error is zero • Anticipation From Derivative action react to rapid rate of change before errors grows too big Effect of Proportional, Integral & Derivative Gains on the Dynamic Response Proportional Controller • Pure gain (or attenuation) since: the controller input is error the controller output is a proportional gain E ( s) K p U ( s) u (t ) K p e(t ) Change in gain in P controller • Increase in gain: Upgrade both steadystate and transient responses Reduce steady-state error Reduce stability! P Controller with high gain Integral Controller • Integral of error with a constant gain increase the system type by 1 eliminate steady-state error for a unit step input amplify overshoot and oscillations t Ki E ( s) U ( s) u (t ) Ki e(t )dt s 0 Change in gain for PI controller • Increase in gain: Do not upgrade steadystate responses Increase slightly settling time Increase oscillations and overshoot! Derivative Controller • Differentiation of error with a constant gain detect rapid change in output reduce overshoot and oscillation do not affect the steady-state response de(t ) E ( s) K d s U ( s ) u (t ) K d dt Effect of change for gain PD controller • Increase in gain: Upgrade transient response Decrease the peak time and rise time Increase overshoot and settling time! Changes in gains for PID Controller