Sensor Averaging for PID loop

Hutchman

Member
Join Date
May 2004
Posts
1
Hello All,

I have a PID loop on a PLC 5/80E PLC that I have been using to control room temperature. Just recently, they've installed a 2nd temperature transmitter at the opposing end of the room.
So what I want to do is average the (2) temperature values as my PV for the loop. The problem is that the (2) transmitters have different ranges (ie; -18 to 38 C and -29 to 60 C). I'm thinking about averaging the (2) and/or automatically switching to one tx if the other fails. But I think to do this, I have to change the Engineering Units Min/Max of the PID loop every time that I switch transmitters.

Example:
Tx1 , PID Range = -18 to 38 C
Tx2, PID Range = -29 to 60 c
Averaging, PID Range = 0 to 100 C

Is there a better way of doing this?
 
Your analog values will be scaled differently to get into engineering units, but once you are in engineering units, it shouldn't matter which transmitter you are using (either or both).

The only trick is to make that conversion (your setpoint too), and use the converted values to feed your PID.

Marc
 
The PLC5 analog i/o cards have scaling built into the cards.
If these are not set, they will have default ranges 0-4095. You can set the scaling range to anything between -9999 and +9999.
Some people are not avare of this feature and use the 0-4095 default range in their programs.
 
Further to PLC5 analog cards, a PLC5 program will work if you haven't configured the I/O BUT if you configure the I/O then the analog configuration diaglog becomes available by double-clicking on the BTW or BTR block "setup screen" for the module then all the scaling becomes easy. So if you double click on "setup screen" and get the error message, configure the I/O and try again. But be careful as it will ask to enter ladder logic for you and designate data files for you. This is OK if you are writing a new program but can be a problem in an existing program.
 
Hutchman,
Having done this with both temperature and pressure controls in clean-room enviroments, the easiest way I know of, is to scale the raw data as soon as it is read into the PLC from the analog card by the BTR function. Make all scaling match so you are dealing with "apple to apples" with only 1 PID control, (not 2 as indicated by your example).
Then the averaging is straight forward. An issue you will run into is when you switch to either transmitter, depending on their location in relationship to the air return and supply vents, you may have to use diferent tuning parameters for the PID.
I would suggest you plan on having 3 sets of PID tuning parameters, (1 for each condition), when you write your code so that you don't have to create them on the fly when you start debuging the system. If you find that you don't need them, just set their values the same. This allows for simply moving in the correct parameters based on which conditional control is active (tx1, tx2, average).

Another thing to watch for when you create the averaging logic is what condition will cause a transmitter reading to be considered bad. Also, if the error between the 2 gets to be greater than X value, which transmitter do you consider correct for auto control?
 
Temperature control

Hi,
I have to control temperature into a Greenhouse, the heating system
is into floor.
I think to develope a system with PLC 300, with 2 PID controls in cascade, 1 to control the greenhouse internal temperature and
another one to control water temperature.

The problem that I have is to find formulas or relations between:
External temperature, Internal temperaturer, Lux values,.....

Is anybody here that have experience with this systems to help me.

I will apreciate a lot...

Alex.
 

Similar Topics

Hello All, I have a PID loop on a PLC 5/80E PLC that I have been using to control room temperature. Just recently, they've installed a 2nd...
Replies
1
Views
7,095
Hi, I have a bit of PLC experience in Siemens and have unfortunately been blessed with working on Automation Studio and B&R which has been a big...
Replies
5
Views
1,353
Maybe a stretch to call this a PLC question, but it does connect to a PLC input. I have two German switches: Sick WL9LG-3P2232 And a...
Replies
0
Views
103
Hi, Need help with coding for a faulty component sensor which we are using a push button as we are using a test rig. the plc is a allen bradley...
Replies
4
Views
197
Hi all, I am implementing an incremental encoder sensor (ABZ) to replace the existing "manual" encoder wheel I have in my device. This is a 360...
Replies
0
Views
154
Back
Top Bottom