Temperature Control Lab
ECE 365 – Control System
By: Connor Foley & Cole Hellman
Instructor: Dr. Nima Lotfi
Date Performed: April 29, 2026
Objective:
We are tasked with building a P controller design. We do so by adding an Integral term to
eliminate steady-state error. Then, we use the root locus to design the PI controller. Through
simulation of the closed-loop response, we verify our results for the TCLab hardware.
Part 1
Identified FOPDT parameters:
Kp = 0.75 °C / %
tau_p = 153 sec
Theta = 20 sec
T_ambient = 23°C
T_setpoint = 50°C
PART 2
We chose an integral time constant tau_I = 130. This was determined by setting tau_I to near
tau_p as stated in code. Then plotted our root locus after defining the PI controller transfer
function and the open loop transfer function (which the root locus was taken at).
Furthermore, we used control system designer to select a controller gain Kc. This gain was
found to be 5.49 which was well within the design requirements while being near our
damping ratio of 0.707. This value Kc, is our chosen proportional gain of PI controller.
Below is our calculated parameters:
This was done by setting specific design requirements within control system designer in
which a damping ratio represents the yellow region where the allowed poles are to be in
order to achieve that requirement.
PART 3
STUDENT TASK 4:
(a) Does the PI controller eliminate steady-state error? Why?
Yes, the PI controller eliminates steady-state error. The parameter Ki removes persistent
error while temperature reaches and stays at the setpoint (50°C) with no deviation.
(b) How does the settling time compare to the P controller (Lab 5)?
The PI controller has a shorter settling time compared to the P controller. It reaches the
setpoint more quickly without oscillations.
(c) Is there any overshoot? If so, estimate it from the plot.
There is a slight overshoot of approximately 2.64%. This was calculated through graph
measurements by taking the peak amplitude and settling time amplitude.
Part 4
Regarding the lines marked with (???) For student task part 5, we computed error with:
err(i)=T_setpoint – T1(i);
Which computes setpoint minus measurement. Next, we changed:
Q_unsat = Kc * err(i) + (Kc / tau_i) * integral_err;
Q1(i) = Kc * err(i) + (Kc / tau_I) * integral_err;
Within the graphs above, the PI-controlled TCLab shows the temperature rising smoothly from
about 25 °C to the 50 °C setpoint with little to no overshoot. The response approaches the
setpoint relatively quickly and then remains close to 50 °C with only small fluctuations. This
indicates a well-damped response with minimal overshoot and a reasonable settling time.
In the lower graph, the heater output initially jumps to 100% power to drive the temperature
upward, then rapidly decreases and stabilizes around 40–45% with minor oscillations. This
behavior shows an initial strong control effort to reach the setpoint efficiently, followed by
steady adjustments to maintain the desired temperature without significant oscillation.
STUDENT TASK 6:
(a) Did the PI controller eliminate steady-state error experimentally?
Yes, the experimental response which is in red eventually settles close to the 50°C setpoint.
This indicates that the PI controller eliminates the steady state error.
(b) How did overshoot and settling time compare to Lab 5 (P only)?
When comparing this experiment with the P-only controller, the PI controller showed less
overshoot and a longer settling time. Whereas the P-only had a slower response with slighlty
more overshoot but consistent oscillation across setpoint. Thus, the PI removed that error
where P introduced more oscillatory behavior.
(c) Did the experimental response match the simulation? Explain any
Discrepancies.
Not exactly. The simulation reaches the setpoint faster with slight overshoot, while the
experimental response is slower with little overshoot and small fluctuations. This difference
is due to real-world effects like noise, heat losses, and actuator limitations not captured in
the simulation.
(d) What role does tau_I play in the transient response?
We can see that tau_I affect how quickly the PI controller corrects errors. A smaller value
allows for faster error correction but may cause overshoot and oscillation. Whereas larger
values would slow down the correction and make the response smoother but slower.
(e) What is integrator windup and why does it occur in this system?
Integrator windup is when the integral term Ki keeps accumulating error while the heater is
saturated at 100%. It occurs in this system because early in the response the heater is maxed
out, so the integral builds up and causes a large overshoot and makes it slower to recover.
(f) Describe how the conditional integration method prevents windup.
Under what conditions is the integral NOT updated?
Conditional integration prevents windup by stopping the integral term from accumulating
error when the controller output is saturated and cannot respond further. This avoids
excessive buildup that would cause overshoot later. The integral is not updated when the
controller output is at its maximum or minimum limit.