ChE 6303 Advanced Process Control Teacher: Dr. M. A. A. Shoukat Choudhury, Email: shoukat@buet.ac.bd Syllabus: 1. SISO control systems: Review of the concepts of process dynamics and control, process models, Laplace transform, transfer functions, Poles and zeros,state-space models, feedback controllers, controller design direct synthesis and IMC rules, controller tuning, Concept of stability, feedforward and ratio control, cascade control, time delay compensation,inferential control, adaptive control, selective control/override systems 2. MIMO control systems: Control loop interactions, RGA analysis,, pairing control loops, decoupler design
ChE 6303 Advanced Process Control 3. Process Monitoring: Traditional process monitoring, multivariate statistical monitoring 4. Process Faults: Control valve problems, Valve stiction, data-based methods for detection of valve problems 5. Troubleshooting Plantwide Oscillations Marks Distribution: 1. Assignments 20% 2. Project 30% 3. Final exam 50%
Process Dynamics and Control Concepts of Process Dynamics and Control: - Dynamics is concerned with the transient state ( steady state too) behaviour of the process. - Control is concerned with the manipulation of process behaviour - make processes operate closer to the operating conditions - regulate the process well in the presence of disturbances
Why study process dynamics and control - Increased emphasis on efficient plant operation - Continued impact of energy conservation measures (Energy integration) - Tighter integration of plant design (Mass integration) - Emphasis on increased plant/human safety - Stringer environmental regulations so on..
Process Dynamics where and why? - Refers to unsteady-state or transient behavior. - ChE curriculum emphasizes steady-state or equilibrium situations: Examples: ChE 111, 201, 303, 205 - Continuous processes: Examples of transient behavior: i. Start up & shutdown ii. Polymer grade changes iii. Disturbances, especially major disturbances, e.g., refinery during stormy or hurricane conditions, seasonal variation iv. Equipment or instrument failure (e.g., pump failure) v. Process degradation, catalyst poisoning, heat exchanger fouling
Process Dynamics (cont d) - Batch processes i. Inherently unsteady-state operation ii. Example: Batch reactor 1. Composition changes with time 2. Other variables such as temperature could be constant.
Process Control - Ubiquitous, everywhere in life - starting from very basic household equipments to large chemical processes - Household equipments: Refrigerators, ACs, TVs - Large scale, continuous processes: i. Oil refinery, ethylene plant, pulp mill. Typically, several thousands process variables are measured. Examples: flow rate, T, P, liquid level, composition ii. To control the process variables, one needs Question: manipulated How do variables we control such as feed rate, cooling rate, processes? product flow rate We will consider an illustrative example
Process Control Question: How do we control a process or a variable?
Illustrative Example A Blending system Notation: w 1, w 2 and w are mass flow rates x 1, x 2 and x are mass fractions of component A
A Blending System (cont d) Assumptions: 1. w 1 is constant 2. x 2 = constant = 1 (stream 2 is pure A) 3. Perfect mixing in the tank Control Objective: Keep x at a desired value (or set point ) x sp, despite variations in x 1 (t). Flow rate w 2 can be adjusted for this purpose. Terminology: Controlled variable (or output variable ): x Manipulated variable (or input variable ): w 2 Disturbance variable (or load variable ): x 1
A Blending System (cont d) Design Question. What value of w 2 is required to have x = x SP? Overall balance: 0 = w + w w (1-1) Component A balance: 1 2 wx 1 1+ w2x2 wx= 0 (1-2) (The overbars denote nominal steady-state design values.) At the design conditions, x = x SP. Substitute Eq. 1-2, x = xsp and x 2 = 1, then solve Eq. 1-2 for w2 : xsp x1 w2 = w1 (1-3) x 1 SP
A Blending System (cont d) Equation 1-3 is the design equation for the blending system. If our assumptions are correct, then this value of w 2 will keep at. But what if conditions change? x SP x Control Question. Suppose that the inlet concentration x 1 changes with time. How can we ensure that x remains at or near the set point x SP? As a specific example, if x x and w = w, then x > x SP. 1 > 1 2 2 Some Possible Control Strategies: Method 1. Measure x and adjust w 2. Intuitively, if x is too high, we should reduce w 2 ;
A Blending System (cont d) Manual control vs. automatic control Proportional feedback control law, () = - + = () w2 t w2 Kc xsp x t (1-4) 1. where K c is called the controller gain. 2. w 2 (t) and x(t) denote variables that change with time t. 3. The change in the flow rate, w 2 t w 2, is proportional to the deviation from the set point, x SP x(t). ()
How to implement the feedback?
Method 2 - Feedforward Method 2. Measure x 1 and adjust w 2. Thus, if x 1 is greater than x 1, we would decrease w 2 so that w < w 2 2 ; One approach: Consider Eq. (1-3) and replace x1 and w2 with x 1 (t) and w 2 (t) to get a control law: xsp x t w2() t = w1 (1-5) 1 x 1 () SP
Method 2 Feedforward (cont d) Because Eq. (1-3) applies only at steady state, it is not clear how effective the control law in (1-5) will be for transient conditions.
Other methods Method 3. Measure x 1 and x, adjust w 2. This approach is a combination of Methods 1 and 2. Method 4. Use a larger tank. If a larger tank is used, fluctuations in x 1 will tend to be damped out due to the larger capacitance of the tank contents. However, a larger tank means an increased capital cost.
Control Strategies Table. 1.1 Control Strategies for the Blending System Method Measured Variable Manipulated Variable Category 1 x w 2 FB 2 x 1 w 2 FF 3 x 1 and x w 2 FF/FB 4 - - Design change
Feedback Control Distinguishing feature: measure the controlled variable Advantages: Corrective action is taken regardless of the source of the disturbance. Reduces sensitivity of the controlled variable to disturbances and changes in the process (shown later). Disadvantages: No corrective action occurs until after the disturbance has upset the process, that is, until after x differs from x sp. Very oscillatory responses, or even instability.
Feedforward Control Features Distinguishing feature: measure a disturbance variable Advantage: Correct for disturbance before it upsets the process. Disadvantage: Must be able to measure the disturbance. No corrective action for unmeasured disturbances.
Hierarchy of process control activities ( days-months ) 5. Planning and Scheduling ( hours-days ) 4. Real-Time Optimization Figure 1.7 Hierarchy of process control activities. ( minutes-hours ) ( seconds-minutes ) 3b. Multivariable and Constraint Control 3a. Regulatory Control (< 1 second ) 2. Safety, Environment and Equipment Protection (< 1 second ) 1. Measurement and Actuation Process
Major Steps in control system development Figure 1.9 Major steps in control system development
MODELS MODELS
What are Models? A model is a mathematical abstraction of a process A model can be formulated on the basis of a physio-chemical or a mechanistic knowledge of the process A model can capture the transient and/or steady state of the process Steady state is a special case of transient states Inputs Process Outputs Mathematically, Input Space U (.) G (. ) Output Space Y (.)
Type of Models 1. Unsteady vs. Steady state models 2. First principle vs. empirical models/black-box models 3. Semi-empirical/gray box models Advantages and Disadvantages of these models Example: Model for a simple cylindrical tank - mass balance - linearization (if necessary) - deviation variable - time constant equivalent to residence time - gain of the process
General Modeling Principles The model equations are at best an approximation to the real process. Adage: All models are wrong, but some are useful. Modeling inherently involves a compromise between model accuracy and complexity on one hand, and the cost and effort required to develop the model, on the other hand. Process modeling is both an art and a science. Creativity is required to make simplifying assumptions that result in an appropriate model. Dynamic models of chemical processes consist of ordinary differential equations (ODE) and/or partial differential equations (PDE), plus related algebraic equations.
Developing Dynamic Models A Systematic Approach for Developing Dynamic Models 1. State the modeling objectives and the end use of the model. They determine the required levels of model detail and model accuracy. 2. Draw a schematic diagram of the process and label all process variables. 3. List all of the assumptions that are involved in developing the model. Try for parsimony; the model should be no more complicated than necessary to meet the modeling objectives. 4. Determine whether spatial variations of process variables are important. If so, a partial differential equation model will be required. 5. Write appropriate conservation equations (mass, component, energy, and so forth).
Developing Dynamic Models (cont d) 6. Introduce equilibrium relations and other algebraic equations (from thermodynamics, transport phenomena, chemical kinetics, equipment geometry, etc.). 7. Perform a degrees of freedom analysis (Section 2.3) to ensure that the model equations can be solved. 8. Simplify the model. It is often possible to arrange the equations so that the dependent variables (outputs) appear on the left side and the independent variables (inputs) appear on the right side. This model form is convenient for computer simulation and subsequent analysis. 9. Classify inputs as disturbance variables or as manipulated variables.
Degrees of Freedom Analysis 1. List all quantities in the model that are known constants (or parameters that can be specified) on the basis of equipment dimensions, known physical properties, etc. 2. Determine the number of equations N E and the number of process variables, N V. Note that time t is not considered to be a process variable because it is neither a process input nor a process output. 3. Calculate the number of degrees of freedom, N F = N V - N E. 4. Identify the N E output variables that will be obtained by solving the process model. 5. Identify the N F input variables that must be specified as either disturbance variables or manipulated variables, in order to utilize the N F degrees of freedom.
Conservation Laws Theoretical models of chemical processes are based on conservation laws. Conservation of Mass rate of mass rate of mass rate of mass = accumulation in out (2-6) Conservation of Component i rate of component i rate of component i = accumulation in rate of component i rate of component i + out produced (2-7)
Conservation of Energy The general law of energy conservation is also called the First Law of Thermodynamics. It can be expressed as: rate of energy rate of energy in rate of energy out = accumulation by convection by convection net rate of heat addition + to the system from + the surroundings net rate of work performed on the system (2-8) by the surroundings The total energy of a thermodynamic system, U tot, is the sum of its internal energy, kinetic energy, and potential energy: Utot = Uint + UKE + UPE (2-9)
Conservation of Energy For the processes and examples considered in this course, it is appropriate to make two assumptions: 1. Changes in potential energy and kinetic energy can be neglected because they are small in comparison with changes in internal energy. 2. The net rate of work can be neglected because it is small compared to the rates of heat transfer and convection. For these reasonable assumptions, the energy balance in Eq. 2-8 can be written as U int ) H w = Q = the internal energy of the system = enthalpy per unit mass = mass flow rate du ) int = ( wh ) + Q dt (2-10) rate of heat transfer to the system ( ) = denotes the difference between outlet and inlet conditions of the flowing streams; therefore ) - wh = rate of enthalpy of the inlet stream(s) - the enthalpy of the outlet stream(s)
Development of Dynamic Models An Example An unsteady-state mass balance for the blending system: rate of accumulation rate of rate of = of mass in the tank mass in mass out (2-1)
Example (cont d) or ( ρ) d V dt = w + w w 1 2 where w 1, w 2, and w are mass flow rates. The unsteady-state component balance is: (2-2) ( ρ ) d V x dt = wx + w x wx 1 1 2 2 (2-3) The corresponding steady-state model was derived in Ch. 1 (cf. Eqs. 1-1 and 1-2). 0 = w + w w (2-4) 1 2 0 = wx + w x wx (2-5) 1 1 2 2
Example (cont d) For constant, Eqs. 2-2 and 2-3 become: ρ dv ρ = w1+ w2 w (2-12) dt ρd( Vx) = wx 1 1+ w2x2 wx (2-13) dt Equation 2-13 can be simplified by expanding the accumulation term using the chain rule for differentiation of a product:
Example (cont d) ( ) d Vx dx dv ρ = ρv + ρx dt dt dt Substitution of (2-14) into (2-13) gives: (2-14) dx dv ρv + ρx = w1x1+ w2x2 wx (2-15) dt dt Substitution of the mass balance in (2-12) for ρdv/ dt in (2-15) gives: dx ρ V + x( w1+ w2 w) = w1x1+ w2x2 wx (2-16) dt After canceling common terms and rearranging (2-12) and (2-16), a more convenient model form is obtained: dv 1 = ( w1+ w2 w) (2-17) dt ρ dx w1 w = 2 1 + 2 dt V ρ V ρ ( x x) ( x x) (2-18)
Continuous Stirred Tank Reactor (CSTR) Fig. 2.6. Schematic diagram of a CSTR.
CSTR: Model Development Assumptions: 1. Single, irreversible reaction, A B. 2. Perfect mixing. 3. The liquid volume V is kept constant by an overflow line. 4. The mass densities of the feed and product streams are equal and constant. They are denoted by ρ. 5. Heat losses are negligible. 6. The reaction rate for the disappearance of A, r, is given by, r = kc (2-62) [ ] A where r = moles of A reacted per unit time, per unit volume, ca is the concentration of A (moles per unit volume), and k is the rate constant (units of reciprocal time). 7. The rate constant has an Arrhenius temperature dependence: k=k0 exp(- E/RT ) (2-63) where k is the frequency factor, E is the activation energy, 0 and R is the the gas constant.
CSTR: Model Development (cont d) 8. 9. 10. 11. 12.
CSTR: Model Development (cont d) Unsteady-state mass balance Because ρ and V are constant,. Thus, the mass balance is not required. Unsteady-state component balance.
CSTR Model: Some Extensions How would the dynamic model change for: 1. Multiple reactions (e.g., A B C)? 2. Different kinetics, e.g., 2 nd order reaction? 3. Significant thermal capacity of the coolant liquid? 4. Liquid volume V is not constant (e.g., no overflow line)? 5. Heat losses are not negligible? 6. Perfect mixing cannot be assumed (e.g., for a very viscous liquid)?
LAPLACE TRANSOFRM A Review LAPLACE TRANSOFRM - Review
Pierre Simon Laplace Pierre Simon Laplace Born: 23 March 1749 in Beaumont-en-Auge, Normandy, France Died: 5 March 1827 in Paris, France
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first. Laplace transforms play a key role in important process control concepts and techniques. -Examples: Transfer functions Frequency response Control system design Stability analysis
Definition The Laplace transform of a function, f(t), is defined as [ ] () Fs () L ft () f te dt (3-1) = = where F(s) is the symbol for the Laplace transform, L is the Laplace transform operator, and f(t) is some function of time, t. 0 st Note: The L operator transforms a time domain function f(t) into an s domain function, F(s). s is a complex variable: s = a + bj, j = 1
Inverse Laplace Transform, L -1 By definition, the inverse Laplace transform operator, L -1, converts an s-domain function back to the corresponding time domain function: 1 () L F( s) f t = Important Properties: Both L and L -1 are linear operators. Thus, () + () = () + () = ax ( s) + by ( s) (3-3) L axt byt al xt bl yt
LT Properties where: - x(t) and y(t) are arbitrary functions - a and b are constants - X ( s) = L x( t) and Y( s) = L y( t) Similarly, L ( ) + ( ) = ( ) + ( ) 1 ax s by s ax t b y t
Laplace Transforms of Common Functions 1. Constant Function Let f(t) = a (a constant). Then from the definition of the Laplace transform in (3-1), L st a st a a a = ae dt = e = 0 = (3-4) s s s ( ) 0 0
Step Function 2. Step Function The unit step function is widely used in the analysis of process control problems. It is defined as: () S t = 0 fort < 0 1 fort 0 (3-5) Because the step function is a special case of a constant, it follows from (3-4) that () L S t = 1 s (3-6)
Derivatives 3. Derivatives This is a very important transform because derivatives appear in the ODEs we wish to solve. In the text (p.53), it is shown that df L = sf s dt ( ) f ( ) Similarly, for higher order derivatives: L ( n ) ( ) ( n ) ( ) 0 (3-9) initial condition at t = 0 n d f n n 1 n 2 ( ) ( ) () 1 s F s s f 0 s f ( 0) n = dt 2 1... sf 0 f 0 (3-14)
Derivatives (cont d) where: - n is an arbitrary positive integer - ( k f ) ( 0) = d k f k dt = Special Case: All Initial Conditions are Zero t 0 Suppose ( ) () ( ) 1 1 ( n ) ( ) f 0 = f 0 =... = f 0. Then n d f n L ( ) n = s F s dt In process control problems, we usually assume zero initial conditions.
Exponential and Pulse Functions 4. Exponential Functions Consider bt () = e f t where b > 0. Then, L bt bt st ( b s) t e + = e e dt = e dt 0 0 1 ( b+ s) t 1 = e = b+ s 0 s+ b (3-16) 5. Rectangular Pulse Function It is defined by: 0 for t < 0 f () t = h for 0 t < tw (3-20) 0 for t tw
h f () t t w Time, t The Laplace transform of the rectangular pulse is given by h s ( ) ( ts = e ) F s w 1 (3-22)
Impulse function 6. Impulse Function (or Dirac Delta Function) The impulse function is obtained by taking the limit of the rectangular pulse as its width, t w, goes to zero but holding 1 the area under the pulse constant at one. (i.e., let h = ) t Let, = impulse function w δ () t Then, () t 1 L δ =
Laplace Table
Solution of ODEs by Laplace Transforms Procedure: 1. Take the L of both sides of the ODE. 2. Rearrange the resulting algebraic equation in the s domain to solve for the L of the output variable, e.g., Y(s). 3. Perform a partial fraction expansion. 4. Use the L -1 to find y(t) from the expression for Y(s).
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: () ( ) xt X s () ( ) yt system Y s The following terminology is used: x input forcing function cause y output response effect
Definition of TF Let G(s) denote the transfer function between an input, x, and an output, y. Then, by definition where: ( ) G s = ( ) ( ) Y s X s ( ) = L y( t) Y s ( ) = L x( t) X s Example: Model for a simple cylindrical tank - mass balance - linearization (if necessary) - deviation variable - time constant equivalent to residence time - gain of the process
First Order System Chapter 5 The standard form for a first-order TF is: where: τ ( ) ( ) Y s U s K = (5-16) τs+ 1 K = steady-state gain = time constant Consider the response of this system to a step of magnitude, M: () for 0 ( ) U t = M t U s = M s Substitute into (5-16) and rearrange, ( ) Y s = s KM ( τs+ 1) (5-17)
First Order System Take L -1 (cf. Table 3.1), () ( / τ = ) yt KM1 e t (5-18) Chapter 5 y y Let y = steady-state value of y(t). From (5-18), 1.0 0.5 0 0 1 2 3 4 5 t τ t y y 0 0 τ 0.632 2τ 0.865 3τ 4τ 5τ 0.950 0.982 0.993 Note: Large means a slow response. τ y = KM.