Re: maths problem
Ian, you asked on Fri, 04 Jun 2004 15:06:14 +0100: I am writing some software to test our IRcels, these are infra red gas detection sensors used to detect CO2 or hydrocarbons eg pentane. For the test I have to calculate the standard fractional absorbance(X) of the test gas from the following equation. %CO2=(((3.10933*(X*X))+(.5602*X)))/(0.30204-X) For a gas bottle of 2%CO2 I have been given a value of 0.19144 for X so far so good. Plug a value of 0.19144 into the equation and you will get a solution of 1.9 In reality the gas concentration would not be 2.00 it would probably be 2.05 for example therefore I have to use the equation in an iterative manner, modifying the value of X each time until the solution = 2.05 ...snip... No! Others have stated a solution for this equation to calculate a proper value of X in order to get the required result. So far so good. I've done (respiration) gas analysis in my PhD project (years ago). What you describe sounds more like calibration problems similar to what I had to perform. If your equation is given 'ad hoc' and can not change ist parameters, then you should get another reading for X from your cells. It should, however, be in the range of those values as given from the equation's solution. But those coefficients do not 'look' like 'fixed' parameters, but more like results of a calibration process, e.g. a curve fitting or such. If you are going to somehow calibrate your cells you should consider feeding them with differrent mixed gases and perform an individual calibration on each of the cells. If you know the fractional gas concentration in fresh air and in your actual test gas, you'll need only about two or three other gas samples to do your curve fitting. Greetings from Germany! -- Uwe Frenz ~ Dr. Uwe Frenz Entwicklung getemed Medizin- und Informationtechnik AG Oderstr. 59 D-14513 Teltow Tel. +49 3328 39 42 0 Fax +49 3328 39 42 99 [EMAIL PROTECTED] WWW.Getemed.de
maths problem
I'm sending you a VI (privately) that solves your problem iteratively. It uses the approach of successive approximation. ===Original Post== For the test I have to calculate the standard fractional absorbance(X) of the test gas from the following equation. %CO2=(((3.10933*(X*X))+(.5602*X)))/(0.30204-X) For a gas bottle of 2%CO2 I have been given a value of 0.19144 for X so far so good. Plug a value of 0.19144 into the equation and you will get a solution of 1.9 In reality the gas concentration would not be 2.00 it would probably be 2.05 for example therefore I have to use the equation in an iterative manner, modifying the value of X each time until the solution = 2.05 I have tried changing the value of X by the percentage difference the solution is away from the required solution but this results in under shooting then overshooting the required solution in larger and larger jumps. Can anybody recommend any of the maths functions in labview or just point me in the right direction as maths was never my strongest subject. === Lewis Drake Process Automation Corporation Belle Mead, NJ 908 359-1011 www.processauto.com
maths problem
Dear all I would appreciate some help with a maths equation problem I have. I am writing some software to test our IRcels, these are infra red gas detection sensors used to detect CO2 or hydrocarbons eg pentane. For the test I have to calculate the standard fractional absorbance(X) of the test gas from the following equation. %CO2=(((3.10933*(X*X))+(.5602*X)))/(0.30204-X) For a gas bottle of 2%CO2 I have been given a value of 0.19144 for X so far so good. Plug a value of 0.19144 into the equation and you will get a solution of 1.9 In reality the gas concentration would not be 2.00 it would probably be 2.05 for example therefore I have to use the equation in an iterative manner, modifying the value of X each time until the solution = 2.05 I have tried changing the value of X by the percentage difference the solution is away from the required solution but this results in under shooting then overshooting the required solution in larger and larger jumps. Can anybody recommend any of the maths functions in labview or just point me in the right direction as maths was never my strongest subject. I am using LV 7.1 on windows 2000 Thanks for any help Ian Lloyd Extn 304 Direct number 023 92288140 _ This message is intended solely for the use of the individual or organisation to whom it is addressed. It may contain privileged or confidential information. If you have received this message in error, please delete accordingly. If you are not the intended recipient, you should not use, copy, alter, or disclose the contents of this message. All information or opinions expressed in this message and/or any attachments are those of the author and are not necessarily those of City Technology Ltd. City Technology Ltd accepts no responsibility for the loss or damage arising from its use, including damage from virus. _ This message has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. For further information visit http://www.uk.uu.net/products/security/virus/
Re: maths problem
At 8:07 -0700 6/4/04, PJ M wrote: If I understand properly you know %co2 and you want to know x right ? Therefore you just have to solve the equation. It's a pure math problem, no a LV one. Let's rename your equation %CO2=(((3.10933*(X*X))+(.5602*X)))/(0.30204-X) like so y=(ax*x+bx)/(c-x) = y(c-x)=(ax*x+bx) = ax*x+(b+y)x-yc=0 Then assuming than D=(b+y)*(b+y)+4yac is positif you have the following: x=[-b+(or-)Sqr(D)]/2a Note! Sqr(D) is really Sqrt(D) the square ROOT of D not the square. But this right, you DO want to use the exact quadratic solution. Also I think D= (b+y)^2-4yac http://www.sosmath.com/algebra/factor/fac08/fac08.html Also for for future reference, equations greater than 4th order that do not have exact solutions like this, you can use the root finding routines built into LV. -Scott