Process Dynamics And Mathematical Models

General References: Seborg, Edgar, and Mellichamp, Process Dynamics and Control, Wiley, New York, 1989; Marlin, Process Control, McGraw-Hill, New York, 1995; Ogunnaike and Ray, Process Dynamics Modeling and Control, Oxford University Press, New York, 1994; Smith and Corripio, Principles and Practices of Automatic Process Control, Wiley, New York, 1985

Open-Loop versus Closed-Loop Dynamics It is common in industry to manipulate coolant in a jacketed reactor in order to control conditions in the reactor itself. A simplified schematic diagram of such a reactor control system is shown in Fig. 8-2. Assume that the reactor temperature is adjusted by a controller that increases the coolant flow in proportion to the difference between the desired reactor temperature and the temperature that is measured. The proportionality constant is K„. If a small change in the temperature of the inlet stream occurs, then depending on the value of K» one might observe the reactor temperature responses shown in Fig. 8-3. The top plot shows the case for no control (K = 0), which is called the open loop, or the normal dynamic response of the process by itself. As Kc increases, several effects can be noted. First, the reactor temperature responds faster and faster. Second, for the initial increases in Kc, the maximum deviation in the reactor temperature becomes smaller. Both of these effects are desirable so that disturbances from normal operation have

FIG. 8-1 Block diagram for feedforward and feedback control.

Feedback Loop

FIG. 8-1 Block diagram for feedforward and feedback control.

FIG. 8-2 Reactor control system.

as small an effect as possible on the process under study. As the gain is increased further, eventually a point is reached where the reactor temperature oscillates indefinitely, which is undesirable. This point is called the stability limit, where K = K„, the ultimate controller gain. Increasing Kc further causes the magnitude of the oscillations to increase, with the result that the control valve will cycle between full open and closed.

The responses shown in Fig. 8-3 are typical of the vast majority of regulatory loops encountered in the process industries. Figure 8-3 shows that there is an optimal choice for Kc, somewhere between 0 (no control) and Ku (stability limit). If one has a dynamic model of a process, then this model can be used to calculate controller settings. In Fig. 8-3, no time scale is given, but rather the figure shows relative responses. A well-designed controller might be able to speed up the response of a process by a factor of roughly two to four. Exactly how fast the control system responds is determined by the dynamics of the process itself.

Physical Models versus Empirical Models In developing a dynamic process model, there are two distinct approaches that can be taken. The first involves models based on first principles, called physical models, and the second involves empirical models. The conservation laws of mass, energy, and momentum form the basis for developing physical models. The resulting models typically involve sets of differential and algebraic equations that must be solved simultaneously. Empirical models, by contrast, involve postulating the form of a dynamic model, usually as a transfer function, which is discussed below. This transfer function contains a number of parameters that need to be estimated. For the development of both physical and empirical models, the most expensive step normally involves verification of their accuracy in predicting plant behavior.

To illustrate the development of a physical model, a simplified treatment of the reactor, shown in Fig. 8-2 is used. It is assumed that the reactor is operating isothermally and that the inlet and exit volumetric flows and densities are the same. There are two components, A and B, in the reactor, and a single first order reaction of A ^ B takes place. The inlet concentration of A, which we shall call ct, varies with time. A dynamic mass balance for the concentration of A (cA) can be written as follows:

In Eq. (8-1), the flow in of A is Fcf, the flow out is FcA, and the loss via reaction is krVcA, where V = reactor volume and kr = kinetic rate constant. In this example, c is the input, or forcing variable, and cA is the output variable. If V, F, and kr are constant, Eq. (8-1) can be rearranged by dividing by (F + krV) so that it only contains two groups of parameters. The result is:

where T = V/(F + krV) and K = F/(F + krV). For this example, the resulting model is a first-order differential equation in which T is called the time constant and K the process gain.

FIG. 8-3 Typical control system responses.

As an alternative to deriving Eq. (8-2) from a dynamic mass balance, one could simply postulate a first-order differential equation to be valid (empirical modeling). Then it would be necessary to estimate values for T and K so that the postulated model described the reactor's dynamic response. The advantage of the physical model over the empirical model is that the physical model gives insight into how reactor parameters affect the values of T, and K, which in turn affects the dynamic response of the reactor.

Nonlinear versus Linear Models If V F, and k are constant, then Eq. (8-1) is an example of a linear differential equation model. In a linear equation, the output and input variables and their derivatives only appear to the first power. If the rate of reaction were second order, then the resulting dynamic mass balance would be:

Since cA appears in this equation to the second power, the equation is nonlinear.

The difference between linear systems and nonlinear systems can be seen by considering the steady state behavior of Eq. (8-1) compared to Eq. (8-3) (the left-hand side is zero; i.e., dcA /at = 0). For a given change in Cj, ACj, the change in cA calculated from Eq. (8-1), or Ac, is always proportional to Acj, and the proportionality constant is K [see Eq. (8-2)]. The change in the output of a system divided by a change in the input to the system is called the process gain. Linear systems have constant process gains for all changes in the input. By contrast, Eq. (8-3) gives a Ac that varies in proportion to Acj but with the proportionality factor being a function of the concentration levels in the reactor. Thus, depending on where the reactor operates, a change in cj produces different changes in cA. In this case, the process has a nonlinear gain. Systems with nonlinear gains are more difficult to control than linear systems that have constant gains.

Simulation of Dynamic Models Linear dynamic models are particularly useful for analyzing control-system behavior. The insight gained through linear analysis is invaluable. However, accurate dynamic process models can involve large sets of nonlinear equations. Analytical solution of these models is not possible. Thus, in these cases, one must turn to simulation approaches to study process dynamics and the effect of process control. Equation (8-3) will be used to illustrate the simulation of nonlinear processes. If dcA/dt on the left-hand side of Eq. (8-3) is replaced with its finite difference approximation, one gets:

Starting with an initial value of cA and knowing cj(t), Eq. (8-4) can be solved for cA(t + At). Once cA(t + At) is known, the solution process can be repeated to calculate cA(t + 2At), and so on. This approach is called the Euler integration method; while it is simple, it is not necessarily the best approach to numerically integrating nonlinear differential equations. To achieve accurate solutions with an Euler approach, one often needs to take small steps in time, At. A number of more sophisticated approaches are available that allow much larger step sizes to be taken but require additional calculations. One widely used approach is the fourth-order Runge Kutta method, which involves the following calculations:

define then with cA(t + A t) = cA(t) + A t(m1 + 2m2 + 2m3 + m4)

In this method, the m/s are calculated sequentially in order to take a step in time. Even though this method requires calculation of the four additional mj values, for equivalent accuracy the fourth-order Runge Kutta method can result in a faster numerical solution, since a larger step, At, can be taken with it. Increasingly sophisticated simulation packages are being used to calculate the dynamic behavior of processes and test control system behavior. These packages have good user interfaces, and they can handle stiff systems where some variables respond on a time scale that is much much faster or slower than other variables. A simple Euler approach cannot effectively handle stiff systems, which frequently occur in chemical-process models.

Laplace Transforms When mathematical models are used to describe process dynamics in conjunction with control-system analysis, the models generally involve linear differential equations. Laplace transforms are very effective for solving linear differential equations. The key advantage of using Laplace transforms is that they convert differential equations into algebraic equations. The resulting algebraic equations are easier to solve than the original differential equations. When the Laplace transform is applied to a linear differential equation in time, the result is an algebraic equation in a new variable, s, called the Laplace variable. To get the solution to the original differential equation, one needs to invert the Laplace transform. Table 8-1 gives a number of useful Laplace transform pairs, and more extensive tables are available (Seborg, Edgar, and Mellichamp, Process Dynamics and Control, Wiley, New York, 1989).

To illustrate how Laplace transforms work, consider the problem of solving Eq. (8-2), subject to the initial condition that cA = 0 at t = 0, and cj is constant. If cA were not initially zero, one would define a deviation variable between cA and its initial value (cA - c0). Then the transfer function would be developed using this deviation variable. Taking the Laplace transform of both sides of Eq. (8-2) gives:

Denoting the £(c) as CA(s) and using the relationships in Table 8-1 gives:

Equation (8-12) can be solved for CA to give:

Using the entries in Table 8-1, Eq. (8-13) can be inverted to give the transient response of cA as:

Equation (8-14) shows that cA starts from 0 and builds up exponentially to a final concentration of Kc,. Note that to get Eq. (8-14), it was only necessary to solve the algebraic Eq. (8-12) and then find the inverse of Ca(s) in Table 8-1. The original differential equation was not solved directly. In general, techniques such as partial fraction expansion must be used to solve higher order differential equations with Laplace transforms.

Transfer Functions and Block Diagrams A very convenient and compact method of representing the process dynamics of linear systems involves the use of transfer functions and block diagrams. A transfer function can be obtained by starting with a physical model as

TABLE 8-1 Frequently Used Laplace Transforms

Time function, f(t)

Transform, F(s)

0 0

Post a comment