Chapter 29: Industrial and Mechatronic Case Studies in Linear Control
Lesson 3: Temperature Control of a Thermal System (Linearized Model)
This lesson develops a physically grounded linear model for temperature control of a thermal chamber or oven, starting from nonlinear energy balance equations, performing local linearization around an operating point, and obtaining a first-order transfer function model. We then design a PI controller using classical pole-placement ideas and implement the closed-loop system in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica.
1. Physical Description and Control Objectives
Consider a small thermal chamber (e.g. an industrial oven, environmental chamber, or heated enclosure) whose internal temperature is controlled by an electric heater. The control objective is to make the chamber temperature \( T(t) \) track a desired reference temperature \( T_{\text{ref}}(t) \) while rejecting disturbances such as changes in ambient temperature and heat losses through walls or due to opening the door.
The typical actuating variable is a heater command \( u(t) \) (duty cycle of a PWM signal, or normalized heater voltage or power), bounded between 0 and 1. A temperature sensor (thermocouple, RTD) measures \( T(t) \), which is fed back to a controller (often PI) implemented in a PLC, microcontroller, or industrial controller.
flowchart TD
R["Temperature reference T_ref(t)"] --> C["Controller (PI)"]
C --> U["Heater command u(t)"]
U --> H["Heater / power electronics"]
H --> Q["Heat input q_in(t)"]
Q --> P["Thermal plant (chamber)"]
Tenv["Ambient temperature T_env"] --> P
P --> S["Temperature sensor"]
S --> C
Our task in this lesson is to construct an approximate linear model that captures the dominant dynamics around a chosen operating temperature \( T_0 \), and to use that model for linear PI control design.
2. Nonlinear Lumped Thermal Model
We model the chamber as a single thermal capacitance (lumped parameter model). Let \( C_{\text{th}} \) denote the effective thermal capacitance (J/K) of the chamber, walls, and contents. The energy balance yields
\[ C_{\text{th}} \frac{\mathrm{d}T(t)}{\mathrm{d}t} = q_{\text{in}}(u(t), T(t)) - q_{\text{loss}}(T(t), T_{\text{env}}) + q_{\text{dist}}(t), \]
where
- \( q_{\text{in}} \): heat input from the electric heater (W),
- \( q_{\text{loss}} \): heat loss through convection and radiation (W),
- \( q_{\text{dist}} \): disturbance heat (e.g. opening door, load changes),
- \( T_{\text{env}} \): ambient temperature, assumed slowly varying relative to dynamics.
A typical parameterization is
\[ q_{\text{in}}(u) = \eta P_{\max} u(t), \quad 0 \le u(t) \le 1, \]
where \( \eta \) is the heater efficiency and \( P_{\max} \) is the rated electrical power. Heat losses are often modeled as a combination of convective and radiative terms:
\[ q_{\text{loss}}(T, T_{\text{env}}) = k_c \bigl(T(t) - T_{\text{env}}\bigr) + \varepsilon \sigma A \left( T(t)^4 - T_{\text{env}}^4 \right), \]
where \( k_c \) is a convective heat transfer coefficient, \( \varepsilon \) is the emissivity, \( \sigma \) the Stefan–Boltzmann constant, and \( A \) the radiating area. The radiative term makes the model nonlinear in \( T(t) \).
Substituting, the nonlinear ODE for the chamber temperature becomes
\[ C_{\text{th}} \frac{\mathrm{d}T(t)}{\mathrm{d}t} = \eta P_{\max} u(t) - k_c \bigl(T(t) - T_{\text{env}}\bigr) - \varepsilon \sigma A \left( T(t)^4 - T_{\text{env}}^4 \right) + q_{\text{dist}}(t). \]
3. Equilibrium Point and Small-Signal Variables
We choose a nominal operating point \( (T_0, u_0) \) such that the chamber is in steady-state without disturbances:
\[ \frac{\mathrm{d}T}{\mathrm{d}t} = 0,\quad q_{\text{dist}}(t) = 0 \quad \Rightarrow \quad 0 = \eta P_{\max} u_0 - k_c \bigl(T_0 - T_{\text{env}}\bigr) - \varepsilon \sigma A \bigl(T_0^4 - T_{\text{env}}^4\bigr). \]
This algebraic equation determines the heater command \( u_0 \) required to maintain temperature \( T_0 \). Now define small-signal deviations
\[ \Delta T(t) = T(t) - T_0, \qquad \Delta u(t) = u(t) - u_0, \qquad \Delta q_{\text{dist}}(t) = q_{\text{dist}}(t). \]
The goal of linearization is to obtain a linear differential equation in \( \Delta T(t) \) and \( \Delta u(t) \) that approximates the nonlinear dynamics in a neighborhood of the operating point.
4. Linearization of the Energy Balance
Let \( f(T,u) \) denote the right-hand side of the energy balance divided by \( C_{\text{th}} \):
\[ \frac{\mathrm{d}T}{\mathrm{d}t} = f(T,u) + \frac{1}{C_{\text{th}}} q_{\text{dist}}(t), \]
\[ f(T,u) = \frac{1}{C_{\text{th}}} \left[ \eta P_{\max} u - k_c \bigl(T - T_{\text{env}}\bigr) - \varepsilon \sigma A \bigl(T^4 - T_{\text{env}}^4\bigr) \right]. \]
A first-order Taylor expansion of \( f(T,u) \) around \( (T_0, u_0) \) gives
\[ f(T,u) \approx f(T_0, u_0) + \left.\frac{\partial f}{\partial T}\right|_{(T_0,u_0)} \Delta T + \left.\frac{\partial f}{\partial u}\right|_{(T_0,u_0)} \Delta u. \]
At equilibrium, by definition \( f(T_0,u_0) = 0 \), hence
\[ \frac{\mathrm{d} \Delta T}{\mathrm{d}t} \approx a \, \Delta T(t) + b \, \Delta u(t) + \frac{1}{C_{\text{th}}} \Delta q_{\text{dist}}(t), \]
where
\[ a = \left.\frac{\partial f}{\partial T}\right|_{(T_0,u_0)}, \qquad b = \left.\frac{\partial f}{\partial u}\right|_{(T_0,u_0)}. \]
Computing the partial derivatives,
\[ \frac{\partial f}{\partial u} = \frac{1}{C_{\text{th}}} \eta P_{\max} \quad \Rightarrow \quad b = \frac{\eta P_{\max}}{C_{\text{th}}}, \]
\[ \frac{\partial f}{\partial T} = \frac{1}{C_{\text{th}}} \left[ -k_c - 4 \varepsilon \sigma A T^3 \right] \quad \Rightarrow \quad a = \frac{1}{C_{\text{th}}} \left[ -k_c - 4 \varepsilon \sigma A T_0^3 \right]. \]
Because \( k_c > 0 \) and \( \varepsilon \sigma A > 0 \), we have \( a < 0 \), so the linearized thermal plant is internally stable.
5. First-Order Transfer Function and Dynamic Parameters
Neglecting disturbance for the moment, the linearized small-signal model can be written as
\[ \frac{\mathrm{d} \Delta T(t)}{\mathrm{d}t} = a \, \Delta T(t) + b \, \Delta u(t), \]
with \( a < 0 \). Taking Laplace transforms (with zero initial conditions) yields
\[ s \Delta T(s) = a \, \Delta T(s) + b \, \Delta U(s), \]
\[ \Delta T(s) = \frac{b}{s - a} \Delta U(s). \]
Since \( a < 0 \), it is natural to define \( \tau_{\text{th}} = -1/a \) (thermal time constant) and \( K_{\text{th}} = -b/a \) (steady-state gain). Then the transfer function from heater command to temperature is the standard first-order form
\[ G_{\text{th}}(s) = \frac{\Delta T(s)}{\Delta U(s)} = \frac{K_{\text{th}}}{\tau_{\text{th}} s + 1}. \]
The steady-state gain \( K_{\text{th}} \) equals the small-signal change in equilibrium temperature per unit change in heater input. The time constant \( \tau_{\text{th}} \) characterizes the speed of thermal response.
flowchart TD
A["Nonlinear thermal model"] --> B["Select operating point (T0, u0)"]
B --> C["Linearize: d(Delta T)/dt = a Delta T + b Delta u"]
C --> D["Identify a < 0, b > 0"]
D --> E["Define tau_th = -1/a, K_th = -b/a"]
E --> F["Obtain G_th(s) = K_th / (tau_th s + 1)"]
Disturbances can be included as an additive input \( \Delta q_{\text{dist}}(t) / C_{\text{th}} \) with a corresponding transfer function to \( \Delta T(s) \), enabling analysis of disturbance rejection using sensitivity functions later in the course.
6. PI Control Design via Second-Order Approximation
For many thermal systems, a PI controller suffices to achieve acceptable tracking and zero steady-state error to step changes in temperature reference. Consider a unity-feedback loop with PI controller
\[ C(s) = K_p + \frac{K_i}{s} = \frac{K_p s + K_i}{s}. \]
The loop transfer function is
\[ L(s) = C(s) G_{\text{th}}(s) = \frac{K_{\text{th}} (K_p s + K_i)}{s (\tau_{\text{th}} s + 1)}. \]
The closed-loop transfer function from reference \( R(s) \) to temperature \( \Delta T(s) \) is
\[ \frac{\Delta T(s)}{R(s)} = \frac{C(s) G_{\text{th}}(s)}{1 + C(s) G_{\text{th}}(s)}. \]
The characteristic polynomial is given by the denominator
\[ s (\tau_{\text{th}} s + 1) + K_{\text{th}} (K_p s + K_i) = \tau_{\text{th}} s^2 + \bigl(1 + K_{\text{th}} K_p\bigr) s + K_{\text{th}} K_i. \]
Dividing by \( \tau_{\text{th}} \) yields
\[ s^2 + \frac{1 + K_{\text{th}} K_p}{\tau_{\text{th}}} s + \frac{K_{\text{th}} K_i}{\tau_{\text{th}}} = 0. \]
To shape the closed-loop response, we match this to a desired second-order polynomial
\[ s^2 + 2 \zeta \omega_n s + \omega_n^2, \]
where \( \zeta \) is the desired damping ratio and \( \omega_n \) the desired natural frequency. Coefficient matching gives
\[ \frac{1 + K_{\text{th}} K_p}{\tau_{\text{th}}} = 2 \zeta \omega_n, \qquad \frac{K_{\text{th}} K_i}{\tau_{\text{th}}} = \omega_n^2. \]
\[ K_p = \frac{2 \zeta \omega_n \tau_{\text{th}} - 1}{K_{\text{th}}}, \qquad K_i = \frac{\omega_n^2 \tau_{\text{th}}}{K_{\text{th}}}. \]
For typical thermal systems, choosing \( \zeta \approx 0.7 \) and selecting \( \omega_n \) so that the settling time \( T_s \approx 4 / (\zeta \omega_n) \) matches a desired value yields practically useful PI gains.
7. Python Implementation (python-control)
We now build the linearized thermal model and PI controller in Python
using the
control library (python-control). Suppose experimental
identification yielded
\( \tau_{\text{th}} = 300 \,\text{s} \) and
\( K_{\text{th}} = 5 \,\text{K} \) per unit input.
import numpy as np
import matplotlib.pyplot as plt
import control as ctrl # python-control
# Identified thermal parameters
tau_th = 300.0 # seconds
K_th = 5.0 # K per unit input
# First-order plant G_th(s) = K_th / (tau_th s + 1)
G_th = ctrl.tf([K_th], [tau_th, 1.0])
# Desired closed-loop specs
zeta = 0.7
Ts_des = 1200.0 # desired 2% settling time in seconds
# Settling time approximation: Ts ≈ 4 / (zeta * omega_n)
omega_n = 4.0 / (zeta * Ts_des)
# Compute PI gains from matching
Kp = (2.0 * zeta * omega_n * tau_th - 1.0) / K_th
Ki = (omega_n**2 * tau_th) / K_th
print(f"Kp = {Kp:.4f}, Ki = {Ki:.4f}")
# PI controller C(s) = Kp + Ki/s = (Kp*s + Ki)/s
C = ctrl.tf([Kp, Ki], [1.0, 0.0])
# Closed-loop (unity feedback)
T_cl = ctrl.feedback(C * G_th, 1.0)
# Step response: 1 K step in reference
t = np.linspace(0, 4000, 1000)
t, y = ctrl.step_response(T_cl, T=t)
plt.figure()
plt.plot(t, y, label="T(t)")
plt.xlabel("Time [s]")
plt.ylabel("Temperature change [K]")
plt.title("Closed-loop step response of thermal system with PI control")
plt.grid(True)
plt.legend()
plt.show()
# Disturbance rejection: treat disturbance input via additional transfer function if needed.
The script constructs the first-order transfer function, designs PI gains via the analytic formulas, and plots the closed-loop temperature response to a unit step in temperature reference.
8. C++ Implementation (Discrete-Time PI and Thermal Model)
For embedded implementation, we often work in discrete time with a fixed sampling period \( T_s \). Using forward Euler integration of the first-order ODE
\[ \frac{\mathrm{d} \Delta T}{\mathrm{d}t} = -\frac{1}{\tau_{\text{th}}} \Delta T + \frac{K_{\text{th}}}{\tau_{\text{th}}} \Delta u, \]
we obtain the discrete-time update
\[ \Delta T[k+1] \approx \Delta T[k] + T_s \left( -\frac{1}{\tau_{\text{th}}} \Delta T[k] + \frac{K_{\text{th}}}{\tau_{\text{th}}} \Delta u[k] \right). \]
The following C++ program simulates the PI-controlled thermal system with this discretized model.
#include <iostream>
int main() {
// Thermal parameters
const double tau_th = 300.0; // s
const double K_th = 5.0; // K per unit input
// PI gains (from previous design or manual tuning)
const double Kp = 0.05;
const double Ki = 1.0e-4;
// Discretization
const double Ts = 1.0; // sampling period [s]
const int N = 4000; // number of simulation steps
// State variables
double T = 0.0; // Delta T, deviation from nominal [K]
double integ = 0.0; // integral of error
double u = 0.0; // control input (Delta u)
const double r = 1.0; // 1 K step reference
for (int k = 0; k < N; ++k) {
double e = r - T;
integ += e * Ts;
u = Kp * e + Ki * integ;
// Saturation of heater command (0 to 1 in absolute units)
if (u > 1.0) u = 1.0;
if (u < 0.0) u = 0.0;
// Thermal plant update: forward Euler
double dTdt = (-1.0 / tau_th) * T + (K_th / tau_th) * u;
T += Ts * dTdt;
// Log every 100 steps
if (k % 100 == 0) {
std::cout << "t = " << k * Ts
<< " s, T = " << T
<< " K, u = " << u
<< std::endl;
}
}
return 0;
}
The same structure can be deployed on a microcontroller by replacing console output with communication to a host or logging to memory, and by reading sensor values instead of using a purely simulated state.
9. Java Implementation (Simulation Class)
In Java, we can implement the same discrete-time PI-controlled thermal model using a simple simulation class. The structure is similar to the C++ code, but uses Java syntax and the standard library.
public class ThermalPISim {
public static void main(String[] args) {
double tauTh = 300.0; // s
double Kth = 5.0; // K per unit input
double Kp = 0.05;
double Ki = 1.0e-4;
double Ts = 1.0; // seconds
int N = 4000;
double T = 0.0; // Delta T
double integ = 0.0;
double u = 0.0;
double r = 1.0; // 1 K step
for (int k = 0; k < N; k++) {
double e = r - T;
integ += e * Ts;
u = Kp * e + Ki * integ;
// Saturation
if (u > 1.0) u = 1.0;
if (u < 0.0) u = 0.0;
double dTdt = (-1.0 / tauTh) * T + (Kth / tauTh) * u;
T += Ts * dTdt;
if (k % 100 == 0) {
System.out.printf("t = %.1f s, T = %.3f K, u = %.3f%n",
k * Ts, T, u);
}
}
}
}
For real hardware, T would be replaced by the measured
temperature deviation from the setpoint, and the computed
u would be converted into a PWM duty cycle or analog output
via a suitable interface.
10. MATLAB/Simulink Implementation
MATLAB with the Control System Toolbox and Simulink is a standard industrial environment for modeling and simulating thermal control systems. The script below constructs the transfer function, designs PI gains via the analytic formulas, and simulates the closed-loop step response.
% Thermal system parameters
tau_th = 300; % s
K_th = 5; % K per unit input
s = tf('s');
G_th = K_th / (tau_th * s + 1);
% Desired specs
zeta = 0.7;
Ts_des = 1200; % s
omega_n = 4 / (zeta * Ts_des);
% PI gains from matching
Kp = (2 * zeta * omega_n * tau_th - 1) / K_th;
Ki = (omega_n^2 * tau_th) / K_th;
% PI controller C(s) = Kp + Ki/s
C = Kp + Ki / s;
% Closed-loop
T_cl = feedback(C * G_th, 1);
figure;
step(T_cl, 0:10:4000);
grid on;
title('Closed-loop step response of thermal system with PI control');
ylabel('Temperature change [K]');
xlabel('Time [s]');
In Simulink, an equivalent model can be built using the following blocks:
- Sum block: reference minus temperature feedback (unity gain).
- Discrete-Time Integrator and Gain blocks to implement PI.
-
Transfer Fcn block for the thermal plant with
numerator
K_thand denominator[tau_th 1]. - Scope block to visualize
Delta T.
One can linearize more detailed nonlinear Simulink models (with
radiation, variable properties, etc.) around an operating point using
linmod or Simulink Control Design tools to obtain the
first-order linear model used here.
11. Wolfram Mathematica Implementation
Wolfram Mathematica provides symbolic and numeric tools for control. The
following code uses
TransferFunctionModel and
SystemsModelFeedbackConnect to construct and simulate the
PI-controlled thermal system.
(* Parameters *)
tauTh = 300.0;
Kth = 5.0;
zeta = 0.7;
TsDes = 1200.0;
omegaN = 4.0/(zeta*TsDes);
Kp = (2.0*zeta*omegaN*tauTh - 1.0)/Kth;
Ki = (omegaN^2*tauTh)/Kth;
(* Laplace variable *)
s = LaplaceTransform[Exp[-t], t, s] /. Exp[-t] -> 0; (* dummy construct for 's' symbol *)
s = Symbol["s"];
(* Thermal plant and PI controller *)
Gth = TransferFunctionModel[Kth/{tauTh*s + 1}, s];
C = TransferFunctionModel[(Kp*s + Ki)/s, s];
(* Closed-loop system with unity feedback *)
Tcl = SystemsModelFeedbackConnect[C*Gth];
(* Step response *)
tmax = 4000.0;
stepResp = OutputResponse[Tcl, UnitStep[t], {t, 0, tmax}];
Plot[Evaluate[stepResp], {t, 0, tmax},
AxesLabel -> {"time (s)", "Delta T (K)"},
PlotLegends -> {"Closed-loop step response"},
GridLines -> Automatic]
In more advanced workflows, Mathematica can be used symbolically to derive linearizations directly from nonlinear energy balance equations and to analyze sensitivity to parameter variations.
12. Problems and Solutions
Problem 1 (Deriving the Linearized Model): Starting from the nonlinear thermal model
\[ C_{\text{th}} \frac{\mathrm{d}T}{\mathrm{d}t} = \eta P_{\max} u - k_c (T - T_{\text{env}}) - \varepsilon \sigma A (T^4 - T_{\text{env}}^4), \]
derive the linearized small-signal model \( \frac{\mathrm{d} \Delta T}{\mathrm{d}t} = a \Delta T + b \Delta u \) around an equilibrium point \( (T_0, u_0) \), and show that \( a < 0 \).
Solution: Dividing both sides by \( C_{\text{th}} \) gives
\[ \frac{\mathrm{d}T}{\mathrm{d}t} = \frac{1}{C_{\text{th}}} \left[ \eta P_{\max} u - k_c (T - T_{\text{env}}) - \varepsilon \sigma A (T^4 - T_{\text{env}}^4) \right] = f(T,u). \]
At equilibrium, \( f(T_0,u_0) = 0 \). The partial derivatives are
\[ \frac{\partial f}{\partial u} = \frac{\eta P_{\max}}{C_{\text{th}}} \quad \Rightarrow \quad b = \frac{\eta P_{\max}}{C_{\text{th}}} > 0, \]
\[ \frac{\partial f}{\partial T} = \frac{1}{C_{\text{th}}} \left[ -k_c - 4 \varepsilon \sigma A T^3 \right] \quad \Rightarrow \quad a = \frac{1}{C_{\text{th}}} \left[ -k_c - 4 \varepsilon \sigma A T_0^3 \right]. \]
Since \( k_c > 0 \), \( \varepsilon \sigma A > 0 \), and \( C_{\text{th}} > 0 \), we have \( a < 0 \). Thus the linearized model is \( \frac{\mathrm{d} \Delta T}{\mathrm{d}t} = a \Delta T + b \Delta u \) with a stable open-loop thermal plant.
Problem 2 (Computing Thermal Time Constant and Gain): Suppose the identified parameters of the linearized model are \( C_{\text{th}} = 20\,000 \,\text{J/K} \), \( k_c + 4 \varepsilon \sigma A T_0^3 = 200 \,\text{W/K} \), and \( \eta P_{\max} = 1000 \,\text{W} \). Compute \( \tau_{\text{th}} \) and \( K_{\text{th}} \).
Solution: Using the formulas \( a = - (k_c + 4 \varepsilon \sigma A T_0^3) / C_{\text{th}} \) and \( b = \eta P_{\max} / C_{\text{th}} \), we obtain
\[ a = -\frac{200}{20\,000} = -0.01 \,\text{s}^{-1}, \qquad b = \frac{1000}{20\,000} = 0.05 \,\text{K/s}. \]
Thus
\[ \tau_{\text{th}} = -\frac{1}{a} = 100 \,\text{s}, \qquad K_{\text{th}} = -\frac{b}{a} = \frac{0.05}{0.01} = 5 \,\text{K}. \]
The thermal time constant is 100 seconds and the steady-state temperature change is 5 K per unit change in heater command.
Problem 3 (PI Gains from Desired Settling Time and Damping): A thermal plant has \( \tau_{\text{th}} = 200 \,\text{s} \) and \( K_{\text{th}} = 4 \). Design PI gains \( K_p \) and \( K_i \) such that \( \zeta = 0.8 \) and the approximate 2 % settling time \( T_s \approx 600 \,\text{s} \).
Solution: First compute \( \omega_n \) from \( T_s \approx 4 / (\zeta \omega_n) \):
\[ \omega_n \approx \frac{4}{\zeta T_s} = \frac{4}{0.8 \times 600} = \frac{4}{480} = \frac{1}{120} \approx 0.00833 \,\text{rad/s}. \]
The PI gains are
\[ K_p = \frac{2 \zeta \omega_n \tau_{\text{th}} - 1}{K_{\text{th}}}, \qquad K_i = \frac{\omega_n^2 \tau_{\text{th}}}{K_{\text{th}}}. \]
Numerically,
\[ 2 \zeta \omega_n \tau_{\text{th}} = 2 \times 0.8 \times 0.00833 \times 200 \approx 2.666, \]
\[ K_p \approx \frac{2.666 - 1}{4} = \frac{1.666}{4} \approx 0.4165, \]
\[ K_i = \frac{\omega_n^2 \tau_{\text{th}}}{K_{\text{th}}} \approx \frac{(0.00833)^2 \times 200}{4} \approx \frac{0.0139}{4} \approx 3.47 \times 10^{-3}. \]
Therefore a suitable design is \( K_p \approx 0.42 \) and \( K_i \approx 3.5 \times 10^{-3} \).
Problem 4 (Closed-Loop Stability Condition): Show that for the first-order thermal plant with PI controller, the closed-loop characteristic polynomial
\[ \tau_{\text{th}} s^2 + \bigl(1 + K_{\text{th}} K_p\bigr) s + K_{\text{th}} K_i \]
has roots with negative real parts if and only if \( K_{\text{th}} K_i > 0 \) and \( 1 + K_{\text{th}} K_p > 0 \).
Solution: A second-order real-coefficient polynomial \( \alpha_2 s^2 + \alpha_1 s + \alpha_0 \) has roots with negative real parts if and only if \( \alpha_2 > 0 \), \( \alpha_1 > 0 \), and \( \alpha_0 > 0 \) (Routh criterion for second order). Here
\[ \alpha_2 = \tau_{\text{th}} > 0,\quad \alpha_1 = 1 + K_{\text{th}} K_p,\quad \alpha_0 = K_{\text{th}} K_i. \]
Thus the necessary and sufficient conditions for closed-loop asymptotic stability are \( 1 + K_{\text{th}} K_p > 0 \) and \( K_{\text{th}} K_i > 0 \). Since \( K_{\text{th}} > 0 \), this reduces to \( K_i > 0 \) and \( K_p > -1/K_{\text{th}} \).
Problem 5 (Effect of Disturbances): Suppose a disturbance heat input \( \Delta q_{\text{dist}}(t) \) enters additively in the energy balance. Derive the transfer function from \( \Delta q_{\text{dist}}(s) \) to \( \Delta T(s) \) for the linearized open-loop plant, and explain qualitatively how the PI controller impacts disturbance rejection.
Solution: Including disturbance, the linearized equation is
\[ \frac{\mathrm{d} \Delta T}{\mathrm{d}t} = a \Delta T + b \Delta u + \frac{1}{C_{\text{th}}} \Delta q_{\text{dist}}(t). \]
Taking Laplace transforms with zero initial conditions,
\[ s \Delta T(s) = a \Delta T(s) + b \Delta U(s) + \frac{1}{C_{\text{th}}} \Delta Q_{\text{dist}}(s), \]
\[ \Delta T(s) = \frac{b}{s - a} \Delta U(s) + \frac{1}{C_{\text{th}} (s - a)} \Delta Q_{\text{dist}}(s). \]
The transfer function from disturbance to temperature is therefore
\[ G_{\text{dist}}(s) = \frac{\Delta T(s)}{\Delta Q_{\text{dist}}(s)} = \frac{1}{C_{\text{th}} (s - a)} = \frac{K_{\text{dist}}}{\tau_{\text{th}} s + 1}, \quad K_{\text{dist}} = \frac{1}{C_{\text{th}} (-a)}. \]
In closed loop with PI control, the sensitivity function \( S(s) = 1 / (1 + C(s) G_{\text{th}}(s)) \) multiplies this disturbance path, effectively attenuating low-frequency disturbances (where \( |S(j\omega)| \) is small due to high loop gain) while leaving high-frequency disturbances relatively less attenuated. The integral action ensures asymptotic rejection of constant disturbances.
13. Summary
In this lesson we modeled a thermal chamber using nonlinear energy balance equations and performed a local linearization around a chosen operating point. The resulting first-order linear system has parameters \( \tau_{\text{th}} \) and \( K_{\text{th}} \) that encapsulate the speed and gain of the thermal dynamics. We then designed a PI controller using a second-order closed-loop approximation, derived explicit formulas for \( K_p \) and \( K_i \) based on desired damping and settling time, and implemented the resulting closed loop in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica. These methods illustrate how classical linear control theory applies in an industrial thermal context while highlighting the role of linearization in bridging between nonlinear physics and linear design tools.
14. References
- Åström, K. J., & Bell, R. D. (2000). Drum-boiler dynamics and control. Automatica, 36(3), 363–378.
- Åström, K. J., & Hägglund, T. (1984). Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica, 20(5), 645–651.
- Henson, M. A., & Seborg, D. E. (1991). Nonlinear process control. Prentice Hall (chapters on linearization and thermal systems).
- Luyben, W. L. (1973). Derivation of transfer functions for highly nonlinear processes. Industrial & Engineering Chemistry Process Design and Development, 12(1), 11–18.
- Seborg, D. E., Edgar, T. F., Mellichamp, D. A., & Doyle, F. J. (2010). Process Dynamics and Control, 3rd ed. Wiley (sections on thermal process modeling and linearization).
- Skogestad, S. (2004). Simple analytic rules for model reduction and PID controller tuning. Journal of Process Control, 13(4), 291–309.
- Åström, K. J., & Murray, R. M. (2008). Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press (sections on process control and linearization).
- Goodwin, G. C., Graebe, S. F., & Salgado, M. E. (2001). Control System Design. Prentice Hall (chapters on process control and PI design).