ECONOMIC PLANTWIDE CONTROL: Control structure design for complete processing plants Sigurd Skogestad Department of Chemical Engineering Norwegian University of Science and Tecnology (NTNU) Trondheim, Norway Shiraz, Jan. 2013 1 Sigurd Skogestad • • • • • • 1955: Born in Flekkefjord, Norway 1978: MS (Siv.ing.) in chemical engineering at NTNU 1979-1983: Worked at Norsk Hydro co. (process simulation) 1987: PhD from Caltech (supervisor: Manfred Morari) 1987-present: Professor of chemical engineering at NTNU 1999-2009: Head of Department • • 160 journal publications Book: Multivariable Feedback Control (Wiley 1996; 2005) – – – – – 3 1989: Ted Peterson Best Paper Award by the CAST division of AIChE 1990: George S. Axelby Outstanding Paper Award by the Control System Society of IEEE 1992: O. Hugo Schuck Best Paper Award by the American Automatic Control Council 2006: Best paper award for paper published in 2004 in Computers and chemical engineering. 2011: Process Automation Hall of Fame (US) Trondheim, Norway Teheran 4 Arctic circle North Sea Trondheim NORWAY SWEDEN Oslo DENMARK GERMANY UK 5 NTNU, Trondheim 6 Outline 1. Introduction plantwide control (control structure design) 2. Plantwide control procedure I Top Down – – – – Step 1: Define optimal operation Step 2: Optimize for expected disturbances Step 3: Select primary controlled variables c=y1 (CVs) Step 4: Where set the production rate? (Inventory control) II Bottom Up – Step 5: Regulatory / stabilizing control (PID layer) • What more to control (y2)? • Pairing of inputs and outputs – Step 6: Supervisory control (MPC layer) – Step 7: Real-time optimization (Do we need it?) 7 y1 y2 MVs Process How we design a control system for a complete chemical plant? • • • • 11 Where do we start? What should we control? and why? etc. etc. Example: Tennessee Eastman challenge problem (Downs, 1991) 12 Where place TC PC LC AC x SRC ?? • Alan Foss (“Critique of chemical process control theory”, AIChE Journal,1973): The central issue to be resolved ... is the determination of control system structure. Which variables should be measured, which inputs should be manipulated and which links should be made between the two sets? There is more than a suspicion that the work of a genius is needed here, for without it the control configuration problem will likely remain in a primitive, hazily stated and wholly unmanageable form. The gap is present indeed, but contrary to the views of many, it is the theoretician who must close it. Previous work on plantwide control: 13 •Page Buckley (1964) - Chapter on “Overall process control” (still industrial practice) •Greg Shinskey (1967) – process control systems •Alan Foss (1973) - control system structure •Bill Luyben et al. (1975- ) – case studies ; “snowball effect” •George Stephanopoulos and Manfred Morari (1980) – synthesis of control structures for chemical processes •Ruel Shinnar (1981- ) - “dominant variables” •Jim Downs (1991) - Tennessee Eastman challenge problem •Larsson and Skogestad (2000): Review of plantwide control Theory: Optimal operation Objectives Present state Model of system Theory: CENTRALIZED OPTIMIZER •Model of overall system •Estimate present state •Optimize all degrees of freedom Problems: • Model not available • Optimization complex • Not robust (difficult to handle uncertainty) • Slow response time Process control: • Excellent candidate for centralized control 15 (Physical) Degrees of freedom Practice: Process control Practice: • Hierarchical structure 17 Process control: Hierarchical structure Director Process engineer Operator Logic / selectors / operator PID control 18 u = valves Dealing with complexity Plantwide control: Objectives The controlled variables (CVs) interconnect the layers OBJECTIVE Min J (economics) RTO cs = y1s MPC other variables) y2s PID 19 Follow path (+ look after Stabilize + avoid drift u (valves) Translate optimal operation into simple control objectives: What should we control? y1 = c ? (economics) y2 = ? (stabilization) 20 Control structure design procedure I Top Down • Step 1: Define operational objectives (optimal operation) – Cost function J (to be minimized) – Operational constraints • Step 2: Identify degrees of freedom (MVs) and optimize for expected disturbances • Step 3: Select primary controlled variables c=y1 (CVs) • Step 4: Where set the production rate? (Inventory control) II Bottom Up • Step 5: Regulatory / stabilizing control (PID layer) – What more to control (y2; local CVs)? – Pairing of inputs and outputs • Step 6: Supervisory control (MPC layer) • Step 7: Real-time optimization (Do we need it?) 22 y1 y2 MVs Process Step 1. Define optimal operation (economics) • • What are we going to use our degrees of freedom u (MVs) for? Define scalar cost function J(u,x,d) – u: degrees of freedom (usually steady-state) – d: disturbances – x: states (internal variables) Typical cost function: J = cost feed + cost energy – value products • Optimize operation with respect to u for given d (usually steady-state): minu J(u,x,d) subject to: Model equations: Operational constraints: 23 f(u,x,d) = 0 g(u,x,d) < 0 Step 2. Optimize • Identify degrees of freedom (u) • Optimize for expected disturbances (d) – Identify regions of active constraints • Need model of system • Time consuming, but it is offline 24 Step 3: Implementation of optimal operation • Optimal operation for given d*: minu J(u,x,d) subject to: Model equations: Operational constraints: → uopt(d*) f(u,x,d) = 0 g(u,x,d) < 0 Problem: Usally cannot keep uopt constant because disturbances d change How should we adjust the degrees of freedom (u)? 25 Implementation (in practice): Local feedback control! y “Self-optimizing control:” Constant setpoints for c gives acceptable loss Main issue: What should we control? d 26 Local feedback: Control c (CV) Optimizing control Feedforward Optimal operation - Runner Example: Optimal operation of runner – Cost to be minimized, J=T – One degree of freedom (u=power) – What should we control? 27 Optimal operation - Runner Sprinter (100m) • 1. Optimal operation of Sprinter, J=T – Active constraint control: • Maximum speed (”no thinking required”) 28 Optimal operation - Runner Marathon (40 km) • 2. Optimal operation of Marathon runner, J=T – Unconstrained optimum! – Any ”self-optimizing” variable c (to control at constant setpoint)? • • • • 29 c1 = distance to leader of race c2 = speed c3 = heart rate c4 = level of lactate in muscles Optimal operation - Runner Conclusion Marathon runner select one measurement c = heart rate 30 • Simple and robust implementation • Disturbances are indirectly handled by keeping a constant heart rate • May have infrequent adjustment of setpoint (heart rate) Further examples • • • Central bank. J = welfare. c=inflation rate (2.5%) Cake baking. J = nice taste, c = Temperature (200C) Business, J = profit. c = ”Key performance indicator (KPI), e.g. – Response time to order – Energy consumption pr. kg or unit – Number of employees – Research spending Optimal values obtained by ”benchmarking” • • Investment (portofolio management). J = profit. c = Fraction of investment in shares (50%) Biological systems: – – 31 ”Self-optimizing” controlled variables c have been found by natural selection Need to do ”reverse engineering” : • Find the controlled variables used in nature • From this identify what overall objective J the biological system has been attempting to optimize Step 3. What should we control (c)? (primary controlled variables y1=c) Selection of controlled variables c 1. Control active constraints! 2. Unconstrained variables: Control self-optimizing variables! 32 Example /QUIZ 1 Operation of Distillation columns in series With given F (disturbance): 4 steady-state DOFs (e.g., L and V in each column) N=41 αAB=1.33 F ~ 1.2mol/s pF=1 $/mol > 95% A pD1=1 $/mol = 4 mol/s < => 95% B N=41 αBC=1. 5 pD2=2 $/mol <=2.4 mol/s > 95% C pB2=1 $/mol Cost (J) = - Profit = pF F + pV(V1+V2) – pD1D1 – pD2D2 – pB2B2 Energy price: pV=0-0.2 $/mol (varies) 33 DOF = Degree Of Freedom Ref.: M.G. Jacobsen and S. Skogestad (2011) QUIZ: What are the expected active constraints? 1. Always. 2. For low energy prices. QUIZ 2 Control of Distillation columns in series PC PC LC LC Given LC 34 Red: Basic regulatory loops LC QUIZ. Assume low energy prices (pV=0.01 $/mol). How should we control the columns? HINT: CONTROL ACTIVE CONSTRAINTS SOLUTION QUIZ 2 Control of Distillation columns in series PC PC LC LC xB UNCONSTRAINED CV=? CC Given MAX V1 LC 35 Red: Basic regulatory loops MAX V2 LC xBS=95% SOLUTION QUIZ 1 (more details) Active constraint regions for two distillation columns in series Energy price [$/mol] BOTTLENECK Higher F infeasible because all 5 constraints reached [mol/s] 36 CV = Controlled Variable Unconstrained degrees of freedom Control “self-optimizing” variables • Old idea (Morari et al., 1980): “We want to find a function c of the process variables which when held constant, leads automatically to the optimal adjustments of the manipulated variables, and with it, the optimal operating conditions.” • The ideal self-optimizing variable c is the gradient (c = J/ u = Ju) – Keep gradient at zero for all disturbances (c = Ju=0) – Problem: no measurement of gradient cost J Ju 37 Ju=0 u H Ideal: c = Ju In practise: c = H y. Task: Determine H! 38 Systematic approach: What to control? • Define optimal operation: Minimize cost function J • Each candidate c = Hy: ”Brute force approach”: With constant setpoints cs compute loss L for expected disturbances d and implementation errors n • Select variable c with smallest loss Acceptable loss ) self-optimizing control 39 Control of Distillation columns in series PC PC LC LC xB xB CC CC xAS=2.1% Given MAX V1 LC MAX V2 LC Cost (J) = - Profit = pF F + pV(V1+V2) – pD1D1 – pD2D2 – pB2B2 40 Red: Basic regulatory loops xBS=95% Unconstrained optimum Optimal operation Cost J Jopt copt 42 Controlled variable c Unconstrained optimum Optimal operation d Cost J Jopt n copt 43 Controlled variable c Two problems: • 1. Optimum moves because of disturbances d: copt(d) • 2. Implementation error, c = copt + n Good candidate controlled variables c (for self-optimizing control) 1. The optimal value of c should be insensitive to disturbances • Small Fc = dcopt/dd 2. c should be easy to measure and control 3. Want “flat” optimum -> The value of c should be sensitive to changes in the degrees of freedom (“large gain”) • Large G = dc/du = HGy Good 44 Good BAD Optimal measurement combination •Candidate measurements (y): Include also inputs u H 47 Optimal measurement combination: Nullspace method • Want optimal value of c independent of disturbances ) Δcopt = 0 ∙Δ d • Find optimal solution as a function of d: uopt(d), yopt(d) • Linearize this relationship: Δyopt = F ∙Δd • F – optimal sensitivity matrix • Want: • To achieve this for all values of Δd (Nullspace method): • Always possible if • Comment: Nullspace method is equivalent to Ju=0 48 Example. Nullspace Method for Marathon runner u = power, d = slope [degrees] y1 = hr [beat/min], y2 = v [m/s] F = dyopt/dd = [0.25 -0.2]’ H = [h1 h2]] HF = 0 -> h1 f1 + h2 f2 = 0.25 h1 – 0.2 h2 = 0 Choose h1 = 1 -> h2 = 0.25/0.2 = 1.25 Conclusion: c = hr + 1.25 v Control c = constant -> hr increases when v decreases (OK uphill!) 49 With measurement noise Optimal measurement combination, c = Hy n d y' ' Wd cs = constant + - K u Gdy Wn + Gy + c + y + H “=0” in nullspace method (no noise) “Minimize” in Maximum gain rule ( maximize S1 G Juu-1/2 , G=HGy ) 50 “Scaling” S1 Example: CO2 refrigeration cycle J = Ws (work supplied) DOF = u (valve opening, z) Main disturbances: d 1 = TH d2 = TCs (setpoint) d3 = UAloss What should we control? 51 pH CO2 refrigeration cycle Step 1. One (remaining) degree of freedom (u=z) Step 2. Objective function. J = Ws (compressor work) Step 3. Optimize operation for disturbances (d1=TC, d2=TH, d3=UA) • Optimum always unconstrained Step 4. Implementation of optimal operation • No good single measurements (all give large losses): – ph, Th, z, … • Nullspace method: Need to combine nu+nd=1+3=4 measurements to have zero disturbance loss • Simpler: Try combining two measurements. Exact local method: – c = h1 ph + h2 Th = ph + k Th; k = -8.53 bar/K • Nonlinear evaluation of loss: OK! 52 Refrigeration cycle: Proposed control structure 54 Control c= “temperature-corrected high pressure”. k = -8.5 bar/K Case study Control structure design using self-optimizing control for economically optimal CO2 recovery* Step S1. Objective function= J = energy cost + cost (tax) of released CO2 to air 4 equality and 2 inequality constraints: 1. stripper top pressure 2. condenser temperature 3. pump pressure of recycle amine 4. cooler temperature 5. CO2 recovery ≥ 80% 6. Reboiler duty < 1393 kW (nominal +20%) Step S2. (a) 10 degrees of freedom: 8 valves + 2 pumps 4 levels without steady state effect: absorber 1,stripper 2,make up tank 1 Disturbances: flue gas flowrate, CO2 composition in flue gas + active constraints (b) Optimization using Unisim steady-state simulator. Region I (nominal feedrate): No inequality constraints active 2 unconstrained degrees of freedom =10-4-4 Step S3 (Identify CVs). 1. Control the 4 equality constraints 2. Identify 2 self-optimizing CVs. Use Exact Local method and select CV set with minimum loss. 55 *M. Panahi and S. Skogestad, ``Economically efficient operation of CO2 capturing process, part I: Self-optimizing procedure for selecting the best controlled variables'', Chemical Engineering and Processing, 50, 247-253 (2011). Proposed control structure with given feed 56 Step 4. Where set production rate? • Where locale the TPM (throughput manipulator)? – The ”gas pedal” of the process • • • • 57 Very important! Determines structure of remaining inventory (level) control system Set production rate at (dynamic) bottleneck Link between Top-down and Bottom-up parts Production rate set at inlet : Inventory control in direction of flow* TPM * Required to get “local-consistent” inventory controlC 58 Production rate set at outlet: Inventory control opposite flow TPM 59 Production rate set inside process TPM Radiating inventory control around TPM (Georgakis et al.) 60 “Sellers marked” = high product prices: Optimal operation = max. throughput (active constraint) Want tight bottleneck control to reduce backoff! Back-off = Lost production Time 61 Rule for control of hard output constraints: “Squeeze and shift”! Reduce variance (“Squeeze”) and “shift” setpoint cs to reduce backoff LOCATE TPM? • Conventional choice: Feedrate • Consider moving if there is an important active constraint that could otherwise not be well controlled • Good choice: Locate at bottleneck 62 Step 5. Regulatory control layer • Purpose: “Stabilize” the plant using a simple control configuration (usually: local SISO PID controllers + simple cascades) • Enable manual operation (by operators) • Main structural decisions: • What more should we control? (secondary CV’s, y2, use of extra measurements) • Pairing with manipulated variables (MV’s u2) y1 = c y2 = ? 63 “Control CV2s that stabilizes the plant (stops drifting)” In practice, control: 1. Levels (inventory liquid) 2. Pressures (inventory gas/vapor) (note: some pressures may be left floating) 3. Inventories of components that may accumulate/deplete inside plant • E.g., amount of amine/water (deplete) in recycle loop in CO2 capture plant • E.g., amount of butanol (accumulates) in methanol-water distillation column • E.g., amount of inert N2 (accumulates) in ammonia reactor recycle 4. Reactor temperature 5. Distillation column profile (one temperature inside column) • Stripper/absorber profile does not generally need to be stabilized 64 Main objectives control system 1. Implementation of acceptable (near-optimal) operation 2. Stabilization ARE THESE OBJECTIVES CONFLICTING? • Usually NOT – Different time scales • – Stabilization doesn’t “use up” any degrees of freedom • • 66 Stabilization fast time scale Reference value (setpoint) available for layer above But it “uses up” part of the time window (frequency range) Example: Exothermic reactor (unstable) Active constraints (economics): Product composition c + level (max) • u = cooling flow (q) • y1 = composition (c) • y2 = temperature (T) feed y1s CC y2s TC y1=c LC y2=T u 67 Ls=max product cooling ”Advanced control” STEP 6. SUPERVISORY LAYER Objectives of supervisory layer: 1. Switch control structures (CV1) depending on operating region • • Active constraints self-optimizing variables 2. Perform “advanced” economic/coordination control tasks. – Control primary variables CV1 at setpoint using as degrees of freedom (MV): • • – Keep an eye on stabilizing layer • – 70 Avoid saturation in stabilizing layer Feedforward from disturbances • – – Setpoints to the regulatory layer (CV2s) ”unused” degrees of freedom (valves) If helpful Make use of extra inputs Make use of extra measurements Implementation: • Alternative 1: Advanced control based on ”simple elements” • Alternative 2: MPC Why simplified configurations? Why control layers? Why not one “big” multivariable controller? • Fundamental: Save on modelling effort • Other: – – – – – – 71 easy to understand easy to tune and retune insensitive to model uncertainty possible to design for failure tolerance fewer links reduced computation load Summary. Systematic procedure for plantwide control • Start “top-down” with economics: – – – – – Step 1: Define operational objectives and identify degrees of freeedom Step 2: Optimize steady-state operation. Step 3A: Identify active constraints = primary CVs c. Step 3B: Remaining unconstrained DOFs: Self-optimizing CVs c. Step 4: Where to set the throughput (usually: feed) cs • Regulatory control I: Decide on how to move mass through the plant: • • Regulatory control II: “Bottom-up” stabilization of the plant • • Step 5A: Propose “local-consistent” inventory (level) control structure. Step 5B: Control variables to stop “drift” (sensitive temperatures, pressures, ....) – Pair variables to avoid interaction and saturation Finally: make link between “top-down” and “bottom up”. • Step 6: “Advanced/supervisory control” system (MPC): • • • • CVs: Active constraints and self-optimizing economic variables + look after variables in layer below (e.g., avoid saturation) MVs: Setpoints to regulatory control layer. Coordinates within units and possibly between units http://www.nt.ntnu.no/users/skoge/plantwide 72 Summary and references • The following paper summarizes the procedure: – S. Skogestad, ``Control structure design for complete chemical plants'', Computers and Chemical Engineering, 28 (1-2), 219-234 (2004). • There are many approaches to plantwide control as discussed in the following review paper: – T. Larsson and S. Skogestad, ``Plantwide control: A review and a new design procedure'' Modeling, Identification and Control, 21, 209-240 (2000). • The following paper updates the procedure: – S. Skogestad, ``Economic plantwide control’’, Book chapter in V. Kariwala and V.P. Rangaiah (Eds), Plant-Wide Control: Recent Developments and Applications”, Wiley (2012). • More information: http://www.nt.ntnu.no/users/skoge/plantwide 73 • • • • • • • • • • • • • • • • • • • • • • • 74 • • S. Skogestad ``Plantwide control: the search for the self-optimizing control structure'', J. Proc. Control, 10, 487-507 (2000). S. Skogestad, ``Self-optimizing control: the missing link between steady-state optimization and control'', Comp.Chem.Engng., 24, 569575 (2000). I.J. Halvorsen, M. Serra and S. Skogestad, ``Evaluation of self-optimising control structures for an integrated Petlyuk distillation column'', Hung. J. of Ind.Chem., 28, 11-15 (2000). T. Larsson, K. Hestetun, E. Hovland, and S. Skogestad, ``Self-Optimizing Control of a Large-Scale Plant: The Tennessee Eastman Process'', Ind. Eng. Chem. Res., 40 (22), 4889-4901 (2001). K.L. Wu, C.C. Yu, W.L. Luyben and S. Skogestad, ``Reactor/separator processes with recycles-2. Design for composition control'', Comp. Chem. Engng., 27 (3), 401-421 (2003). T. Larsson, M.S. Govatsmark, S. Skogestad, and C.C. Yu, ``Control structure selection for reactor, separator and recycle processes'', Ind. Eng. Chem. Res., 42 (6), 1225-1234 (2003). A. Faanes and S. Skogestad, ``Buffer Tank Design for Acceptable Control Performance'', Ind. Eng. Chem. Res., 42 (10), 2198-2208 (2003). I.J. Halvorsen, S. Skogestad, J.C. Morud and V. Alstad, ``Optimal selection of controlled variables'', Ind. Eng. Chem. Res., 42 (14), 3273-3284 (2003). A. Faanes and S. Skogestad, ``pH-neutralization: integrated process and control design'', Computers and Chemical Engineering, 28 (8), 1475-1487 (2004). S. Skogestad, ``Near-optimal operation by self-optimizing control: From process control to marathon running and business systems'', Computers and Chemical Engineering, 29 (1), 127-137 (2004). E.S. Hori, S. Skogestad and V. Alstad, ``Perfect steady-state indirect control'', Ind.Eng.Chem.Res, 44 (4), 863-867 (2005). M.S. Govatsmark and S. Skogestad, ``Selection of controlled variables and robust setpoints'', Ind.Eng.Chem.Res, 44 (7), 2207-2217 (2005). V. Alstad and S. Skogestad, ``Null Space Method for Selecting Optimal Measurement Combinations as Controlled Variables'', Ind.Eng.Chem.Res, 46 (3), 846-853 (2007). S. Skogestad, ``The dos and don'ts of distillation columns control'', Chemical Engineering Research and Design (Trans IChemE, Part A), 85 (A1), 13-23 (2007). E.S. Hori and S. Skogestad, ``Selection of control structure and temperature location for two-product distillation columns'', Chemical Engineering Research and Design (Trans IChemE, Part A), 85 (A3), 293-306 (2007). A.C.B. Araujo, M. Govatsmark and S. Skogestad, ``Application of plantwide control to the HDA process. I Steady-state and selfoptimizing control'', Control Engineering Practice, 15, 1222-1237 (2007). A.C.B. Araujo, E.S. Hori and S. Skogestad, ``Application of plantwide control to the HDA process. Part II Regulatory control'', Ind.Eng.Chem.Res, 46 (15), 5159-5174 (2007). V. Kariwala, S. Skogestad and J.F. Forbes, ``Reply to ``Further Theoretical results on Relative Gain Array for Norn-Bounded Uncertain systems'''' Ind.Eng.Chem.Res, 46 (24), 8290 (2007). V. Lersbamrungsuk, T. Srinophakun, S. Narasimhan and S. Skogestad, ``Control structure design for optimal operation of heat exchanger networks'', AIChE J., 54 (1), 150-162 (2008). DOI 10.1002/aic.11366 T. Lid and S. Skogestad, ``Scaled steady state models for effective on-line applications'', Computers and Chemical Engineering, 32, 990-999 (2008). T. Lid and S. Skogestad, ``Data reconciliation and optimal operation of a catalytic naphtha reformer'', Journal of Process Control, 18, 320-331 (2008). E.M.B. Aske, S. Strand and S. Skogestad, ``Coordinator MPC for maximizing plant throughput'', Computers and Chemical Engineering, 32, 195-204 (2008). A. Araujo and S. Skogestad, ``Control structure design for the ammonia synthesis process'', Computers and Chemical Engineering, 32 (12), 2920-2932 (2008). E.S. Hori and S. Skogestad, ``Selection of controlled variables: Maximum gain rule and combination of measurements'', Ind.Eng.Chem.Res, 47 (23), 9465-9471 (2008). V. Alstad, S. Skogestad and E.S. Hori, ``Optimal measurement combinations as controlled variables'', Journal of Process Control, 19, 138-148 (2009) E.M.B. Aske and S. Skogestad, ``Consistent inventory control'', Ind.Eng.Chem.Res, 48 (44), 10892-10902 (2009).