New Small Wheels Metrology


This page describes the use of the new small wheels metrology table and associated LabView program. Following the 'Quick Start' guide there is an in-depth explanation of the measurement principle as applied to the existing software and hardware, and then documentation of the LabView software in detail.

Quick Start

Placement and Connections

The following picture shows the metrology table with eight of nine 'surveyors' (ccd cameras in aluminium frames) in position for measurement of an SE1-type board.

Note also the position of the three pins (two at top left, one top right) which will be used to guide the board placement over the surveyors. For each board type, a different placement of surveyors and pins is indicated and shown by the software during the measurement process. Note the number of each surveyor when placing them, this is required as input to the measurement program.

The surveyors should always be connected such that they are read out as shown in the annotated picture below (starting from #0) cameraPlacementPlanView.jpg
The central three surveyors are not currently used, but are connected in positions #6 - #8 (top to bottom). The connections are made by ethernet-style (RJ45) connectors to a black box which looks like a router. Power is supplied to the router via an ac/dc converter to a jack at the rear. This router then has a single RJ45 connector to the computer ethernet input.

A board is then placed carefully over the surveyors on the table such that the sides of the board abut the three pins and the ccd sensors are directly under and in contact with the board (diagram below).


Transparent cubic weights are placed over each of the surveyor positions to ensure that the board makes close contact with the ccd surface.

Launching the Software

If the LabView program is not already open, it may be started from a terminal by typing the labview command. You will be prompted to open a LabView 'vi' (Virtual Instrument), and you should find and open the 'RasnikRoe' vi. You will be presented with the front panel shown in the annotated diagram below. Areas of user input ('controls') are numbered in red. Pure displays ('indicators') are numbered in dark blue.


The most important button is the top left 'run' button. Press this to launch the program. In many cases the defaults are appropriate and the user need only check that the board type and ID (input area #1) correspond to the type and ID of the board being measured, thus IN MOST CASES the user need only enter the board type and ID, and press the run button to make a measurement.

All the inputs (RED numbers) are explained below:

  1. Board type and ID: The board type should be a string (SE, SS, LE, LS) followed by a single digit. The ID should be a three digit number, with leading zeroes where necessary.
  2. Camera ID by position: This is the surveyor ID as indicated in the annotated table photograph above, for the six used sensors. The controls are labelled T-L, M-L etc denoting 'Top-Left', 'Mid-Left' (and same for Bottom and Right).
  3. Show pin placement: A binary control indicating whether the pin and surveyor placement diagram should be displayed to the user. This will be displayed in a pop-up window.
  4. Only align y=0 points: Normally 'OFF', this control indicated whether the measured points should be globally aligned to the ideal case (OFF) or only using the middle row (ON). The alignment using only the middle two surveyors will correspond more closely to the results format of pre-measured boards and is only for verification of the metrology process.
  5. Tight limits: Switches between tight and loose cuts for the display of whether a board passes the measurement.

Once the vi has run, results are displayed by the indicators (BLUE numbers) as follows:

  1. Raw results path: Path of the file produced containing the results.
  2. Raw results: These are the raw rasnik measurements (in microns and milliradians) returned by the surveyors. The display is difficult to interpret directly, but is useful for debugging. Note that if an invalid measurement is returned, the 'Bad Measurement' indicator (#6) will turn red.
  3. Calibrated result: Global coordinates for each of the points, in microns. A graph is also displayed which should show the characteristic keystone shape of the boards.
  4. dx, dy: The difference in x and y coordinates of the measured points from an ideal shape (the measured points are globally shifted and rotated to match as closely as possible to the ideal before this is calculated). LED displays next to the numbers show whether the measurement is within tolerance. A graph of dy vs dx is also shown.
  5. Calculation of quantities derived from the measured points: Elongation and parallelism, along with LED displays indicating whether they fall within tolerance.
  6. Bad Measurement: Lights up red if the measurement returned by the surveyors is invalid.

Measurement Principles


Existing documentation on the masks' and surveyors' calibrations are sometimes ambiguous - in particular concerning orientations; where I have made a personal assumption, I have indicated this below. The axes' orientation, however, has been verified by experiment using the table and an SE1 type board.

Rasnik masks

The rasnik mask is an 12.10 mm square printed checkerboard pattern which encodes position information (translation and rotation) and which may be decoded by contact with an imaging ccd. The ccd returns the position of the ccd's center in rasmask coordinates (distance from the lower left corner of each mask plus the (x,y) offset of the mask's lower left corner from the global origin) in microns, and rotation of the mask with respect to the ccd axes in milliradians. It helps (me) to picture the ccd as a spike and the rasnik as a piece of graph paper with x-y axes. Where the spike touches the paper, the measurement of that point is recorded. It will be seen below that for everything perfectly aligned, the ideal measurement would give the mid-rasnik coordinates: (6050, 6050).

There are some additional complications however:

1) The rasnik masks come in several kinds, indicated by a type number of the form 'XX-YY' where XX and YY are two-digit integers. The integers indicate the x and y offsets from the origin; so the measurement returned includes the type-dependent offsets. The offsets are spaced in multiples of 11.88 mm that allows identification of the rasnik type purely from the measurement. An example explains better:

  • The measurement returned is (17866, 124163, -6.457) [x, y, angle]
  • Calculation of (x mod 11880) and (y mod 11880) gives the actual measurement with respect to the lower left corner of this mask: (5986, 5363)
  • Calculation of the integer part of (x div 11880) and the integer part of (y div 11880) gives the mask type: 01-10

2) The rasnik mask axes as used in this system are swapped with respect to the global x-y axes, and the masks are rotated by 180 degrees between the two edges of a board. The photographs below illustrate this and indicate the masks and axes orientation along two edges of an SE1 board (board is face up here; the horizontal axes are reversed during measurement)


Surveyors and their Calibration

A surveyor picture is shown below, with the design dimensions indicated. When the surveyor is placed on the table, there is a conical recess which mates with one sphere and a V-shaped valley (slot) which mates with the second sphere. The dimensions are measured along axes defined by a line joining the sphere-to-slot placement and the perpendicular to this. The origin is at the sphere placement and the dimensions indicated are to the centre of the ccd sensor. The actual calibration includes one angle, which is the rotation angle of the ccd about its axis with respect to the defined axes. This rotation can be neglected.


The surveyors on the left are right-pointing; those on the right are left-pointing, so the sphere and slot positions are reversed between the two sides. Given that the x-y calibration defines the centre of the ccd, and the centre of the ccd defines a point on the rasnik mask, the rotations of both mask and ccd can be disregarded.

Sphere Placement on the Metrology Table

A file containing the measured dimensions of the sphere placements is available. The placements' metrology includes one angle which is the angular direction from one sphere (which will define the surveyor origin = cone on surveyor) to the other (which mates with the surveyor slot). The angular directions on the left are close to zero, those on the right are close to 180, which corresponds to the surveyors' orientations.The schematics below shows the definition of the sign of the angular direction for a sphere pair on the left side of the table.


The diagram below plots the spheres' positions, the spheres' positions added to the surveyor calibrations and the ideal (design) pcb gerber file coordinates for an SE1 board.


It can be seen that the gerber file coordinates correspond closely to the (sphere+surveyor) coordinates and thus reflect the positions mid-ccd, mid-rasnik.

Transform of Coordinates and Subsequent Processing

The Rasmask axis are swapped and partly inverted with respect to the global table axes. Starting from the raw measurement (x,y) of LWDAQ, which represent the position of the center of the CCD in Rasmask coordinates, first the orientation is corrected and the offset is eliminated. For Rasmasks on the left side of the table this yields

x* = (y % h) + w/2 and y* = -( (x % h) + w/2 ),

while for the right side we get

x* = -( (y % h) + w/2 ) and y* = (x % h) + w/2.

h is the periodicity of the Rasmask spacing i.e. 11.88mm and w is the width of the Rasmask 12.10mm. (x*,y*) is the vector, pointing from the center of the Rasmask to the center of the CCD. Since we are interested in the opposite vector i.e. pointing from the center of the CCD to the Rasmask center, we need to invert this vector.

x' = -x* and y' = -y*.

The Rasmask position in table coordinates can now be calculated, taking into account the sphere offsets in global coordinate (Xs, Ys), the angle between the respective spheres A and the frame (surveyor) calibration offset (Xf, Yf).

Xt=Xs+Xf*cos(A) + Yf*sin(A) + x;
Yt=Ys - Xf*sin(A) + Yf*cos(A) + y;

It should be noted, that the transposed two-dimensional rotation matrix has to be used here, as the angle between the spheres is defined clock-wise i.e. in exactly the opposite way as usual.

The global coordinates thus obtained correspond to the central positions of each rasnik mask on the pcb, however it is possible that the overall shape is translated and rotated from the ideal coordinates represented by the gerber file. In order to most closely match the measured points to the gerber file, a formula representing the distance squared of each point from the ideal is formed, under a global transformation of translation + rotation. The translation distance and the rotation angle are left as free parameters and the calculation (sum of all distances) is minimised. In the original program this was done with a python 'numpy' minimisation routine executed externally; in the re-written version this is done with a custom LabView vi called 'FindBestRtTransform', which in turn uses a LabView optimisation library vi called 'Downhill Simplex nD'. This has been thoroughly tested with an independent program and found to give satisfactory and reproducible results.

Measures of conformity

Apart from the 'raw' dx, dx deviations from ideal, there are three derived measures:
  • dx/L, dy/L
  • Elongation
  • Parallelism

dx/L, dy/L

These are simply the deviations dx,dy divided by the length, so the fractional deviations in x and y


The elongations in x and y are the two means of the calculated dx/L and dy/L


The top and bottom dx,dy are used to calculate the parallelism in x and y directions.

'Special' cases: Boards LE8, LS8, LE7, LS7

The boards LE8 and LS8 have only four rasmasks, so only four measurements can be used (the two top measurements are excluded).

For LE7 and LS7, the lower left camera has one precision sphere missing for the mounting, and this measurement should be discounted or only incorporated with degraded accuracy.

-- ShaunRoe - 2017-05-03

-- JonathanBortfeldt - 2017-06-27

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng RasnikRowFrontPanelAnnotated.png r1 manage 184.1 K 2017-05-03 - 10:19 ShaunRoe  
JPEGjpeg SE1BoardInPlacePlanViewOriginal.jpeg r1 manage 1723.8 K 2017-05-03 - 09:51 ShaunRoe  
PNGpng SpherePositionDef.png r2 r1 manage 17.5 K 2017-06-27 - 13:52 JonathanBortfeldt  
PNGpng annotatedRasnikOrientations.png r1 manage 1347.1 K 2017-05-03 - 11:55 ShaunRoe  
JPEGjpg cameraPlacementPerspective.jpg r1 manage 2320.5 K 2017-05-03 - 09:17 ShaunRoe Survey table pin and surveyor placement
JPEGjpg cameraPlacementPlanView.jpg r1 manage 1874.7 K 2017-05-03 - 09:40 ShaunRoe  
JPEGjpg oneSurveyor.jpg r1 manage 2164.3 K 2017-05-03 - 12:35 ShaunRoe  
PNGpng spheresCoords.png r1 manage 30.0 K 2017-05-03 - 13:23 ShaunRoe  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2018-03-01 - ShaunRoe
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback