Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Temperature PID closed loop

Status
Not open for further replies.

hapetter

Mechanical
Apr 12, 2002
28
Hi.

I have an application where i want to control the temperature in a room with a resistive load, Controlling the load with a PLC.

Ok so im going to use a powercontroller. The power controller takes 4-20mA and controls the load 0-100%. To be able to control the temerature due to a temperature reference, then Im going to use a closed loop PID control approach.

So I have a PLC, a temperature probe (PT100), and a powercontroller.

So I have some basic control question, starting with this:

The setpoint to PID is in degree Celsius. Lest say the setpoint is set to 30 degree Celsisus, then if actual value (temperature probe) is 30 degree celsius as well, then there is no error and the output of the PID is 30 (steady state). So how can I make this into a 4-20mA signal? If it is in steady state, then there should be no power, hence it should give 4mA to the powercontroller.

Thanks!

Best Regards
Hans
 
Replies continue below

Recommended for you

What is your problem?

Is it how to produce a 4-20 mA output?

Or is it a problem understanding how you can get an output at all when reference and actual values are the same?

Or something else?

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Your SW or the PID algorithm should be commanding zero output if no heat is needed, because the error is zero.

Why are you saying, "there is no error and the output of the PID is 30"?

Somewhere in your SW you have to convert the 0-100% result from the PID into 4-20mA output.

Keith Cress
kcress -
 
I have reread Hans' question. It is probably about the I part in the PID. Try this:

You need to adjust a hot water valve manually so that the mix of hot and cold water coming out of the faucet is at exactly 30 degrees. You have a thermometer showing the resulting temperature.

What you probably will do is turn on the hot water valve fully until your temperature gets close to 30 degrees (that 'turn on fully' corresponds to your D part). Whwen you are close to 30 degrees, you adjust the valve slowly so you reach exactly 30 derees (that is your I part). You now have zero error and a valve that is set to a suitable aperture. You are satisfied and there is no need to change the valve setting.

What keeps the output of your controller at a higher value than 4 mA is the I (integral) part of the controller. It is only when temperature gets too high that the I part is reduced so that the output is reduced. Or vice versa if the temperature gets too low. Or setpoint is changed.



Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Ok so a PID (block) is always giving 0-100% right? No matter what the set and the actual units are (degree Celsius in this case)

So if set = actual value = no error, the output is 0 right?

Then I could use the 0-100% output and scale it into 4-20mA on the analog 4-20mA output terminal.

I was confused because I have a demo closed loop PID sw program. It simulate the closed loop internaly in software. When I run this program I can see that when it is in steady state, then the output of PID = setpoint value. This is confusing as I thought is should be zero....

 
No, the output is very seldom zero when the setpoint is reached. The output stays at exactly what is needed to maintain the steady state at the setpoint value. You do not close the valve in the example I gave you - you just let it stay where you get the right temperature.

Another example: You drive a car and want it to run at 100 km/h. You then step on the pedal to reach that speed. When you have reached it - you do not take your foot off the pedal. You keep it in the position that makes your car run at 100 km/h.

The PID controller does exactly the same thing.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Thanks Skogsgurra. It makes things very clear.

BR
Hans P
 
Good. ICould I say 'Vel bekomme'?

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
I was confused because I have a demo closed loop PID sw program. It simulate the closed loop internaly in software. When I run this program I can see that when it is in steady state, then the output of PID = setpoint value. This is confusing as I thought is should be zero....
It depends on the system. An integrating system like position or level control this is true.

Non integrating systems like temperature and velocity control will go to steady state or ambient when the control output is 0. Therefore it is important to understand your system. Since you are doing a temperature control system the temperature will drop to ambient temperature when there is no control signal.


Peter Nachtwey
Delta Computer Systems
 
Quite. But, if the OP says PID, you must assume that that is what he is referring to and not a P or PD controller. Also, he states that the output stays at 30 (units) when the error is zero. That points to a PID controller with an active integral part.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Quite. But, if the OP says PID, you must assume that that is what he is referring to and not a P or PD controller.
It is clear the hapetter didn't understand that the integrator had wound up so that even if the error is zero there would still be a control output from the integrator term.

PLC people use PID blocks and say they are using a PID whether or not they are really using the derivative gain. Most PLC people don't know when they should use the derivative gain or why.

Hapetter asked the same question on but worded it slightly differently and added more detail.

Peter Nachtwey
Delta Computer Systems
 
I think that you are right there, too. PID has become such a generic word that you never know what's meant with it any more.

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
If I understand to the situation correctly, the OP is using a heating element to raise the temperature of a room. This implies that there is a heat loss from the room, which if the heating elements were not there, would cause the temperature in the room to drop. Therefore at a constant temperature, some heat must be produced by the heating elements to coujter the heat loss from the room. For this reason the output of the PID controller and the input into the powercontroller at steady state will not be zero.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor