0
\$\begingroup\$

I have a 120V PID with an internal relay (output rating of 5A) using a K type TC. The plant is a 275W band heater wrapping a cup, attempting to maintain a set temperature.

A substance is added to the cup at varying time intervals and is boiled off. Then the heater brings the cup back to the set temperature, but because the cup is empty during this process there is a lot of overshoot.

Is a PID of any value in this situation or would an on/off function provide the same service?

Everyone reading this is smarter than I am in this subject, so please help me out. It appears to me that though this product is traditionally using a PID, since there is no time constant to filling the cup and no constant as to what is in the cup, that a PID is of no use. Am I thinking correctly?

\$\endgroup\$
5
  • \$\begingroup\$ Sounds like the PID is not set-up correctly if there's a lot of overshoot. \$\endgroup\$ – Andy aka Feb 7 at 15:16
  • \$\begingroup\$ If thermal mass is changing (e.g. -80%) due to boiling off, it could be tricky, the control would need a lot of stability margin, be way overdamped (slow) and prob. rate limits. Is adding thermal mass an option? Might be the easier fix. \$\endgroup\$ – Pete W Feb 7 at 15:20
  • 2
    \$\begingroup\$ Probably, a PID would generally overshoot in this scenario because Tset would be something slightly above the boiling point. While the liquid is boiling, the PID will not be able to reach the set point and the I term will keep growing. \$\endgroup\$ – Sim Son Feb 7 at 17:48
  • 1
    \$\begingroup\$ In the boiling state you don't need any control at all, the tempersture will be stable at the boiling temperature no matter how much power/heat you add to the system and PIDs generally won't handle this unsteadiness in my opinion \$\endgroup\$ – Sim Son Feb 7 at 17:50
  • \$\begingroup\$ A PID with a mechanical relay for this application would have quite a short life :D by definition a PID has a continuous output while a relay is on-off. So it's emulated with some kind of modulation (pwm, mostly). What is the modulation period/cycle time of your controller? If it's not way smaller than your process time you aren't using a pid but something way cruder. As other said your process is quite non-linear so overdamping could be a useful option. Plot the plant evolution and decide on that \$\endgroup\$ – Lorenzo Marcantonio Feb 7 at 19:19
1
\$\begingroup\$

The "PID" in a PID controller is named for proportional, integral, derivative feedback sources. As @Simson points out, when boiling a liquid, energy must be added to the system when the boiling point is reached, so the "set point" is not attained while boiling.

A proportional-only (P) controller has has an output that is proportional to the "error," or difference between the set point and the actual temperature, which means that that a difference must always exist for there to be an output - a problem in most applications, but in your case desirable, since you will never reach the set point while boiling.

In most applications, the integral term is used to eliminate this error by adding to the output so that the output reaches the target point and the error goes to zero. In your case, this integral contribution would continue to grow and the energy to your heater would continue to increase while boiling because the error would remain, as it will not be possible to reach the target until the liquid is boiled off.

The differential term measures the rate of change of the error, and is used to control how quickly the error is reduced. In your case, the temperature can change more rapidly when the cup is empty and the specific heat is lower, so the "D" term will allow you to adjust how much energy is applied under the varying condition of a full, half-full or empty cup.

Since you want to maintain constant output when you are below your set point (while you are boiling) and you want to control the rate at which your cup temperature increases to limit overshoot, you want a "PD" controller, or a PID controller in which the "I" term is zero. Your set point must be set above the boiling point and you will first choose a "P" term that provides the desired output power level while boiling. Then you can increase the "D" term, allowing you to control your rate of temperature rise and reduce overshoot in the varying conditions.

The "P" term in your PID means that the output current is directly proportional to the difference between the measured temperature and your set point. This means that when you are cold (farther away from your set point) more output current is supplied, and this value decreases as you get closer to your set point. With "P" only, you can never stabilize at your set point because then your error would be zero, and your output would be zero, so you would cool down. You will stabilize at a temperature lower than your set point.

Your PID controller may have an internal relay. The controller does not actually change the current supplied to the heating element; instead it changes the duty cycle of application of power. If you are running a solid state relay, there are no internal components to wear out, so you can run at a relatively high frequency; for instance, a 50% duty cycle could be one second on, one second off. When using a mechanical relay it is common to increase the switching period to reduce the number of making and breaking contacts. The same 50% duty cycle might be 30 seconds on, 30 seconds off. The reduction in wear on the relay is achieved, but the cost is that the temperature will dither around the set point.

Most modern PID controllers have a "learning" feature, which can be used to allow the oven to automatically arrive at a set of PID constants. These algorithms depend on a smooth thermal time constant and heat loss function, which your system will not have. You will have to disable the learning feature or your controller will change its PID constants and you'll have overshoot again.

So in your case, start with the both the "I" and "D" constants at zero, and put your set point above your boiling point by 10 degrees or so. When your system hits the boiling point, the temperature will be constant. The error will be constant, and you will be adding a constant power to the system. Adjust the "P" constant and/or the set point until you are happy with the rate of boiling off your liquid. Don't put your set point too high above your boiling point, because once your liquid is boiled off, the system will head towards this value.

Now you can adjust your "D" constant. This constant measures the derivative (how fast the temperature is changing) and provides negative feedback to "slow it down" when it is moving quickly. When you reach your boiling point, your temperature will not be changing, so the derivative will be zero and the contribution from this constant will also be zero. So, the system will behave exactly the same way at the boiling point as it did when the "D" constant was zero. However, when your liquid is boiled off, the temperature will start to rise, and the magnitude of the derivative will increase. The feedback contribution from "D" will act as a "brake" and slow the rate of increase. Adjust this value until you get what you want. Note that making this value large will also tend to increase the time required to heat your system up from a cold state, but you can certainly reduce the overshoot.

Good luck!

\$\endgroup\$
10
  • \$\begingroup\$ Thank you John, You have explained this to the point that I almost grasp it. In my mind I was thinking that the relay was either open or closed (full power or no power to the band heater. Now I'm thinking that the controller is changing the amount of amperage supplied the band till it reaches temperature and then power is off. Can you help me understand the relay setting? the Inkbird instructions tell me that if using a SSR the setting should be 1 but when using the built in relay set it to 18 to prolong life but gives no information on what is changing with the different setting. \$\endgroup\$ – Bruce Hovey Feb 10 at 23:01
  • \$\begingroup\$ I assumed it's length of time the contact remains open/closed but if the PID is varying the amperage to the band why wouldn't the relay remain closed? Sorry my understanding is so basic but my background is mechanical and electrical not electronics which is way different than flipping a switch and figuring loads. \$\endgroup\$ – Bruce Hovey Feb 10 at 23:01
  • \$\begingroup\$ I understand what you are telling me about the PID but can you address what the numbers mean? I know you're telling me to turn off the "I" so I will set that at "0". D I start the "P" at "1"? I attempted to have it auto calibrate 4 time today by running it through the cycle till it set the PID and the setting was always quite different. 1st 1-8-2, 2nd 2/10/2,3rd 37-3-0 and 4th 50/30/8 but I had to end this last because after 20 runs through it still hadn't set. \$\endgroup\$ – Bruce Hovey Feb 10 at 23:08
  • \$\begingroup\$ Shall I start the settings at 1-0-1 and go from there or do you have a better suggestion. Again thank you so much for you help. I set it back to the on/off setting eliminating the PID all together (or at least that's what I think is happening) instructions could be much better. \$\endgroup\$ – Bruce Hovey Feb 10 at 23:10
  • \$\begingroup\$ Hi Bruce, I got too long-winded so I just edited my answer. \$\endgroup\$ – John Birckhead Feb 11 at 2:54
0
\$\begingroup\$

If I had to do it with a single loop, I would be inclined to try controlling the temperature of the container, rather than the liquid. This still leaves the problem of the variable thermal mass.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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