CBE 491 / CBE 433 Linearity, Windup, & PID 26 Nov 12 Process Linearity, Integral Windup, PID Controllers 1 Process Linearity Test the Heat Exchanger process linearity by: • Starting Loop Pro trainer • Set %CO to 80% • Make steps down (say 10% down) to the %CO • Measure the response CS • Calculate the process gain K 2 K = -1.09 K = -0.69 K = 0.-45 K = -0.15 K = -0.26 K = -0.33 Adaptive Control ? 3 Integral (Reset) Windup • “Windup” can occur if integral action present • Most modern controllers have anti-windup protection • If doesn’t have windup protection, set to manual when reach point of saturation, then switch back to auto, when drops below sat. level • • • • • IE: LoopPro Trainer, select Heat Exchanger Set %CO to 90%; SP to 126; Kc to 1 %/deg C; Tau I to 1.0 min Set Integral with Anti-Reset Windup ON Change Set Point to 120 deg. C. (~10 min); then change back to 126 deg. C Repeat with controller at ON: (Integral with Windup) 4 Integral (Reset) Windup 5 In-Class PID Controller Exercise Tune the Heat Exchanger for a PID Controller: • Use the built in IMC, and choose Moderately Aggressive • Start Loop Pro trainer • Tune at the initial %CO and exit temperature • Compare PI with PID • Compare PID with PID with filter 6 CBE 491 / CBE 433 Advanced control schemes 26 Nov 12 Cascade Control: Ch 9 7 Improve Feedback Control Feedback control: • Disturbance must be measured before action taken • ~ 80% of control strategies are simple FB control • Reacts to disturbances that were not expected We’ll look at: • Cascade Control (Master – Slave) • Ratio Control • Feed Forward 8 Cascade Control • • Control w/ multiple loops Used to better reject specific disturbances Rs + Es C s M (s ) Gc GP Take slow process: GP ?? Split into 2 “processes” that can measure intermediate variable? Rs + Es - Gc + A C s GC 2 GP 2 GP1 KT 2 Gp2 must be quicker responding than GP1. • Inner (2nd-dary) loop faster than primary loop • Outer loop is primary loop 9 Material Dryer Example MT % moisture sp MC steam Heat Exchger T Rs + Es Gc GV air blower %moisture GP KT C s - 10 Separate Gp into 2 blocks MT % moisture sp MC sp TC steam TT Heat Exchger air blower T Rs + Es - Gc1 + A GC 2 GV GPT GPM K TM C s K TT 11 cascade control can improve rejection of this disturbance but can not help rejection of this disturbance disturbance variable II disturbance variable I primary set point +– Primary Controller secondary set point +– Secondary Controller Final Control Element Disturbance Process II Disturbance Process I Secondary Process secondary process variable Primary ++ Process ++ primary process variable secondary process variable primary process variable 12 Problem Solving Exercise: sp Heat Exchanger Single feedback loop. Suppose known there will be steam pressure fluctuations… TC steam TT Hot water Heat Exchger T Design cascade system that measures (uses) the steam pressure in the HX shell. PT Heat Exchger steam TT Hot water T 13 Temperature Control of a Well-Mixed Reactor (CSTR) Ti Responds quicker to Ti changes than coolant temperature changes. 14 Temperature Control of a Well-Mixed Reactor (CSTR) Use Cascade Control to improve control. Ti If Tout (jacket) changes it is sensed and controlled before “seen” by primary T sensor. Secondary Loop • Measures Tout (jacket) • Faster loop • SP by output primary loop Primary Loop: • Measures controlled var. • SP by operator 15 Cascade Control Benefits: • Disturbances in secondary loop corrected by 2ndary loop controller • Flowrate loops are frequently cascaded with another control loop • Improves regulatory control, but doesn’t affect set point tracking • Can address different disturbances, as long as they impact the secondary loop before it significantly impacts the primary (outer loop). Challenges: • Secondary loop must be faster than primary loop • Bit more complex to tune • Requires additional sensor and controller 16 Distillation Columns Cascade Control Examples Objective: Regulate temperature (composition) at top and bottom of column 17 Furnace TP out Objective: Keep TP out at the set point Heat Exchanger T2 out Objective: Keep T2 out at the set point 18 In-Class Exercise: Cascade Control System Design Design a cascade system to control level (note overhead P can’t be controlled) What affects flowrate? • Valve position • Height of liquid • P (delta P across valve) 19 In-Class Exercise: Cascade Control System Design Does this design reject P changes in the overhead vapor space? 20 Tuning a Cascade System • Both controllers in manual • Secondary controller set as P-only (could be PI, but this might slow sys) • Tune secondary controller for set point tracking • Check secondary loop for satisfactory set point tracking performance • Leave secondary controller in Auto • Tune primary controller for disturbance rejection (PI or PID) • Both controllers in Auto now • Verify acceptable performance 21 In-Class Exercise: Tuning Cascade Controllers • • • • Select Jacketed Reactor Set T cooling inlet at 46 oC (normal operation temperature; sometimes it drops to 40 oC) Set output of controller at 50%. Desired Tout set point is 86 oC (this is steady state temperature) • • • • Tune the single loop PI control Criteria: IMC aggressive tuning Use doublet test with +/- 5 %CO Test your tuning with disturbance from 46 oC to 40 oC 22 In-Class Exercise: Tuning Cascade Controllers • • • • • • • • • • Select Cascade Jacketed Reactor • Set T cooling inlet at 46 oC (again) • Set output of controller (secondary) at 50%. • Desired Tout set point is 86 oC (as before) • Note the secondary outlet temperature (69 oC) is the SP of the secondary controller Tune the secondary loop; use 5 %CO doublet open loop Criteria: ITAE for set point tracking (P only) Use doublet test with +/- 5 %CO Test your tuning with 3 oC setpoint changes Tune the primary loop for PI control; make 3 oC set point changes (2nd-dary controller) Note: MV = sp signal; and PV = T out of reactor Criteria: IAE for aggressive tuning (PI) Implement and with both controllers in Auto… change disturbance from 46 to 40 oC. How does response compare to single PI feedback loop? 23 CBE 491 / CBE 433 Advanced control schemes 26 Nov 12 Ratio Control: Ch 10 24 Ratio Control •Special type of feed forward control A B • Blending/Reaction/Flocculation • A and B must be in certain ratio to each other 25 Ratio Control Possible control system: sp sp FC FY FC FT A FY FT B • What if one stream could not be controlled? • i.e., suppose stream A was “wild”; or it came from an upstream process and couldn’t be controlled. 26 Ratio Control Possible cascade control systems: “wild” stream A sp Desired Ratio B A FT A FY B A FC B FT B A “wild” stream FT This unit multiplies A by the desired ratio; so output = A B A A FY Desired Ratio BA sp B FC B FT B 27 Ratio Control Uses: • Constant ratio between feed flowrate and steam in reboiler of distillation column • Constant reflux ratio • Ratio of reactants entering reactor • Ratio for blending two streams • Flocculent addition dependent on feed stream • Purge stream ratio • Fuel/air ratio in burner • Neutralization/pH 28 In-Class Exercise: Furnace Air/Fuel Ratio • • • • Furnace Air/Fuel Ratio model disturbance: liquid flowrate “wild” stream: air flowrate ratioed stream: fuel flowrate • • • Minimum Air/Fuel Ratio 10/1 Fuel-rich undesired (enviro, econ, safety) If air fails; fuel is shut down Check TC tuning to disturbance & SP changes. Desired 2 – 5% excess O2 PV Disturbance var. TC Dependent MV Ratio set point TC output Independent MV 29 CBE 491 / CBE 433 Advanced control schemes 26 Nov 12 Feed Forward Control: Ch 11 30 Feed Forward Control steam Suppose qi is primary disturbance TC TT qi (t ) Ti (t ) Heat Exchanger ? What is a drawback to this feedback control loop? ? Is there a potentially better way? ? What if Ti changes? FF FT qi (t ) steam TT Heat Exchanger Ti (t ) FF must be done with FB control! 31 Feed Forward and Feedback Control ? FF M FF (t ) FT I M (t ) TY TC steam P TY TT qi (t ) Ti (t ) M (t ) Heat Exchanger M (t ) M (t ) M FF (t ) M FF Qi s GL K TD Block diagram: GFF FFC GFF Rs + Es - GC + M + M FF M GV GPT + + T s K TT 32 Qi s Feed Forward Control GL TD K TD GFF Rs + Es - GC + + M M FF M GV GP + + T s TP K TT qi t TD MFF Response to MFF TP No change; perfect compensation! T t 0 t 33 Qi s Feed Forward Control GD K TD FFC Rs + Es GC + Qi s + C s For “perfect” FF control: C s 0 GD K TD %TO 0 GD Qi ( s ) GM FFC K TD Qi ( s ) %TOD FFC %COFF GM + C s GD Qi ( s ) GM FFC K TD Qi ( s ) gpm M FF M FF M - Examine FFC T.F. + GM + %TO + C s %TO FFC GD K TD GM 34 Feed Forward Control: FFC Identification Set by traditional means: FFC %TOD gpm K TD GD K TD GM Model fit GD & GM to FOPDT equation: t s K D e oD GD Ds 1 t %TO gpm KD FFC KT K M D FF Gain { FFC ss } steady state FF control s K M e oM GM M s 1 %TO %CO M s 1 to toM s D e D s 1 Lead/lag unit Dead time compensator Accounts for time differences in 2 legs Often ignored; if set term to 1 t oD toM { FFC dyn } dynamic FF control 35 Feed Forward Control: FFC Identification Qi s How to determine FOPDT models GD & GM : With Gc disconnected: • Step change COFB, say 5% • Fit C(s) response to FOPDT t oM s K e GM M M s 1 %TO %CO Still in open loop: • Step change Q, say 5 gpm • Fit C(s) response to FOPDT t gpm K TD s K D e oD GD Ds 1 %TO gpm GD %TOD FFC M FF GM %COFB FFC + + C s %TO GD K TD GM KD FFC K TD K M Ld s 1 s 1 Lg m Ld lead time D Lg lag time 36 Lead/Lag or Dynamic Compensator Look at effect of these two to step change in input Ld Lg ld/ lg = 2 cff Output or response ld/ lg = 1 c(t ) ld/ lg = ½ Time Final Change from: • Magnitude of step change, • Initial response by the lead/lag, • Exponential decay from lag, Lg Ld Lg 37 Feed Forward Control Rule of Thumb: if 0.65 Ld 1.3 lead-lag won’t help much; use FFCss Lg (p 389) In text: pp 393-395, useful comments if implementing FFC + - 1. Compensates for disturbances before they affect the process 1. Requires measurement or estimation of the disturbance 2. Can improve the reliability of the feedback controller by reducing the deviation from set point 2. Does not compensate for unmeasured disturbances 3. Offers advantages for slow processes or processes with large deadtime. 3. Linear based correction; only as good as the models; performance decreases with nonlinear processes. No improvement using FFC with set point changes. 38 In-Class PS Exercise: Feed Forward Control What is the Gm, and what is the GD? Determine FCC Tune PI controller to aggressive IMC For disturbance: Tjacket in 50oC – 60oC – 50oC • Test PI Controller • Test PI + FFCss only • Test PI + FFC full 39 In-Class PS Exercise: Feed Forward Control PI only PI + FFCss only PI + full FFC 40 CBE 491 / CBE 433 41 Problem Solving Exercise: Heat Exchanger sp TC PC PT steam TT Hot water Heat Exchger T Draw the block diagram: what is the primary and what is the secondary loop? Rs + Es - GcT + GC P GV GPP Ps GPT T s K TP K TT 42