Eccentric circles problem

Kataeb

Member
Join Date
Jan 2007
Location
www.livelovelebanon.com
Posts
632
Hy, we have a mathematical challenge: Three ultrasonic sensors installed symmetrically (see attached) should measure the diameter of a bubble cage by checking the distance between the sensor head and the cage. But this cage is not concentric with the beam center of the three sensors.
So it should be done by special formulae. Has anyone done this exercise before? Appreciate your hints…
Thanks
 
A good place to start would be looking into the equations used to find the center and radius of a circle using 3 given points. Your sensors should provide 3 points along the circle, the rest is just math...
 
What measurement will the sensors indicate ?

X or Y or something in between - it will depend on how far off centre the inner cylinder is.

ul009.jpg
 
does someone rememeber the equations used to find the center and radius of a circle using 3 given points? it has been decades since i worked with math formulae...

the sensors should indicate X value (red dashed).
 
You should endup with 2 right angle triangles and a line formed by the sensors.

The triangles can be formed by drawing a line from the point the sensors encounters the circle...to the point where the 3 sensor beams meet...this is the hypotenuse. (In your diagram this would be the grey dashed lines)

Using trigonometry you can determine the X,Y co-ordinates of the 3 points on the circle. The origin of the grid (0,0) should be where the 3 sensor beams meet in the center.

The hypotenuse of the triangles should be the easy to calculate:

h = (distance from sensor to center) - (distance reported by sensor)

Angles inside the triangle will be 60-30-90.

The X would be given by
X = h(sin 60)

The Y would be given by
Y = h(cos 60)


The 3rd sensor at the top would just be
Y = (total distance to center) - (distance given by sensor)
X = 0


For the equations for a 3 point circle, use google to find out. They are not simple equations from a brief glance.
 
This is not a PLC problem! This is a and extreme challenge

Hy, we have a mathematical challenge: Three ultrasonic sensors installed symmetrically (see attached) should measure the diameter of a bubble cage by checking the distance between the sensor head and the cage. But this cage is not concentric with the beam center of the three sensors.
So it should be done by special formulae. Has anyone done this exercise before? Appreciate your hints…
Thanks
I am going to post this on
http://groups.google.com/group/sci.math.symbolic/topics
The problem is easy enough to setup but my Mathcad and wxMaxima are not good enough to solve this problem. There are only three equations and three unknowns. Some of the people on the symbolics forum live for the challenge so I will post the problem there.

My wxMaxima code is

eq1: (x1-x0)^2+(y1-y0)^2-(r0+r1)^2;
eq2: (x2-x0)^2+(y2-y0)^2-(r0+r2)^2;
eq3: (x3-x0)^2+(y3-y0)^2-(r0+r3)^2;
eq4: solve([eq1,eq2,eq3],[x0,y0,r0]);
grind(%);

where the center of the inner circle is x0,y0 and the radius is r0. x1,y1 and x2,y2 and x3,y3 are the locations of the ultrasonic sensors. r1, r2, r3 are the distances between the sensors and the inner circle. It looks easy but my wxMaxima has been working on the solution for about a half hour and so far there is no solution.
 
The guys on sci.math.symbolic will probably shoot me.

I don't think there is a formula that will solve this. My wxMaxima is still chugging away. It is a good thing that wxMaxima uses only one of my 4 cores. Even if there is an exact solution I don't it will be short enough to be useful. I think this application must be solved by iterative means. There are minimizing techniques that can minimize error but you will not be able to use them on a PLC.
This may be a better site
http://groups.google.com/group/sci.math.num-analysis/topics?lnk=srg
 
out of curiosity can you post some of it on here? Our company group IT policy blocks all Forums. (Yes I get explicit allowance for this one!)

Cheers
 
You asked for it!!! It exceed the 10000 character length

> I cut out my original post to get the text to fit in the 10000 character limit.

Maple 12 can quickly get a triangular form (F4+FGLM) but the system
doesn't split. I obtain the following Groebner basis in lex order
with y0 > x0 > r0:
sys := {(x1-x0)^2+(y1-y0)^2-(r0+r1)^2,(x2-x0)^2+(y2-y0)^2-(r0+r2)^2,
(x3-x0)^2+(y3-y0)^2-(r0+r3)^2}:
vars := {x0,y0,r0};
G := Groebner[Basis](sys,'tord',order=plex,variables=vars):
[-6*x3^2*x1^2*x2^2+2*y1^2*x1^2*y2^2-2*x1*x2^3*y3^2-2*x1^3*y3^2*x2+4*x3^2*x1 ^2*r2^2-2*r1^2*x1^2*y2^2-2*r1^2*y3^2*x1^2+2*y1^2*y3^2*x1^2-2*y3^2*y2^2*r3^2 -2*x1^3*y2^2*x2-2*y2^4*x1*x3+2*y3^2*y2^2*x3^2+2*y2^2*y3^2*x2^
2-2*x3^2*y2^2*r3^2-2*y1^2*x2^3*x3-2*r1^4*y2*y3-2*y3^2*x2^2*r3^2-2*x1^3*y2^2 *x3+
(-8*y1*r3^2*y2+8*x3*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3*r3*y2+4*y1^3*y3*r3-4*y1^3*y3*r2-4*r3*x1*x2^3-4*y1*r2^2*r1*
y2+4*y1*r3^2*y3*r2-4*y1*r3^2*y3*r1+4*r1*x1*x3^3+4*r1*x1*x2^3-4*r1*x2*x3^3+4 *y1*r3^2*r1*y2-4*r2*x1*x3^3-4*y1^2*y3^2*r3+8*y1^2*y3^2*r2-4*y1^2*x3^2*r3+8* y1^2*y2^2*r3-4*y1^2*x2^2*r2-4*y1^2*x2^2*r1-4*y1^2*y2^2*r2-4*
y1^2*r1*x3^2+4*y1*r3*x1^2*y3-4*y1*r3*x1^2*y2-4*y1*y3^3*r2+4*y1*y3^3*r1-4*y1 *y2^3*r3+4*y1*y2^3*r1-4*y1^2*y3^2*r1-4*y1^2*r2^2*r3-4*y1^2*r3^2*r2-8*y1*r2^ 3*y3-8*y1*r3^3*y2-8*r1*y2*x1*y3*x2-8*y1*x2*x3*r3*y2-8*y1*y2*
x1*x3*r2+16*y1*x1*x3*y3*r2-8*y1*x1*x3*r3*y2-8*y1*x1*y3*x2*r3-8*y1*x1*x2*y3* r2-8*y1*x2*x3*y3*r2+16*y1*x1*x2*r3*y2-8*y1*r1*x3*y3*x2-8*x1*y2*x3*y3*r2-8*x 1*y3*x2*r3*y2+16*r1*x3*y2*y3*x2-8*r1*x3*y2*y3*x1-8*y1*r1*x3* ...
 
Ouch Peter (I didn't quote you on that one for obvious reasons!)

I see what you mean, thats a complicated formula. But also about a third of the way down it some thing odd happens......

... it turns into a pretty pattern; I am sure I can see a face in there ;)

It may be a stupid question, but could the OP mount the sensors on brackets so they are equal distances from the center???
 
Solving using iteration

The best way to solve this is to go back to the original 3 equations.

(x1-x0)^2+(y1-y0)^2-(r0+r1)^2 = error1;
(x2-x0)^2+(y2-y0)^2-(r0+r2)^2 = error2;
(x3-x0)^2+(y3-y0)^2-(r0+r3)^2 = error3;

SSE=error1^2+error2^2+errorr^3
SSS=Sum of Square Error.

There are minimizing/optimizing routines ....

http://en.wikipedia.org/wiki/L-BFGS
http://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm

that will intelligently try different combinations of r0,x0, and y0 in an effort to minimize the error. The algorithms finds the rate of change of the SSE as a function of each dimension and finds the best change to minimize the SSE. I bet it would take only a few iterations (10-25) that would minimize the SSE close to 0. What helps is that there are good starting estimates for x0,y0 and r0. This code can easily be written ( about 1/2 hour ) using math software like Mathcad, Matlab, Maple, Mathematica or Scilab.

Edit, I just saw this

It may be a stupid question, but could the OP mount the sensors on brackets so they are equal distances from the center???
It doesn't really make any difference. I was hoping for a symbolic solution where x1,y1,x2,y2,x3,y3 could be anything.
 
Last edited:
Guys, thank you for your enthusiastic support.
Note that the 3 sensors are installed (fixed) at equal distances (equilateral triangle).
But the cage, which diameter is to be measured, is always moving around (plastic film).
So the plc should do the calculation fast enough to measure and control the actual diameter.
 
This isn't a joke.

So the plc should do the calculation fast enough to measure and control the actual diameter.
Have you seen this done before with a PLC? I doubt it.

My equations are right. If not the guys on the other forum would have let me know. The guys on the sci.math.symbolics use group are very good mathematicians and they have better math tools than I have and still they couldn't find a simple answer. I doubt you are going to enter pages of formulas in a PLC or that the PLC could do the calculations fast enough.

I would look into using an embedded PC like a PC104 system.
 
Last edited:

Similar Topics

I'm trying to build a model of a machine. What I need is to find a gearset where the speed of the driving shaft would be constant, but the output...
Replies
9
Views
2,642
Hi guys a little help if possible. 1. I have made my self a little project, of trying to control a roller shutting door, just up and down if a...
Replies
57
Views
7,404
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
86
Hi, I am having a challenge installing a new drive ACS355-03E-44A0-4 as it keeps on displaying Fault code F00018 even when the load is not...
Replies
3
Views
121
I have an issue on my vessel, we have water tight door system created in China, company is no longer operating. We have 7 doors each with their...
Replies
3
Views
113
Back
Top Bottom