4-20mA pressure transducer jitter/noise

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
Hello, I'm working with a PLC reading a basic 4-20mA 0-100 PSI water pressure sensor which is used to measure an elevated water tower tank level. The working range is between 45-52 PSI for our application, which yields a tank level of between ~20 and ~34 feet. My conversion formula is ((PSI * 27.71) / 12) - 89.9.

I'm noticing that the 4-20mA module's reading is quite jittery. It can change by more than +/-0.5 to 1 PSI per sample. This could be either the transducer output or inaccuracies in the ADC.

The PLC normally reads the analog input at approximately 40Hz. However, for this application, I am only sampling the input every 500 mS.

Obviously even a 0.1 PSI change causes approx 0.2 FT level change. However, the actual tank level usually changes very slowly and smoothly based on usage (i.e. 10-15 minutes per foot).

I want to output a very smooth value, accurate to 0.1 FT, which smoothly transitions from one tenth to the next, accurately representing the actual level changes.

I'm using a very basic CLICK PLC, which doesn't have fancy filtering instructions. I have implemented a sample rate of 500mS, and have applied a moving average low-pass filter three times (is that equivalent to "third order"?) and this seems to help a lot. However, I still see a small amount of jitter on the final filtered output, meaning the value can jump from 25.7 to 25.5 then 25.8, 25.6 etc... over a few samples.

Should I just increase the filtering by another order? or is there something else I should also implement?

Thanks for any advice!
 
It sounds like you are doing an average, not a first order filter, but I may have misunderstood.

Try an adjustable first order filter:

http://www.plctalk.net/qanda/showpost.php?p=298656&postcount=4

The example is for a RSLogix5000 project, but the Click Math instruction can do the same thing. You should condition the rung to run on a rising edge transition of a relatively fast clock, like 100ms, or 500ms, and then set your filter constant ("C" in the example) to a value like 0.1 and see how it responds.

I can't remember if charting is available in the Click software, but if it is, plot the raw calculation against the filtered value and adjust C to a higher or lower value until you find the result you like best.
 
Thanks for your fast reply!

The filter I'm using is the Exponential Weighted Moving Average, defined as follows:
Variables:
K = constant between 0 and 1
yP= previous filtered output
X = Raw input from ADC
Y = filtered output

Step 1: Y = (yP * K) + ((1-K) * X)
Step 2: yP = Y

I'm applying this filter three times in succession. I'm sampling at 500mS.

Can you also explain what the different filter orders mean?


It sounds like you are doing an average, not a first order filter, but I may have misunderstood.

Try an adjustable first order filter:

http://www.plctalk.net/qanda/showpost.php?p=298656&postcount=4

The example is for a RSLogix5000 project, but the Click Math instruction can do the same thing. You should condition the rung to run on a rising edge transition of a relatively fast clock, like 100ms, or 500ms, and then set your filter constant ("C" in the example) to a value like 0.1 and see how it responds.

I can't remember if charting is available in the Click software, but if it is, plot the raw calculation against the filtered value and adjust C to a higher or lower value until you find the result you like best.
 
ryanG, that is identical to a first order lag filter.

It has this response to noise.

https://en.wikipedia.org/wiki/File:Butterworth_response.svg

If you apply this filter three times, you get a third order lag filter, the gain at your cutoff frequency will be -9dB and your slope will be 60 dB/decade.

Adjusting your K will move the cutoff frequency. You want to move it as far left as possible without affecting your signal, to increase the slowness of your filter (Increasing K).

Adding filters increases the time it takes for the data to be relevant. Ideally identify the cause of the noise and eliminate it, or measure it.
 
Your sensing device is 0 to 100 psi...your operating range is 7 psi so 7 percent...you want a .05 psi resolution? I would check the specs of your sensor...on the surface looks to me like a poor setup and you're not going to achieve the accuracy you desire.
 
Your sensing device is 0 to 100 psi...your operating range is 7 psi so 7 percent...you want a .05 psi resolution? I would check the specs of your sensor...on the surface looks to me like a poor setup and you're not going to achieve the accuracy you desire.

I was thinking similar lines, OP what's the resolution of the analog input on the PLC? This could be a hang up as well.
 
The pressure transducer might have "smoothing" or filter settings built into it. It might be easier to filter there, especially if it can specifically attenuate 60 hz for problems with wiring practices. That said, you should check for electrical noise as root cause, looking at wire routing and effective shielding. A physical pressure gauge can point to whether the pressure variation may be real or not. Is there a way to "T" one into the pressure gauge tap? Or maybe there is already one there.
 
So roughly 6400 counts over 16ma range...at 100 psi that's around .015 psi per count. To be accurate at .1 foot you need .025 resolution. You're on the hairy edge and any noise whether electrical or ripple in the medium is going to be outside of your tolerance.
 
Thank you all for your input on this issue. I agree that the pressure transducer is not really suitable for the range/accuracy desired. However, this is a 1999-vintage setup which I'm trying to tap into, and at this point it's not possible to change the existing setup.

I am simply tapping into the 4-20mA signal using a signal isolator. (This might be where some of the noise is coming from also...)

The transducer is connected to an old proprietary telemetry system (anyone heard of Aquatrol?) which sends the value to the main plant as well as displays it on a LED display locally.

What confuses me is: how does the old system remove the jitter? The old LED display is quite stable, with only 0.1 jitter as the level is between two 0.1 values. You will see the tenths digit rapidly cycle from one value to the next as this happens, then it will stabilize on the next tenth.

I have an oscilloscope - what's the best way to check for 4-20mA signal noise? Do you have to add a series resistor to the loop and observe its voltage? or is there a simpler way?

Again, thanks!
 
One of the tricks I use to find where the noise is coming from is to divide and conquer. I remove components one at time. Since you are using 4-20ma feedback it would be good to have a 4-20ma current source to replace the sensor and isolator to see if the noise is on the wiring between the isolator and PLC. Then put the current source on the other side of the isolator. This will let you know if the isolator is causing the noise. Divide and conquer.

Ditto the points about lack of feed back resolution. That causes quantizing error.

Still all of this can be filtered out but I would go back to the 40Hz sampling for better results. What you want is to filter more data over a shorter amount of time.

From the description you have 3 single pole low pass filters in series where the output of the first filter is the input for the second. This effectively makes it a 3 pole low pass filter. This is a very easy way to increase filtering. Try adding a 4th filter.
 
There are several firms with aquatrol products so more information needed (model no. etc.) to help you . Does the unit have a 0 to 20ma output ? Most do and if so , is it scaleable ?
 
This Aquatrol is an open-frame-type controller. From what I can tell it's a set of standard modules assembled per customer requirements for IO and processing. The company was based in St. Paul and all the IP is now owned by D2 Services.

Here's a photo of the setup in question: https://goo.gl/photos/oN4auN1tfPkWyfUL9
 
What's at the other end of that radio antenna cable?

What frequency is the radio?

I know you said you can't upgrade anything right now, but that is the sort of thing I do often so I'd like to propose an idea for you based on your answers.
 

Similar Topics

I have an AB 1500 LSP and I need to maintain a steady pressure of 80psi +- 10% from an analog 4-20ma pressure tansducer. I also have a 4-20ma...
Replies
19
Views
5,624
Hi all, Well, here I find myself at a former client after I left water treatment trying to help him get the plant back up and running after a...
Replies
2
Views
1,047
Hi all, I'm connecting several 4-20mA sensors together in parallel (only one shown below) The enclosure is ABS plastic with metal backplate DAQ...
Replies
5
Views
260
Problem: Our PLC can only output 4-20mA, but the actuators it needs to control, modulate based on a 0-135Ohm signal. Buying 4 or 8 individual...
Replies
7
Views
267
What's your go to 4-20ma isolator. I've got some 4 wire 4-20ma from several flow meters and scales that I would like to isolate before it gets to...
Replies
10
Views
1,679
Back
Top Bottom