Section 13.7 Modeling Systems with Piecewise Forcing
Many real-world systems experience forcing that changes abruptlyβswitches turn on and off, loads are applied and removed, and control systems activate at specific times. Piecewise forcing functions model these discontinuous inputs, and the Laplace transform with unit step functions provides an elegant solution method.
In this section, weβll model a temperature control system with intermittent heatingβa scenario found in thermostats, incubators, and industrial processes.
Subsection The Problem: Thermostat Control System
A room is heated by a system that turns on when temperature drops below a setpoint and off when it exceeds another setpoint. This on-off control creates a piecewise forcing function.
How does the room temperature evolve under this intermittent heating? Can we predict cycling behavior?
Subsection Assumptions
-
Room temperature is uniform (well-mixed air).
-
Heat loss to the outside is proportional to temperature difference (Newtonβs law of cooling).
-
The heater provides constant power when on.
-
Outside temperature remains constant.
-
No internal heat sources (people, appliances, sunlight).
Subsection Building the Model
Let \(T(t)\) be the room temperature (Β°C) at time \(t\) (minutes). The rate of temperature change is:
\begin{equation*}
C\frac{dT}{dt} = -k(T - T_{\text{out}}) + H(t)
\end{equation*}
where:
-
\(C\text{:}\) thermal capacity (J/Β°C)
-
\(k\text{:}\) heat loss coefficient (J/(minΒ·Β°C))
-
\(T_{\text{out}}\text{:}\) outside temperature (Β°C)
-
\(H(t)\text{:}\) heating rate (J/min), piecewise function
Simplifying by dividing by \(C\text{:}\)
\begin{equation*}
\frac{dT}{dt} = -\alpha(T - T_{\text{out}}) + h(t)
\end{equation*}
where \(\alpha = k/C\) and \(h(t) = H(t)/C\text{.}\)
Piecewise Heating Schedule:
Scenario 1: Single On-Off Cycle
Heater on for interval \([t_1, t_2]\text{:}\)
\begin{equation*}
h(t) = h_0[u(t-t_1) - u(t-t_2)]
\end{equation*}
Scenario 2: Periodic Cycling
Heater on for time \(T_{\text{on}}\text{,}\) off for time \(T_{\text{off}}\text{,}\) repeating:
\begin{equation*}
h(t) = h_0 \sum_{n=0}^{\infty} [u(t - nT) - u(t - nT - T_{\text{on}})]
\end{equation*}
where \(T = T_{\text{on}} + T_{\text{off}}\) is the period.
Parameters (Example):
-
\(\alpha = 0.05\) /min (time constant 20 min)
-
\(T_{\text{out}} = 5\)Β°C
-
\(h_0 = 2\)Β°C/min (heating rate)
-
\(T(0) = 15\)Β°C
Subsection Solution Using Laplace Transforms
The differential equation is:
\begin{equation*}
\frac{dT}{dt} + \alpha T = \alpha T_{\text{out}} + h_0[u(t) - u(t-10)]
\end{equation*}
Taking Laplace transform with \(T(0) = 15\text{:}\)
\begin{align*}
s\mathcal{L}\{T\} - 15 + \alpha\mathcal{L}\{T\} \amp = \frac{\alpha T_{\text{out}}}{s} + h_0\left(\frac{1}{s} - \frac{e^{-10s}}{s}\right) \\
\mathcal{L}\{T\} \amp = \frac{15}{s+\alpha} + \frac{\alpha T_{\text{out}}}{s(s+\alpha)} + \frac{h_0(1-e^{-10s})}{s(s+\alpha)}
\end{align*}
Using partial fractions and inverse transform yields:
\begin{equation*}
T(t) = \begin{cases}
T_{\text{out}} + (15-T_{\text{out}})e^{-\alpha t} + \frac{h_0}{\alpha}(1-e^{-\alpha t}) \amp 0 \leq t < 10 \\
\text{(different expression)} \amp t \geq 10
\end{cases}
\end{equation*}
Subsection Simulation Activity
Objective: Explore temperature dynamics under various control strategies.
Part 1: Single Heating Cycle
-
Simulate with parameters given above, heater on from \(t = 0\) to \(t = 30\) min.
-
Plot temperature versus time for 0-120 minutes.
-
What is the maximum temperature reached?
-
After the heater turns off, how long until temperature drops back to initial value?
Part 2: Bang-Bang Control
Implement a simple thermostat:
-
Turn heater ON when \(T < 18\)Β°C
-
Turn heater OFF when \(T > 22\)Β°C
-
Otherwise, maintain previous state
-
Simulate for 300 minutes starting at \(T(0) = 15\)Β°C.
-
Plot temperature and heater state (on/off) versus time.
-
Does the system reach a steady oscillation? If so, what are the period and amplitude?
-
What percentage of time is the heater on at steady state?
Part 3: Design Optimization
Desired: maintain temperature between 19Β°C and 21Β°C.
-
Test different heating rates: \(h_0 = 1, 2, 3\)Β°C/min.
-
For each, adjust the thermostat setpoints to minimize cycling frequency while staying in range.
-
Which design provides the most stable temperature with minimal cycling?
Subsection Experimental Activity (Optional)
Simple Home Experiment:
Materials:
-
Cup of hot water
-
Thermometer
-
Microwave or hot plate (for reheating)
-
Timer
Procedure:
-
Heat water to ~60Β°C and place in room temperature environment.
-
Record temperature every 2 minutes as it cools.
-
After 20 minutes, reheat briefly in microwave (10-20 seconds).
-
Continue temperature measurements.
-
Reheat again at 40 minutes.
Analysis:
-
Plot temperature versus time.
-
Identify the cooling time constant \(1/\alpha\) from the exponential decay segments.
-
Compare with a continuous heating model.
Subsection Analytical Questions
-
For a step heating input starting at \(t=0\text{,}\) find the steady-state temperature (as \(t \to \infty\)).
-
Show that after heating stops, the temperature decays exponentially toward \(T_{\text{out}}\text{.}\)
-
For periodic heating with period \(T\text{,}\) derive the steady-state maximum and minimum temperatures.
-
What is the optimal heating power \(h_0\) to maintain average temperature at 20Β°C with 10% duty cycle (heater on 10% of time)?
-
How does improving insulation (decreasing \(\alpha\)) affect cycling frequency?
Subsection Advanced Topic: Proportional Control
Instead of on-off control, use proportional heating:
\begin{equation*}
h(t) = K_p(T_{\text{set}} - T(t))
\end{equation*}
This gives:
\begin{equation*}
\frac{dT}{dt} = -(\alpha + K_p)T + \alpha T_{\text{out}} + K_p T_{\text{set}}
\end{equation*}
Tasks:
-
Solve this equation for \(T(t)\text{.}\)
-
Find the steady-state temperature.
-
Compare proportional control with bang-bang control: which is smoother? Which is more energy efficient?
Subsection Final Report
Submit a comprehensive report (4-5 pages) including:
-
Derivation of the thermal model with piecewise heating.
-
Solution using Laplace transforms for a single heating pulse.
-
Simulation results for single heating cycle with analysis of temperature evolution.
-
Bang-bang control simulation showing steady-state cycling behavior.
-
Design optimization results comparing different heating rates and setpoints.
-
If conducted, experimental data with parameter estimation.
-
Answers to all analytical questions.
-
Comparison of bang-bang versus proportional control strategies.
-
Discussion of practical applications (HVAC systems, ovens, incubators, greenhouses).
-
Recommendations for energy-efficient temperature control.
Piecewise forcing functions model the reality of intermittent controlβswitches, valves, and relays that turn on and off rather than operating continuously. The unit step function and Laplace transform provide powerful tools for analyzing these systems mathematically. Understanding how systems respond to discontinuous inputs is essential in control engineering, where trade-offs between stability, energy efficiency, and component wear must be balanced. The simple thermostat model illustrates principles that scale up to industrial process control, power grid management, and automated manufacturing.
You have attempted of activities on this page.
