Analog measurment fluctuating

NoName

Member
Join Date
Sep 2003
Location
Domžale
Posts
273
Hello all.
I'm useing a Simatic S7-313C-2 DP station, with an extra analog input module 8x AO's.

The situation:
I have 2 analog measurments that measure level of the gas in a gas tank. There are 2 ultrasonic level meters installed on the top of those 2 gas tanks, and in each gas tank is a ballon wich is inflated by the bio gas.

The problem:
When the outside temperature falls below 2°C the measurments start hoping all over the place... for instance the right level of the gas is 80% and then it falls to 30% back to 80%, to 45% and back to 80% <--- of the top of my head but it's a very similar patern. If tha outside temeperature is above 5°C the measurments are fine no deviation what so ever.

The whole automation process is based on these values beacouse there are certain limits to when the gas tank is being filled and when it starts to share it's gas with a gas generator wich makes electrical energy.
And when these fluctuations couse that sometimes the gas generator is left whitout gas and it stops. This must never happen.

The solution:
So I thought that I would calculate an average value of the measurment. Which wouldn't have those kind of fluctuations. But now what would be the best way to do this. With cyclic interupts(I'm allready useing it for PID regulation and is set to 50 ms), or is it possible to do it some other way...

I have also thought about that if the values falls below the limit it should be present at least 5seconds, before the valves start to open/close...


I hope I have explained it clearly...

Regards
Aleš
 
I don't know if this will help but you could try setting the smoothing for the analog input in the HW config. This will smooth the signal down and work somewhat like an average.
 
hello NoName;

First thing would be to look at your transmitters. Ultrasonic level transmitters can give you "false echoes" with not-quite-perfect mechanical installation which result in the same jumps that you mention. Also look at the data sheets of the transmitters; if the operating temperature is limited to a minmum of 0 degrees Celcius, you might be looking for trouble.
If you give us the transmitters' make and modules, someone here may have some experience with them.
Now, if you reaaly need to filter out the value jumps, you will need a way to descriminate between the "real" and the unacceptable values. your idea on excluding underlimit averages sounds good. Use a function to read the transmitter value every second, every 100 ms, or at any rate you find adequate (use a simple timer), sum the values over 5 seconds, and average them once your sample time is over. Send this value to the block that controls your vale if the average is "acceptable".
Hope this helps,
Daniel Chartier
 
Thanks for the input guys...

I'll try to calculate the average value as Daniel stated...and try how it will work in practice :D

Will try to implement it to the existig program on monday when I get back to the site...
 
Is the gas that the ultrasonic shoots through wet? Generally, condensing moisture and ultrasonics don't mix well.

It could be that the temperature is dropping below the dewpoint of the water vapor in the gas at the less than 2°-3°C temperature and the ultrasonic unit might not be dealing with the resulting fog or condensation on the transducer.

Some transducers "ping" with enough energy to blow the moisture off the transducer face, others don't. Fog absorbs most frequencies of ultrasonics to some degree or another, which would diminish the echo signal causing false readings.

Most commercial ultrasonics ping at 1 second rates or less, even slower with some 2 wire loop powered transmitters, so sampling faster than the ultrasonic update rate won't buy you anything, except even more 'noise'.

What's the ultrasonic shot distance and what's the gas? Methane? generated from waste? Does it run through a drier?

Dan
 
Simple Practical Filter

In addition to the hardware filter that you can set up
for S7 analogue modules.

You can create a very simple but very effective filter
that requires just two additional variables.
1. The stored filtered value
2. The filter factor (percentage of new value to use)

For example if the filter factor is 20 (%)
Multiply the new data by 20.
Multiply the stored filtered value by 100 - 20 (80%).
Add these two values.
Divide by 100.
Update the stored filtered value.

Simply adjust the filter factor as required to get as
much or as little filtering as you require.
 

Similar Topics

Good afternoon, I am currently working with an HMI/PLC LP-a070 and I require at least one analog output, but the PLC does not have one. I was...
Replies
5
Views
113
Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
127
I'm having trouble calming down 2 Tempo Sonics. I'm using Studio 5000 CompactLogix my Raw value is jumping around from 8575.0 to 8755.0 at a...
Replies
30
Views
1,137
I cannot add SLC500 analog input tag (I: 8.3) to EZSeries Touch Panel Editor (V 5.3). I used all the listed tag datatype but it all says "Invalid...
Replies
10
Views
258
Hi, I have questions. I have Analog Input that need to put into Ignition Designer. But I don't know how to put?
Replies
1
Views
119
Back
Top Bottom