I am new to the forum, hopefully you can help :)

I am a software engineer trying to put together a control system. My controls background is not strong, I have really only tuned PID loops via trial and error - understand the concepts but not the theory or practice.

Here it goes...

I have a temperature control system where constantly moving fluid must be heated via heat exchanger to keep a process chamber at constant temperature. Find a simple diagram of the system here: https://www.dropbox.com/s/5f784pexc1z1w08/Tank%20Chamber%20Temp%20control.png?dl=0

  1. Fluid enters from reservoir at ambient temperature (20-26 deg C).
  2. Hose passes through a peristaltic pump that can operate from 50 to 400 mL per min.
  3. The fluid passes through a heat-exchanger in a heated water bath ("Tank"). The tank is about 750 mL and heat-exchanger is about 1.5m in length. The Tank temperature is controlled by a "Heater Output" signal (0-100% PWM) and has a "Tank Temp" sensor
  4. Out of the Tank heat exchanger, the fluid flows through a section of about 20" of hose, outfitted with an "Infrared Temp" sensor to the "Chamber".
  5. The Chamber is about 400 mL in volume, insulated, and where the experiment is taking place. "Chamber Temp" is the ultimate process variable we are trying to control. It should stay at the "Chamber SP", typically 37 deg C +/- 0.5 deg C, with a critical limit of never going above 37.5 deg C. This set point of 37 can be set anywhere between 30 and 37 deg C.

The "experiments" are expected to have a warm-up time, then can run anywhere from 30-90 minutes, keeping Chamber Temp at the Chamber SP.

Right now we have a PID-based control process running. There are two stages:

(1) Warm Up - Here, we use the Tank Temp as the process variable and warm up the tank to somewhere near the Chamber SP. Through experimentation, we have found the dead time (time to see any change in PV, when MV is changed) is about 150 seconds. And the time constant is much greater - it takes about 800 seconds to stabilize from 34 deg C to 37 deg C. This stage is relatively straight forward and we can tune a PID loop to keep the tank at a certain SP when pump is off and everything is static...

(2) Chamber Control - Here, is where things get more complicated. When the pump starts running, fluid passes through the water bath, through the Infrared Temp sensor, then in to the Chamber. The goal is to control the Chamber Temp by controlling the Heater Output of the Tank. It has been a challenge to tune the PID loop, as the pump may be at different rates, the tank may be warmer or cooler than the Chamber, and it takes soo long for a change in Heater Output to affect the Chamber Temp. due to the mass of the Tank, time lag, and mass of the Chamber.

My question is around the Chamber Control stage described above: - Is PID appropriate here? It is VERY slow, long delays, and hard to tune.

  • Is it best to have one loop using Chamber Temp to manipulate Heater Output? Or to have two "stacked" or cascaded loops where one can observe the Chamber Temp to set a desired Infrared Temp, then a second to use the Heater Output to control Infrared Temp? Or even three? PV-MV

    1. Chamber Temp - Infrared Temp
    2. Infrared Temp - Tank Temp
    3. Tank Temp - Heater Output
  • Is there a way I can characterize the system more quantifiably to help tune the loop or give you guys more information?

Thanks, Peter


3 Answers 3


In a former life, I designed and built automated test stands for engineered fluid handling components and systems. PID control is the way to go, I always started with a manual method and tweaked later and of course we did plenty of system testing to validate before turning the thing loose.

I'd stick with one active PID loop at a time, though depending in the state of your system, you might switch between them. Say one for warmup and another for operation.

I think you're going to have a hard time with the system as it's set up now, I have some questions you might consider.

  • Is there a reason the fluid circuit is open loop?
  • could you recirculate?
  • could you have a bypass loop and when ready to run, simply switch a valve?
  • \$\begingroup\$ Thanks! During operation, fluid must be "open loop" as it is a consummable where once it passes through the Chamber it is dirty and to be discarded. There are a few valves now that do allow "closed loop" with re-circulation during warm up... With some of the latest thinking and reading I have been doing, I am thinking a cascaded system of 3 control loops may be most appropriate: (1) the top-level loop will measure Chamber Temp and provide the Infrared Temp Setpoint (kind of like touching the bath water and changing the faucet temperature to change the temp of the whole bath), then (2) \$\endgroup\$ Commented Aug 8, 2015 at 21:29
  • \$\begingroup\$ (ran out of characters)... (2) Control the Infrared Temp by setting the Tank Temp Setpoint (this is like an inline heater, control the output temp by controlling the temp of the heater), and (3) Control the Tank Temp via the PWM heater... What do you think? I know it gets slightly more complicated, but I feel like it would be hard to control for all of those variables with one loop... Thoughts? \$\endgroup\$ Commented Aug 8, 2015 at 21:33
  • \$\begingroup\$ That would work, but rather than continuously bringing in cold fluid to the system, I would rather have a larger reservoir, and use it to pre-heat the fluid to operating temperature along with a circulating bypass with the valve close to the chamber. One of the biggest problems I've had with initial temperature stabilization in systems I've built is heat loss to the plumbing and fixtures when switching from cold to hot operation. The fluid has to heat all of that material up to equilibrium temperature. \$\endgroup\$
    – DLS3141
    Commented Aug 10, 2015 at 12:24

PID is the basic concept about regulation, so yes it is the way to go if you want to regulate. There is 2 ways to tune your PIDS.

First, you can try to tune your pids with manual method. There is plenty of manual method to tune PID. There is the Ziegler–Nichols method for instance.

On second hand, you could characterize your system. But it won't be trivial. You will need knownledge in thermodynamics for the heat part and mechanic fluid for the chamber. At this point, you could try to tune your PID ,but still the rate at which you move liquid between chamber will affect your temperature .

  • \$\begingroup\$ Thank you! I will review the ZN mehtod you linked. What about the idea of a single loop vs. 2 or 3 cascaded loops? \$\endgroup\$ Commented Aug 7, 2015 at 16:24

The problem with this kind of system is the delay. You would like to do some feedforward of input conditions. There are ways to take into account both the variable temperature of inflow and the varying flow but it is not easy to get it right.

My suggestion though is to add a mixer, mixing cold and hot fluid "to taste". The tank would be slightly hotter than your set point and would be regulated with a single PID loop. The mixer with a different PID loop.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.