Determine Z-axis adjustments at fixed points to make two planes coplanar?

63 Views Asked by At

I'm trying to come up with a practical solution to a problem I have at work with a cardboard cutting machine. I'm not a mathematician by any stretch, so I'm hoping I can get some help here.

The cutting head moves along the X and Y axis and this plane is assumed to be "flat". The bed below it is adjustable along the z axis by four screws (near the corners). We do our best to "level" the bed (relative to the head's plane) and it is a frustrating exercise of trial and error. So I wondered if there was a way to instead determine mathematically, with some precision, how much (and in which direction) one or more of the corners needs to move to make the bed and the head coplanar. The bed is approximately 3 meters squared and being off by more than a couple of mm is a problem (so absolute precision is not necessary... but close is nice)

The equipment has a sensor that can determine the Z-distance from the head to the bed at arbitrary points (+/- 0.02mm), but it doesn't have the freedom of movement to do so at the adjustment screw points (otherwise I think it would be easy! Just adjust by each screw's measured offset). My brain figures there's a formula, but isn't able to come up with what it would be :) Perhaps taking three arbitrary XYZ points to get the plane and extrapolate that out to the XY coordinates of the adjustment points and determine what Z offset would be at those points?

Is this easy? (if so, little help please?) I will accept "too complicated" if that's the case. It isn't something I want to spend years in university trying to understand... just trying to make my workflow a little more efficient.

Apologies if this wasn't an appropriate place to ask.

[edit] I want to note that my "end goal" here is to have a program (spreadsheet, whatever) that I can enter the measured Z offset at specified XY coords and have the adjustment at each screw location spit out. The machine is programmable, so I may investigate automating the procedure, but the adjustments are manual so at best I can have the machine tell me the necessary adjustments to make.

1

There are 1 best solutions below

0
On

Consider the center of the "bed" as the origin of coordinates, thus the corners coordinates are $(\pm a, \pm a)$ with for example $a=1.5m$.

If you can measure the offsets $z_k$ in 3 points that are referenced $(x_k,y_k), \ k=1,2,3$ of your tool above these points, you are able to obtain the equation of the plane passing through these points with 3D coordinates $(x_k,y_k,z_k), \ k=1,2,3$.

The equation of this plane can be given the form (details in the Appendix):

$$\tag{1}z=ux+vy+w$$

It suffices then to replace $(x,y)$ by coordinates $(\pm a, \pm a)$ in (1) to obtain the amounts of upward (or downward) vertical displacement of the four skrews.


Appendix : how coefficients $u,v,w$ can be calculated ?

A classical implicit equation for the plane passing by 3 points is obtained by imposing the following determinant equation (formula (18) in (http://mathworld.wolfram.com/Plane.html)):

$$\tag{2}\begin{vmatrix}x_1&x_2&x_3&x\\ y_1&y_2&y_3&y\\z_1&z_2&z_3&x\\1&1&1&1\end{vmatrix}=0$$

Expanding (2) and extracting $z$, we obtain the following expressions :

$N_u=y_1*z_2 - y_2*z_1 + y_3*z_1 - y_1*z_3 + y_2*z_3 - y_3*z_2$

$N_v=x_2*z_1-x_1*z_2 + x_1*z_3 - x_3*z_1 + x_3*z_2 - x_2*z_3 $

$N_w= x_1*y_3*z_2 + x_2*y_1*z_3 + x_3*y_2*z_1- x_2*y_3*z_1 - x_3*y_1*z_2 -x_1*y_2*z_3 $

$D= x_2*y_1 -x_1*y_2 + x_1*y_3 -x_3*y_1 + x_3*y_2 - x_2*y_3$

and the final coefficients to be plugged in (1) are:

$$u=\dfrac{N_u}{D}, \ \ \ \ v=\dfrac{N_v}{D}, \ \ \ \ w=\dfrac{N_w}{D}.$$