Time-Discretized Controllers

\underline{P Controller}: Continuous Time:

U(t) = k_{c}E(t)  (1)

Discrete Time:

U(k) = k_{c}E(k)  (2)

\underline{PI Controller}: Continuous Time:

\begin{aligned}\frac{de_{I}}{dt} & = & E(t) \\ U(t) & = & k_{c}E(t) + \frac{k_{c}}{τ_{I}} e_{I}(t) \end{aligned}  (3)

Discrete Time:

\begin{aligned}e_{I}(k) & = & e_{I}(k − 1) + hE(k − 1) \\ U(k) & = & \frac{k_{c}}{τ_{I}} e_{I}(k) + k_{c}E(k) \end{aligned}  (4)

\underline{PID Controller}: Continuous Time:

\begin{aligned}\frac{de_{I}}{dt} & = & E \\ \frac{de_{F}}{dt} & = & −\frac{1}{λ}e_{F} + \frac{1}{λ}E \\ U & = & k_{c}E + \frac{k_{c}}{τ_{I}} e_{I} + k_{c}τ_{D} (−\frac{1}{λ}e_{F} + \frac{1}{λ}E) \end{aligned} (5)

Discrete Time:

\begin{aligned}e_{I}(k) & = & e_{I}(k − 1) + hE(k − 1) \\ e_{F} (k) & = & e^{− \frac{h}{λ}} e_{F} (k − 1) + (1 − e^{− \frac{h}{λ}} ) E(k − 1) \\ U(k) & = & \frac{k_{c}}{τ_{I}} e_{I}(k) + k_{c}τ_{D} (−\frac{1}{λ}e_{F} (k)) + \\ & & \frac{1}{λ}E(k) + k_{c}E(k) \end{aligned} (6)

Analysis of Discrete Time Linear Systems

A continuous system of the form

\begin{aligned}\frac{dx}{dt} & = & Ax + Bu \\ y & = & Cx + Du \end{aligned}  (7)

can be discretized to the form:

\begin{aligned}x(k) & = & Φx(k − 1) + Γu(k − 1) \\ y(k) & = & Cx(k) + Du(k) \end{aligned}  (8)

where

Φ = e^{Ah}  and  Γ = ∫_{0}^{h}e^{At}Bdt  (9)

Steady State Analysis

The steady state relation between the input and the output is the same whether the continuous time description is used or the discrete time description is used.

Illustrative Example

Consider the following continuous time model of a CSTR where a 1^{st} order reaction is occurring:

\frac{dC_{A}}{dt} = − (\frac{1 + kV/F}{V/F} ) C_{A} + C_{A_{in}}  (10)

• Write the above model in discrete time.

• What is the steady state relation between C_{A} and C_{A_{in}} using (a) the continuous time model and (b) the discrete time model?

Deviation Variables

Similar to continuous time linear systems, one can define deviation variables for discrete time linear systems:

Define:

\begin{aligned}U(k − 1) & = & u(k − 1) − u_{s} \\ X(k) & = & x(k) − x_{s} \\ Y (k) & = & y(k) − y_{s} \end{aligned}  (11)

Consider the discrete time system:

\begin{aligned}x(k) & = & Φx(k − 1) + Γu(k − 1) \\ y(k) & = & Cx(k) + Du(k) \end{aligned}  (12)

At steady state:

\begin{aligned}x_{s} & = & Φx_{s} + Γu_{s} \\ y_{s} & = & Cx_{s} + Du_{s} \end{aligned}  (13)

Subtracting eq. 13 from eq. 12 and using the definitions in eq. 11, we get:

\begin{aligned}X(k) & = & ΦX(k − 1) + ΓU(k − 1) \\ Y (k) & = & CX(k) + DU(k) \end{aligned}  (14)

Stability Analysis

Recall that for a continuous time system of the form:

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

is stable if all Re(λ(A)) have negative real parts.

Discrete time representation of the above system is:

X(k) = ΦX(k − 1) + ΓU(k − 1)  (16)

where Φ = e^{Ah} The eigenvalues of Φ and the eigenvalues of A are related as follows:

λ_{i}(Φ) = e^{[λ_{i}(A)]h}  (17)

Stability Test

\begin{matrix}Re \{λ_{i}(A)\} < 0  ⟺  | λ_{i}(Φ) |< 1 \\ Re \{λ_{i}(A)\} = 0  ⟺  | λ_{i}(Φ) |= 1 \\ Re \{λ_{i}(A)\} > 0  ⟺  | λ_{i}(Φ) |> 1 \end{matrix}  (18)

A discrete-time linear system is \underline{stable} if and only if all the eigenvalues of the Φ matrix are in the \underline{interior} of the unit circle.

Another observation from λ_{i}(Φ) = e^{[λ_{i}(A)]h} is:

λ_{i}(A) real and negative ⟺ λ_{i}(Φ) real and 0 < λ_{i}(Φ) < 1 (19)

Thus, if all the eigenvalues of the Φ matrix are real and between 0 and 1, the response is \underline{non-oscillatory}.