Sign in to follow this  
Followers 0
waterboy

Indirect Square root? Help?

31 posts in this topic

Can someone walk me through the Indirect Square root formula as it pertains to Differential Pressure transmitters? I know this isn't strictly PLC related but this is a pretty smart group surely you have all dealt with this before? This is for diff pressure transmitter calibration and I would to prepare a spreadsheet with multiple input points of pressure in whatever value (in. H20 or PSI ) and the expected mA output from the device.

Share this post


Link to post
Share on other sites
i don't understand the question. it seams that you want to know how to linearize analog input. if that is the case, try collecting few points (each point will have both sensor output and correct value). use something like CurveExpert 1.3 (http://curveexpert.webhop.net/) to find suitable fit (square root, polinomial or whatever).

Share this post


Link to post
Share on other sites
Like panic I'm not sure i understand your question. Most transmitters have build-in the abilitiy to scale the output ( 4-20ma) to repersent H2O or to extract the square root. Check your transmitter configuration setup.

Share this post


Link to post
Share on other sites
I'm sure I'm mangling the question too. I would like to measure the output of the device to see if fits what the mathmatical calculation comes up with. Say I have an pressure input of 50% of the scale of the transmitter . Because the output in mA isn't linear,I won't get 12mA output, I have to use the Indirect Square root formula to calculate the expected mA output from the device. If I understood the formula I could build the spreadsheet easily enough but the terms aren't yet familiar to me. The bottom of this shows the formula: It's going to be elementary once I get familar with what values to put into the terms but I can't get that part. i.e. Out_Scale.EU0 is what value? same for Field_Val and Out_Scale.

Share this post


Link to post
Share on other sites
well this should be obvious, let me see if I can explain it. your help file screen shot seam to focus on 0-100% range (ti is everywhere in your example). EU is Engineering Units (V, A, gallons/min, psi, miles, whatever) EU0 and EU100 are EI (engineering units) for 0 and 100% So if your pressure is 30-75psi, then 30-75psi is 0-100% or 0%=30psi and 75psi is 100% so those values in this case are just the range limits (30 and 75). Thise values are fixed (they normally don't change). An output example they have shown is for temperature in degC, range -100...400degC, Input range is +/-50mV (EU_0=-50, EU_100=+50). Note that all of this is LINEAR. As an example there are three possible output types and only the last formula (Indirect Square Root) is not linear. Is this what you really have (L_TYPE= Indirect Square Root)?

Share this post


Link to post
Share on other sites
It is very basic, but remember the units. use 0-100% and remember 100%=1 therefore 50% =.5 So, if your pressure is 0% of input range, your square rooted output will be 0% of output range (4ma) if your pressure is 25% of input range, your square rooted output will be 50% of output range (12ma) if your pressure is 50% of input range, your square rooted output will be 70.7% of output range (15.3ma) if your pressure is 75% of input range, your square rooted output will be 86.6% of output range (17.8ma) if your pressure is 100% of input range, your square rooted output will be 100% of output range (20ma)

Share this post


Link to post
Share on other sites
That is helpful. Can you show me the math you used. (and what is "indirect" about it?)

Share this post


Link to post
Share on other sites
for 25% i took the square root of .25 which is .5 or 50% for 50% - the square root of .5 is .707 or 70.7% hope this helps. Is this for a flow measurement? If so, you would need to know what 100% Diff Press represents in flow. It looks like indirect means not direct with square root added???? Edited by newpageboba

Share this post


Link to post
Share on other sites
yes, a vortex flowmeter for plant influent

Share this post


Link to post
Share on other sites
Using Excel, put in the values from 0.00(0%) to 1.00(100%) using the increments you want. I used .05 (5%) Use this formula - sqrt. FlowvsPress.bmp FlowvsPress.xls

Share this post


Link to post
Share on other sites
Using your indirect squareroot formula, XD_SCALE.EU0 = 4ma, XD_SCALE.EU100 = 20ma (or use what you scaled your analog input) this make FIELD_VAL = 0 - 1 (or 0-100%) OUT_SCALE.EU0 = 0 & OUT_SCALE.EU100 = 100 (or use the actual flow range) the divisor of 100 in the square root does not make sense.(I think it is actually 100%, which is 1) The FIELD_VAL formula gives a value of 0 to 1 (not 0 to 100). If the divisor is actually 100, then the XD_SCALE.EU0 & EU100 values should be 100 times greater.

Share this post


Link to post
Share on other sites
Well now..... That certainly wasn't what I was building it up to be! Thank you for that. What exactly makes it "Indirect". Square root is simple enough but throw the word "Indirect" at it and I just crawled into a corner and grabbed my teddy.

Share this post


Link to post
Share on other sites
I think what they meant by indirect is 'not direct'

Share this post


Link to post
Share on other sites
FIELD_VAL is a number from 0-100 (in percent, of course). The divisor of 100 simply converts it from percent to a numeric ratio.

Share this post


Link to post
Share on other sites
Very funny . I see in some more reading that direct and indirect refer to the signal path and not to a particular math function. Would you agree?

Share this post


Link to post
Share on other sites
I am a stickler for engineering units in math formulas. I see many people get burnt in their calculation by not using engineering units. 0%-100% equals 0-1 0-100 does not equal 0-1 it equals 0-100 Edited by newpageboba

Share this post


Link to post
Share on other sites
That makes sense, It's starting to clear up now. Thank you very much for your help, all of you.

Share this post


Link to post
Share on other sites
Good point! I remember the days. Physics, Statics, Dynamics, etc., etc., ad nauseum. So that portion of the formula should read: FIELD_VAL 100%

Share this post


Link to post
Share on other sites
Yes, then the formulas make sense.

Share this post


Link to post
Share on other sites
Just when I get the math, now the application gets me....How do you use this non-linear value in a PLC5 and convert it accurately? The existing value that is received from this transmitter is currently treated in the PLC like it was a linear value. i.e. 12mA input to the module is treated as 50% of the scale of the instrument. If I understand right, the real value for 12mA input to an analog module should be about 25% of the full scale of the instrument. If this is right, how do I handle this non-linear value from the instrument?

Share this post


Link to post
Share on other sites
read first reply

Share this post


Link to post
Share on other sites
But there is no "curve fitting" in a PLC's language.

Share this post


Link to post
Share on other sites
using the Function Generator (FGEN) inst in RSL5k you do linearisation The FGEN instruction converts an input based on a piece-wise linear function.

Share this post


Link to post
Share on other sites
:sigh: TGIF one more time - read first reply... the idea is to use your own math skills or help of a tool (excel, curvefit, mathlab or whatever) to find the formula which is close fit or good approximation and works for the application. not all solutions are accurate enough and then, (once you know what the formula and parameters/coefficients are), you can use math instruction to implement it in language your controller supports (controller happens to be a PLC in this case). this may require series of rungs and ADD, MUL, DIV, CPT or whatever blocks your controller supports and furmula needs.

Share this post


Link to post
Share on other sites
Ok I see what you mean now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0