The best model for a cat is another cat or, better, the cat itself

Norbert Wiener

General Form of Dynamic Process Models

A general representation of the dynamic process models derived in the previous lecture is:

ẋ_{1} = f_{1}(x_{1}, x_{2}, ..., x_{n}, u_{1}, u_{2}, ..., u_{m}, p_{1}, p_{2}, ..., p_{r})
ẋ_{2} = f_{2}(x_{1}, x_{2}, ..., x_{n}, u_{1}, u_{2}, ..., u_{m}, p_{1}, p_{2}, ..., p_{r})
.
.
.
ẋ_{n} = f_{n}(x_{1}, x_{2}, ..., x_{n}, u_{1}, u_{2}, ..., u_{m}, p_{1}, p_{2}, ..., p_{r})

where

x_{i} state variable
u_{i} input variable
p_{i} parameter

and the initial conditions of x_{i} are known. The above equations are

• first order

• nonlinear

• ordinary differential equations

Definitions

1. State Variable: A state variable is a variable that arises naturally in the accumulation term of a dynamic material or energy balance. A state variable is a measurable (at least conceptually) quantity that indicates the state of system. Examples of state variables include concentrations (from mass balance) and temperature (from energy balance).

2. Input Variable: An input variable is a variable that normally must be specified before a problem can be solved or a process can be operated. Inputs are normally specified by the engineer based on knowledge of the system. Input variables typically include flowrates of streams entering or leaving the system. Input variables are manipulated to achieve desired performance.

3. Parameter: A parameter is typically a physical or chemical property value that must be specified or known to mathematically solve a problem. Parameters are often fixed by reaction chemistry, molecular structure, vessel size, or operation. Examples of parameters include density, viscosity, heat and mass transfer coefficients.

Vector Form

The set of equations described by eq. (1) can be written more compactly in vector form as follows

\begin{aligned}\frac{dx}{dt} & = & f(x, u, p) \\ x(0) & = & x_{0} \end{aligned}  (2)

where

x vector of state variables
u vector of input variables
p vector of parameters

Steady States

At steady state, ẋ = 0

If the steady state values of the input vector, u_{s}, is specified, the steady state values of the states, x_{s}, can be computed from:

f(x_{s}, u_{s}, p) = 0  (3)

Eq. (3) represents a set of n nonlinear equations in n variables x_{s}, which need to be solved simultaneously.

Solution of Nonlinear Algebraic Equations

• If the dimension of the x vector is small (n ≤ 2), eq. (3) can be solved analytically

• If the dimension of the x vector is large (n ≥ 3), eq. (3) is solved numerically (e.g. Newton’s Method)

Example 1

The following series reaction is occurring in a CSTR

A ⟶ B ⟶ C

where the first reaction, with rate constant k_{1}, is second order and the second reaction, with rate constant, k_{2}, is first order. The parameter values are as follows:

\begin{aligned}k_{1} & = & 2 \\ k_{2} & = & 3 \\ \frac{F}{V} & = & 1 \end{aligned}

The initial conditions are C_{A} = 1, C_{B} = 0, C_{C} = 0.

The steady state value of the input, C_{Ain} = 1. Develop a mathematical model of the above process, put it in vector form, and compute the steady-state values.

Linearization of Nonlinear Models

In general, we would like to know: how do the states, x vary with time when the input variables, u, and/or the initial conditions, x(0), are perturbed?

This analysis can be done analytically if the process model is linear. This provides the motivation to linearize nonlinear models.

The analysis based on the linearized model is valid only when the process is close to the steady state value.

Consider the general nonlinear model:

\frac{dx}{dt} = f(x, u)  (4)

If (u_{s}, x_{s}) denotes the reference steady state, this must satisfy:

0 = f(x_{s}, u_{s})  (5)

When x and u are close to the steady state values x_{s} and u_{s}, we can approximate the nonlinear function f(x, u) by a truncated Taylor’s series:

f(x, u) ≈ f(x_{s}, u_{s})+(\frac{∂f}{∂x} (x_{s}, u_{s})) (x−x_{s})+(\frac{∂f}{∂u} (x_{s}, u_{s})) (u−u_{s})

(6)

Substituting eq. (5) in eq. (6), and introducing the deviation variables:

\begin{aligned}X & = & x − x_{s} \\ U & = & u − u_{s} \end{aligned}  (7)

we get the following system of equations:

\frac{dX}{dt} = AX + BU  (8)

where

\begin{aligned}A & = & (\frac{∂f}{∂x} (x_{s}, u_{s})) \\ & = & [ \begin{matrix}\frac{∂f_{1}}{∂x_{1}} (x_{s}, u_{s}) & \frac{∂f_{1}}{∂x_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{1}}{∂x_{n}} (x_{s}, u_{s}) \\ \frac{∂f_{2}}{∂x_{1}} (x_{s}, u_{s}) & \frac{∂f_{2}}{∂x_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{2}}{∂x_{n}} (x_{s}, u_{s}) \\ . & . & & . \\ . & . & & . \\ . & . & & . \\ \frac{∂f_{n}}{∂x_{1}} (x_{s}, u_{s}) & \frac{∂f_{n}}{∂x_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{n}}{∂x_{n}} (x_{s}, u_{s}) \end{matrix} ] \end{aligned}

(9)

\begin{aligned}B & = & (\frac{∂f}{∂u} (x_{s}, u_{s})) \\ & = & [ \begin{matrix}\frac{∂f_{1}}{∂u_{1}} (x_{s}, u_{s}) & \frac{∂f_{1}}{∂u_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{1}}{∂u_{m}} (x_{s}, u_{s}) \\ \frac{∂f_{2}}{∂u_{1}} (x_{s}, u_{s}) & \frac{∂f_{2}}{∂u_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{2}}{∂u_{m}} (x_{s}, u_{s}) \\ . & . & & . \\ . & . & & . \\ . & . & & . \\ \frac{∂f_{n}}{∂u_{1}} (x_{s}, u_{s}) & \frac{∂f_{n}}{∂u_{2}} (x_{s}, u_{s}) & ... & \frac{∂f_{n}}{∂u_{m}} (x_{s}, u_{s}) \end{matrix} ] \end{aligned}

(10)

Example 2

Linearize the model developed in Example 1 around the steady state.