Presentation is loading. Please wait.

Presentation is loading. Please wait.

CAOX and the LiCAS RTRS Patrick Brockill LiCAS Group 5 Oct, 2010.

Similar presentations


Presentation on theme: "CAOX and the LiCAS RTRS Patrick Brockill LiCAS Group 5 Oct, 2010."— Presentation transcript:

1 CAOX and the LiCAS RTRS Patrick Brockill LiCAS Group 5 Oct, 2010

2 Outline  General discussion of Caox  What can it do? What is it missing?  Caox core design  How Caox has become a generalised framework  Reliance on external libraries and programs  Case study: the LiCAS Rapid Tunnel Reference Surveyor (RTRS)  Provides motivation for much of what Caox can do  Importance of including inner constraints  Caox operation  Design matrix analysis  Model verification  Future  Future work on Caox  Integration of Caox into other environments, e.g. S.A. 2

3 What is Caox? A C++ framework of about 200 pgs (so far) for least squares analysis  Solve least-squares problems of the form and constraints for X as well as. Note that for our purposes we also require off-diagonal elements of  Designed to call and be called by external libraries  Allows for mathematical rigour  Designed for “calibration” and “operation/reconstruction” problems involving rotations/translations, but generally applicable  Already used in LiCAS, Mona Lisa for calibration  A work in progress 3

4 What is Caox missing?  User friendliness for input  A way of graphically inputting the problem  3D input engine  Measurement input  It's own optimisers and algebra routines (framework)  Can also be seen as a strength  Best optimiser for each problem  Performance depends on optimiser, algebra routines  Direct user intervention can dramatically increase speed and size  Status in commercial products unclear  Possibly supply own, but potentially much work  A user base: interest and motivation  Input from those working in geodesy 4

5 Caox Core At the core, Caox relies on C++ templates for definitions of F(X) and constraints Disadvantages:  Compilation required Advantages (amongst others):  Speed (important for external libraries)  Allows us to define F(X) and constraints once yet evaluate in many ways 5

6 LS Problems: Mode of Attack Addresses 3 common aspects, applicable to many problems: (1) Formulation of the Model (2) Optimisation (3) Error Analysis 6  Most externally available software focuses on (2) and (3)  We focus on (1) and (3)  Simple Gauss-Newton w/line fit for (2)  Add support for calling other optimisers Rely on publicly available external libraries  Numerical BLAS, LAPACK, etc.  Semi-Symbolic ADOL-C  Symbolic GiNaC Caox has been generalised to include not only our original specific problems, but many more kinds of least square (LS) problems in general

7 Typical Problems Considered So Far Measurement apparatus calibration  Element of F(X) large composition of functions (e.g. rotations and translations), 150 pages for one element of F(X)  O(2000) elements of X  Design matrix A=dF/dX frequently relatively dense  Regularity problem: elements of L missing Measurement apparatus operation: “reconstruction”  Very large O(10 6 ) elements in X 7 L=F(X) 150 pgs.

8  Arbitrary precision: “quick and dirty” calculations despite rounding errors, large condition numbers, near-singular matrices, e.g. Caox: Research & Planning Input from (amongst others): DESY Geodesy, DESY Physics, Oxford Mathematics, Oxford Photogrammetry, Oxford Engineering, Oxford Physics Literature: sometimes back to original geodesy literature in German. 8 Software planning: Investigated modellers, modelling languages, optimisers Keeping in mind, e.g.:  Costs  Irregular measurements  Data input format  Graphical checks

9 9 collider component Tunnel Wall Reconstructed tunnel shapes (relative co- ordinates) wall markersinternal FSI external FSISM beam Case Study: RTRS Survey Source: Armin Reichold

10 10 RTRS in Motion

11 11 Local RTRS Operation Multilateration to Determine Wall Marker “External FSI” Need to Relate Positions Of Cars: Need To Introduce a Common Object Between Them Laser line passed through all cars… Then reflected back along itself… Then split off and observed. Able to determine some rotations and translations this way. “Laser Straightness Monitor” (LSM) We use gravity, i.e. tilt sensors, to determine some rotational d.f. But this is not enough. But none of these systems determines distance between cars so this must also be measured: “Internal FSI” Basic Elements (“Subsystems”): 1.Distance between two points 2.Intersection of a line and a plane 3.Tilt sensor Our Goal: Determine the best positions for the wall markers which agree with our data …But first we have to find the positions/orientations of the internal elements (“Calibration”). Caveat: we can’t just measure this... "Calibration dance": one car at a time is translated... and rotated (at the same time). Hopefully at some point, X in L=F(X) is uniquely determined

12 12 Laser Tracker Aided Calib. Additional observations of the car movements to be used if necessary

13 Characterising the RTRS Problem  Measurement vector L is a large composite quite non-linear function We need to a way to verify functional form of F(X)  Equality constraint equations also frequently just as composite, complex  Poor condition number of design matrix  Require careful calculation of derivatives in design matrix  Near “symmetries”, graphically visualised and analysed  Regularity problem in actual data  Inner constraints a must 13

14 Multilateration Prototype 14 P1P1 P4P4 P3P3 P2P2 x y ? ? ? ? ? L4L4 L3L3 L2L2 L1L1 {L 1,L 2,L 3,L 4 } (1) ? L4L4 L3L3 L2L2 L1L1 {L 1,L 2,L 3,L 4 } (2) L4L4 L3L3 L2L2 L1L1 ? {L 1,L 2,L 3,L 4 } (N)    3 Constraints: Trans.: P 1x =P 1y =0 Rot.: P 2y =0 L=F(X) Q (i) +constraints Four Launches in 2D Plane Observing Randomly Moved Retroreflector  Essentially, looking for X=F -1 (L)  More correctly, we want to minimise the “objective function” [L-F(X)] 2 Least Squares Optimisation  In this example, we call this “calibration”  And we want the errors on the parameters X

15 Mulilateration (cont.) 15 P1P1 P4P4 P3P3 P2P2 ✓ L4L4 L3L3 L2L2 L1L1 ? ✓ ✓ ✓ Q Given: P 1 …P 4 and L 1 …L 4. Find Q.  Smaller problem than previous slide  We call this “Reconstruction” or “Operation”  Another least squares problem  How can we make self-calibratable apparati which make optimal measurements?  What are the weak points in a design? 3 Processes (1)Calibration (2)Operation (3)Design and Analysis  Positions and orientations of optical elements, some of which cannot (or only with much difficulty) be measured directly.  Performed by spatial rotations and translations of apparatus.  Once positions and orientations of optical elements are known, actually make measurements with the apparatus.  Potentially large  Submatrix of calibration covariance matrix required as input

16 Design Matrix Analysis Conceptually: Hoberman sphere Eigen. λ=0, λ≈0 can be disastrous  Nontrivial, surprisingly common  Can be overcome with extra measurements, but reflect design weakness  3D visualisation very useful  Best avoided in design stage 15

17 External FSI Self Calibration 17  Wallmarker appears for observation  Quill positions, blue dots, position in principle unknown and not directly measurable  Wall marker, orange dot, position also unknown  6 length observations from quills to wall marker  can this determine all of the unknown positions?  Perhaps if we took enough measurements in different wall marker positions, all positions would be determined (“self calibration”)  POV: looking at the unit from the tunnel wall  No. So also consider another wallmarker position

18 18 Subsystem Symmetries in the RTRS  All of these symmetries are overcome if we calibrate all subsystems together with the laser tracker included.   Nevertheless, still represent design weaknesses  No. There is no unique solution if the blue spheres representing the quills are on a conic section (parabola, hyperbola, circle)  Laser Straightness Monitor (LSM) is also not immune – we require three independent/non-parallel normals to the CCD planes  We could fix this symmetry by including one new distance measurement

19 Yrun[0_11737].car_ccd_xy[0][1][0] == - (cos(car_ccd_orient_0_1_1)*sin(car_ccd_orient_0_1_2)*(cos(Xrun_0 _11737_car_orient_0_0)*sin(Xrun_0_11737_car_orient_0_1)*cos(Xru n_0_11737_car_orient_0_2)+sin(Xrun_0_11737_car_orient_0_0)*sin( Xrun_0_11737_car_orient_0_2))+cos(Xrun_0_11737_car_orient_0_0 )*(cos(car_ccd_orient_0_1_0)*sin(car_ccd_orient_0_1_1)*sin(car_cc d_orient_0_1_2)- cos(car_ccd_orient_0_1_2)*sin(car_ccd_orient_0_1_0))*cos(Xrun_0_ 11737_car_orient_0_1)+(sin(car_ccd_orient_0_1_1)*sin(car_ccd_orie nt_0_1_0)*sin(car_ccd_orient_0_1_2)+cos(car_ccd_orient_0_1_0)*co s(car_ccd_orient_0_1_2))*(cos(Xrun_0_11737_car_orient_0_0)*sin(X run_0_11737_car_orient_0_1)*sin(Xrun_0_11737_car_orient_0_2)- cos(Xrun_0_11737_car_orient_0_2)*sin(Xrun_0_11737_car_orient_0 _0)))*((sin(Xrun_0_11737_car_orient_2_2)*((cos(Xrun_0_11737_lsm _mirror_orient_0)^2*cos(Xrun_0_11737_lsm_mirror_orient_1)^2- sin(Xrun_0_11737_lsm_mirror_orient_0)^2*cos(Xrun_0_11737_lsm_ mirror_orient_1)^2+sin(Xrun_0_11737_lsm_mirror_orient_1)^2)*(cos( Xrun_0_11737_car_orient_2_2)*sin(Xrun_0_11737_car_orient_2_0)- … Design and Verification Design  Graphical visualisation of small eigenvectors  Simulation: optimisation, best method Verification of Model  By initial parameters  Symbolically  Graphically (3D) 19 Scale: 30,000 λ=2.2×10 -6 F(X) X Measured Predicted 644×330 Matrix

20 Future Plans for Caox  Software Related  Hook into various optimisers, export to AMPL (A Math. Prog. Lang.) (used by, e.g., mathematicians, scientists), GAMS (Gen. Algebraic Modeling System), etc. Also provide a better default optimiser  Parallel processing: CUDA, OpenCL  64-bit memory processing (2 64 B=10 6 TB) [2 32 B=4 GB]  Dependencies already support this  Better visualisation: constraints, 3D: Blender, etc.  Theory Related  Better utilisation of sparsity properties  Particular elements of covariance matrix Σ X  Other objective functions, e.g. F(X,L)=0, rather than a class of these of the form F(X)=L 20

21 Caox in Other Environments  Possible integration path in S.A.  Export.C,.h files corresponding to internal S.A. representation  Or work directly on program save files  S.A. graphics engine  Uses  Alternate optimizers  Symbolic representation of F(X), constraints  Scientific publications (various methods for comparison, mathematical rigour)  Exotic changes to F(X) not easily accommodated in S.A.  Block handling of A for large problems  Self-calibration analysis  Report full  Tool for SA developers 21

22 Example F(X) 22

23 Constraints Additional complications over problems without constraints, but are so important difficult to see how to avoid  Inner constraints  Improving convergence, e.g. quaternions  Define a new to allow, e.g. calc of 23 x1x1 x2x2 x3x3 x 2 -x 1 x 3 -x 2  We measure x 1 x 2 x 3 in RTRS's coordinate system  But we are actually interested in x 2 -x 1 and x 3 -x 2

24 Constraints  Fixing poorly defined elements of X which contribute to large condition numbers and poor convergence properties, but don’t particularly affect the quantities we are interested in. 24  Coordinates of internal FSI quill- retroreflector pairs not well determined in transverse directions  We can just fix them to what we like - the overall effect on the accuracy is almost zero if moved correctly


Download ppt "CAOX and the LiCAS RTRS Patrick Brockill LiCAS Group 5 Oct, 2010."

Similar presentations


Ads by Google