Changing Angle of a TankDate: 06/12/2003 at 23:21:09 From: Daniel Subject: Geometry Dimensions a,b,r are known, as is the linear distance from point A to point B. I need a formula to determine the value of h. Points A and B represent pressure sensors in fixed positions on the base of a round tank. The chord through CD represents the water level in the tank. Lines a and b are the heights of water registered by each sensor. Thanks. Date: 06/13/2003 at 08:56:23 From: Doctor Peterson Subject: Re: Geometry Hi, Daniel. Your picture looks something like this: ********* ****** ****** *** *** ** ** ** ** * * * * * * * * * * * r * *---------------------O---------------------* * | * * | * * | * * | * * | * *-----------C-----+----------D------* ** | | b| ** ** |a |h | ** *** | | B** ****A* | ****** ********* It doesn't show the chord AB, whose length I assume is what you mean by "the linear distance from A to B." It would be easier if you meant the distance CD, but we can get the latter from the former. If the sensors are in fixed positions, then you should be able to measure more than just the distance between A and B in order to locate them. I would just think in terms of a coordinate system with the y-axis through the center, and the x-axis through the bottom of the circle. Then you can simply measure the coordinates of A and B; and the depth of water h is just the height a or b plus the height (y coordinate) of A or B respectively. If you can't measure those directly, then we could make some calculations based on whatever you can measure conveniently. The important thing is that we don't have to calculate h directly from a, b, and r each time, as if A and B could move around. Rather, we can find the positions of A and B once, and then get h with little calculation. The downside is that now either a or b alone should be enough to determine the depth of the water; what you have is two redundant sources of information that you would want to average in some way to eliminate error. I suppose the error could come either from inaccuracies in the location of the sensors, or in the sensors themselves. I would definitely prefer to determine their locations without reference to their own outputs, in order to control the source of error. This is like saying I would not want to use a plane's altimeter to determine the altitude of an airport, but to use surveying to do that, and then calibrate the altimeter by the known number! Does it make sense to determine the locations of A and B before using their data? What measurements can you make other than the distance between them? - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ Date: 06/15/2003 at 01:03:21 From: Daniel Subject: Geometry Sorry, what I didn't make clear in the previous response is that the angle of the tank changes over time and thus points A and B are not at set locations from the line h, but at set points on the outside of the tank. The position of the line h changes as the angle of the tank changes, as the line h represents the deepest point in the tank. I hope this clears things up a little Thanks Date: 06/16/2003 at 12:13:19 From: Doctor Peterson Subject: Re: Geometry Hi, Daniel. Here is my picture again: ********* ****** ****** *** *** ** ** ** ** * * * * * * * * * * * r * *---------------------O---------------------* * | * * | * * |r-h * * | * * | * *-----------C-----+----------D------* ** | | b| ** ** |a |h | ** *** | | B** ****A* | ****** ****E**** We know r, a, b, and d = AB. I'd like to start by using the angle t = AOB to define the "distance" between the sensors. Then their actual location can be defined by another angle u = AOE; and angle BOE = t-u. Later we can find t in terms of d. This gives us these equations: cos(u) = (r-h+a)/r cos(t-u) = (r-h+b)/r or r cos(u) = r - h + a r cos(t-u) = r - h + b I'd like to solve first for u. We can eliminate h by equating two expressions for r-h: r cos(u) - a = r cos(t-u) - b = r[cos(t)cos(u) + sin(t)sin(u)] - b cos(t)cos(u) + sin(t)sin(u) - cos(u) = (b-a)/r sin(t)sin(u) - (1 - cos(t))cos(u) = (b-a)/r [1] (1 - cos(t))cos(u) - sin(t)sin(u) = (a-b)/r [1] Now, (sin(t))^2 + (1 - cos(t))^2 = 2 - 2 cos(t) = 2(1 - cos(t) If we define an angle v for which sin(v) = sin(t)/sqrt(2(1 - cos(t))) cos(v) = (1 - cos(t))/sqrt(2(1 - cos(t))) = sqrt((1 - cos(t))/2) then equation [1] becomes cos(v)cos(u) - sin(v)sin(u) = (a-b)/[r sqrt(2(1 - cos(t)))] cos(v + u) = (a-b)/[r sqrt(2(1 - cos(t)))] v + u = arccos[(a-b)/[r sqrt(2(1 - cos(t)))]] u = arccos[(a-b)/[r sqrt(2(1 - cos(t)))]] - arccos[sqrt((1 - cos(t))/2)] Now, h = a + r(1 - cos(u)) This is sufficient to find h. I'd like to try simplifying it, but I won't take the time to do so just now. We still have to find t in terms of d, assuming the latter is easier for you to measure: sin(t/2) = (d/2)/r cos(t/2) = sqrt(1 - d^2/(2r)^2) sin(t) = 2 sin(t/2) cos(t/2) = 2 * d/(2r) * sqrt(4r^2 - d^2)/(2r) = d/(2r^2) sqrt(4r^2 - d^2) cos(t) = 1 - 2 sin^2(t/2) = 1 - 2 d^2/(2r)^2 = (2r^2 - d^2)/(2r^2) Let me know if that does what you need. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ Date: 06/17/2003 at 09:17:15 From: Doctor Peterson Subject: Re: Geometry Hi, Daniel. I've been thinking about this problem off and on, trying to come up with a simnpler solution. I finally realized that I had been forgetting a basic trick for simplifying a problem: recast it in a form that is symmetrical. So rather than solve immediately for h, I'd like to first find the midpoint of the chord AB ********* ****** ****** *** *** ** ** ** ** * * * * * * * * * * * x * * C----O------+------------D * * | / \ ----+ r | * * | / \ |----- |* * | / \ y| ----- |* * | r/ \ F------------B * | / \ |c ---- * * | / \| ----d * ** E-----------M-- ** ** c|/ ---- ** *** | ----d *** *****A-- ****** ********* Note that I am using d this time for HALF the distance AB. Rather than work directly with a and b, we'll just use c = (a-b)/2 This is the vertical distance between either A or B and M, the midpoint of the chord. Once we find y, the vertical distance from M to the center of the circle O, we can use the fact that the distance from the center down to the water line can be expressed in two ways: r - h = (y + c) - a to solve for h: h = (r + a) - (y + c) = r + (a+c) - y = r + (a+b)/2 - y From right triangles AEM, OCE, and ODB, taking EM = e, we have three equations: e^2 = d^2 - c^2 [1] (e-x)^2 + (y+c)^2 = r^2 [2] (e+x)^2 + (y-c)^2 = r^2 [3] Adding together the last two equations (after expanding them), we have 2e^2 + 2x^2 + 2y^2 + 2c^2 = 2r^2 or (dividing by 2 and replacing e^2 with d^2 - c^2) d^2 - c^2 + x^2 + y^2 + c^2 = r^2 x^2 + y^2 = r^2 - d^2 [4] Subtracting equation [2] from [3], 4ex - 4cy = 0 which yields ex = cy y^2 = e^2x^2/c^2 = x^2 (d^2 - c^2)/c^2 [5] Plugging this into [4], we get x^2 + x^2(d^2/c^2 - 1) = r^2 - d^2 x^2 d^2/c^2 = r^2 - d^2 x^2 = c^2/d^2 (r^2 - d^2) We want y, so from [5] y^2 = c^2/d^2 (r^2 - d^2) * (d^2 - c^2)/c^2 = (r^2 - d^2)(d^2 - c^2)/d^2 y = sqrt[(r^2 - d^2)(d^2 - c^2)]/d = sqrt[(r^2 - d^2)(d^2 - (a-b)^2/4)]/d Finally, h = r + (a+b)/2 - y = r + (a+b)/2 - sqrt[(r^2 - d^2)(d^2 - (a-b)^2/4)]/d Try using that, and see if it works out right. As a check, we can take some special cases: if a=b, h = r + a - sqrt[(r^2 - d^2)d^2]/d = r + a - sqrt(r^2 - d^2) which works out right if you draw a picture. if d=r (so that AB has to be a diameter), h = r + (a+b)/2 - sqrt(0) = r + (a+b)/2 which again works out right. So there's at least a good chance I got it right. Using the right variables kept the work simple enough that I didn't make the mistakes I was making with more direct methods. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/