Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PID temperature control 1

Status
Not open for further replies.

OperaHouse

Electrical
Jun 15, 2003
1,379
0
0
US
A friends race car engine has a dry oil sump and he wanted me to built a "babysitter" temperature controller for the tank to keep the temperature up between runs. I bought a cheap PID controller to drive a SSR into two 500W heaters. Initial test was with 4 gallons of oil using factory settings on the controller just to see how long it took to warm up and if the heaters boiled the oil. It took about 40 minutes and temperature would overshoot about 9 degrees, P=3, I=240 D=off. Thermally it is complicated. Sensor measures skin of the tank which is 18 degrees colder than the 180F of the oil and it is located close to one of the two heaters. The tank is heavily baffled. The good part is it only has to compensate for thermal loss of the uninsulated tank, about 5 minutes per degree drop.

I was convinced the miracle software of auto tune would get this to a fraction of a degree. A few days later auto tune came up with P=.9 I=276 D=69. Don't remember exact overshoot, but it seemed large and it was clear it would never be stable. From what I had gleaned the numbers should be lower with a large thermal mass, D wasn't used that often and from first test that a large I seemed to be a problem. Better to deal with just two variables. Just plain ran out of time and final numbers were P=.8 I=36 D=off. It will drop 1 degree below set point and overshoot two degrees. Bothered that at 1 degree over set it is still proportionally pumping in some heat.

They are thrilled at how it works as their main concern is boiling the oil. This is my first experience with a PID temperature controller. For me auto tune was a great disappointment. Just playing with the numbers took hours and there appeared no obvious correlation between stability and overshoot. I probably only get one more shot at this till next November. If I could have charted it out, the numbers might have made some sense. From your experience, what would be the number to change the next time and are there general rules?

 
Replies continue below

Recommended for you

That was weird. I had used a double $ in the two places where I now have a single $. That double $ was treated as some oddball control character. Looks like it's fixed now.
 
From a Mechy standpoint, there are two limits, one is "provide enough input heat to keep the oil at x degrees plus or minus y degrees", and a second limit is "keep the heat flux at the heater-oil interface low enough that boiling of the oil (or any decomposition) is minimized".

That second one hasn't been discussed yet, and may not be an issue. If I was worried, I'd run a bench test of the heater, immersed in oil, and perhaps with a good thermocouple spotwelded to its surface, to find out if the heat flux problem is a big one or not - if boiling/overtemp occurs, then I'd start using a fixed PWM to drive the heater, until the surface temperature was below my safe limit.

The first problem is what has been discussed already. Any chance of worming a few thermocouples (or other sensors) down into the pan, to better find the temperature distribution?
 
Looking back, one can read that the OP in his OP says: "It will drop 1 degree below set point and overshoot two degrees. Bothered that at 1 degree over set it is still proportionally pumping in some heat"

First, I still think that that is an excellent result. At least with the conditions given.
And second, there is no extra heat being pumped in. If you look at the duty cycle, you will probably notice that the OFF period is twice the ON period. So the net heat added to the sump when heat is ON corresponds exactly to the heat lost during the OFF period. Try to reduce heat from 500 W to 250 W and the duty cycle will probably be close to 50% and the temperature variation will be 1 degree down and one degree up from set-point.


Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
I noticed that also.
"Bothered that at 1 degree over set it is still proportionally pumping in some heat" -- That's the P in PID.
A simple example of "P";
We are measuring temperature over a span of 100 degrees. (0 to 100). P is 3% setpoint is 50 degrees.
When the sensor sees 50 degrees the heat will be off.
When the sensor sees 47 degrees the heat input will be 100%
Proportional control.
With 1.5 degrees of offset, the temperature at 50% heat loss will be 50 degrees. There will be a decreasing amount of heat added until the temperature reaches 51.5 degrees.
Without offset, the steady state temperature may be between 47 degrees and 50 degrees depending on the heat loss.
But the I will be seeing some error and adding offset to correct the error.
The D will be seeing a rapid rate of change and adjusting the set point to compensate.
Remember that you are measuring the external surface temperature and so that is what you are controlling. You can control the surface temperature much easier if you attach strip heaters to the surface and heat it directly.
So when you have strip heaters on the outside of the tank and almost perfect control, what is the temperature of the oil?
Tough love may suggest that perfect control of the oil temperature with this setup is more an exercise in self delusion than an engineering solution.

Bill
--------------------
"Why not the best?"
Jimmy Carter
 
My interest is almost purely academic. This tank will only operate only about minutes between races and will unlikely ever reach stability due to long thermal lag. I think it works quite well for an $18 controller, but I think it doesn't has enough bits to make really good decisions. It has an undocumented screen that displays duty cycle. When stable it is approximately 25% or a heat loss of about 250W.

I understand the theory, in practice it is quite a time waster. Just looking for a practical way to get to the values as quickly as possible. Data recording was inconsistent and changes weren't obvious. Without running something like a chart recorder it is hard to see changes when the thermal lag is so long. There have to be some tricks to get values faster. Saying turn up P as high as you can get it gives some insight, but what characteristic says too much. That can
only come with observing the system. I have a FUJI PXW series that will be bread-boarded with an aluminum bar with less thermal lag as a trainer when I get some time. I'm three weeks from leaving to my summer place for five months that is totally off grid, the wife has me painting the house now and I just cut down five trees yesterday that will take a week to dispose of. The oil heater is a done deal, at least till maybe they make the 4 inch deep aluminum pipe plug for the sensor this winter.

The center of the tank measures a fairly stable 180 degrees measured with a long probe. Their gold standard is a liquid filled water temperature gauge. Just knowing that others have a low opinion of auto tune has been helpful. Looking forward to playing around with the test fixture and gaining some experience. I have been unsuccessful in explaining my core thoughts. Honestly, the apparently good results were made with almost random values and I find that disturbing.
 
What kind of control is it exactly? I'm thinking PWM to the SSR giving either phase angle or cycle to cycle control. But, you never actually posted it.

I would crank up the P term until it oscillates and set P to about 1/2 of that. Then, add a little I to get it to reach the setpoint without overshoot. I'm thinking that the slow temperature change response mean you want very little integrator. Finally, add some D to the mix to get a better response time.

My guess would be that the continued adding of heat at 1 degree over setpoint is integrator wind-up.

Bill, I've never seen the P term of a PID described like that. A P only controller has an offset (it must have an offset to reach the setpoint) but it seems to me that a typical PID controller doesn't have an offset on the P term. In the PID controls I have seen, P is just a multiplier applied to the error that is added to the output. For example, P of .75 means an error of 100% adds 75% to the controller output.

Did the controller come with a diagram of the PID loop so you can determine what the PID loop is doing or what the terms mean? For example is a P of 3 multiplying by 3 or is there a fixed divider of some sort in P path of the controller.

 
I see Bill's interpretation all the time on stand-alone PID controllers. One can watch the output change just like the graph below shows with a controlled input
(with I and D turned off).

A 3% PB is a little tight to illustrate the Proportional band (PB), so the graph below shows a 10% PB with the modulating range, the range below the PB at 100% output (reverse action) and the range above the PB at 0 % output.

Graph_10_percent_PB_modulation_range.jpg
 
Manual, you get one sheet of paper and that is for several models. These are not phase triggered, they stay on for a period of time (in my case up to 40 seconds). It does have the HYS set to 1. One setting had a very stable temperature at one degree over the set. I figured that was too much I. This is the unit As I said before it does not have the scale correction indicated in the instructions so the range is 0-1200. Even if it corrects for K input that is still 0-800. Not a lot of bits will change around 180. They had to strip something out to get it to that price. I've used the FUJI and seem to remember you could do something with the scale. I used them only for alarm limits on a welding gas mixer. Used they were a cheap way to go and used as a voltage monitor.
 
Thanks danw2. That is exactly what I was trying to explain.
An almost universal governor setting for the proportional controllers on virtually all diesel generators is 3% droop.
Think of that as 3% proportional band plus 3% offset.
At no load the frequency is 61.8 Hz. At full load the frequency is 60 Hz. At any frequency below 61.8 Hz the governor is supplying fuel to the engine. (In addition to the fuel needed to keep the generator turning at the correct speed with no load.)
If this was a simple proportional setting the governor would be set at 60 Hz and the frequency would drop to 58.2 Hz at full load.
Motors and transformers are much happier with a frequency range of 60 Hz to 61.8 Hz than they would be with a frequency range of 58.2 Hz to 60 Hz.
This is due to the Hertz per Volt ratios and magnetic saturation at below rated frequency.
Droop is a variation of proportional control.
Back to the original issue.
I suggest that our time may be better spent suggesting better locations for the placement of the temperature sensor so as to allow closer control.
As understand your arrangement you are controlling the temperature of the outside skin of the oil tank. If you are concerned with 1 and 2 degree errors in the outside skin temperature, you may be horrified to see a chart of the actual oil temperature in different locations in the baffled tank.
Suggestions:
Temperature sensor location.
Issues: The lowest temperature is important. You don't want a slug of oil below the desired temperature entering the lubrication stream from a section of the tank that has not reached the proper temperature due to the baffles.
Highest temperature. You don't want the oil boiling or fractionating off the lighter fractions.
Heat sources. You may consider adding more heaters.
A circulating pump, properly applied, may go far to mitigating uneven temperatures.
Any other suggestions as to how to arrange the system so that we are actually controlling the temperature of the oil directly and mitigating issues with uneven heating?

Bill
--------------------
"Why not the best?"
Jimmy Carter
 
Status
Not open for further replies.
Back
Top