Development of ML-based Optical Fine Alignment tool
1. (A PROJECT UNDER VACATION STUDENTS’ PROGRAMME OF IUCAA)
MACHINE LEARNING BASED
OPTICAL FINE ALIGNMENT
TOOL
Sashank Mishra
Indian Institute of Information Technology, Allahabad
Under supervision of:
Dr. Sreejith Padinhatteeri, IUCAA
2. MOTIVATION
➔ How to identify source of precise mis-alignments of components in a complex optical systems is
always a difficult task; only well trained and experienced optical engineers/scientists can do that.
➔ Here, we attempt to develop a machine-learning aided software tool which can replace the
experience and training of human brain by a machine (or a robot In future?)
➔ This software tool will be used during alignment of Solar Ultraviolet Imaging Telescope (SUIT),
one of the payloads of the Aditya-L1 mission. SUIT is being developed by IUCAA in collaboration
with ISRO and other institutes.
4. 4
A Design Optimized using a Simulation
software (Zemax OpticStudio here)
Instrument developed as per Design values. One of the Design parameters that we are
using here is Zernike coefficients.
5. ZERNIKE POLYNOMIALS - INTRODUCTION
In mathematics, the Zernike polynomials are a sequence of polynomials
that are orthogonal on the unit disk. They are useful for describing the
shape of an aberrated wavefront in the pupil of an optical system.
A wavefront W can be described by a set of Zernike polynomials. This set of
polynomials can be expressed in polar coordinates over the exit pupil of
radius normalized to unity as:
where ρ is the normalized radius of the circle over which the wavefront is
described, θ is the polar angle from the y axis, am
n are the coefficients of
the polynomial, Zm
n are the Zernike terms, and n,m are the index of the
polynomial.
5
For small variations in the optical
system characteristics, the wavefront
will have small variations, and so
will happen with the Zernike
coefficients.
6. 6
Machine Learning Software
Dataset from Zemax OpticStudio
Results:
1. Probability of each
element being
misaligned
2. Actual values of
parameter of mis-
alignment for each
component
Is the result within
specified
tolerance levels?
EXIT
Interferogram
Zernike
Coefficients
from physical
measurement
Training / Feedback
Results in the form of Zernike
Coefficients
YesNo
Align Optical Model
according to the results
Prediction
8. OPTICAL MODEL DESCRIPTION
Optical System of the telescope is designed using a software package named, Zemax OpticStudio
The parameters affected: Decenter in X, Decenter in Y, Tilt about X, Tilt about Y.
8
Optical Model of the Telescope
Z
Y
X
9. EFFECT OF MISALIGNMENT ON SPOT DIAGRAMS
9
Optimal Primary Mirror
decentered by
0.05mm in X
Secondary Mirror
decentered by
0.05mm in X
10. DEFINING THE PERTURBATION
High number of parameters for different components, all of them have different range. So, performing
perturbation manually is cumbersome.
● ZPL Macro - Computationally highly complex
● ZOS-API for Python (bundled under win32client package for Windows Operating System) -
Provides various in-built functions to extract the parameters of the different surfaces present in
an optical system, and perform various analysis and generate results.
Perturbation was performed for a parameter for a single component, and results were extracted in the
form of Zernike Standard Coefficients(37 coefficients)
10
13. DATA DESCRIPTION
➔ 944 samples, 37 features (each feature corresponds to Zernike coefficient)
➔ Category (Classes):
0 - Primary Mirror 1 - Secondary Mirror 2 - Lens 3 - CCD
➔ Data was shuffled and splitted into 2 parts: Training set (70%) and Testing set(30%)
➔ Index of a row describes the perturbation: type and the quantity.
Eg: dx0.05 -> 0.05 mm decenter in X direction
13
14. DATA PREPROCESSING
Zernike coefficients extracted from subfolders for each perturbation, and combined to create a single
csv file, with all the classes defined.
14
15. MODEL DESCRIPTION
2 - stage model defined
● A Multi-class classification model to predict the exact component having the perturbation (with
the probability).
● 4 Multi-output regression models, corresponding to each class, which predicts the exact
misalignment in all the 4 possible parameters.
Classification model - Random Forest Classifier
Regression models - Decision Tree Regressor
15
Model validation done using K-Fold
Cross Validation on the Training Set
17. RESULTS - REGRESSION MODELS
17
➔ Category 0 - Primary Mirror
Mean Absolute Error in Prediction = 0.2613
➔ Category 1 - Secondary Mirror
Mean Absolute Error in Prediction = 0.0991
➔ Category 2 - Lens
Mean Absolute Error in Prediction = 0.0529
➔ Category 3 - CCD Detector
Mean Absolute Error in Prediction = 14.0571
18. SAMPLE INPUT / OUTPUT
Zernike Coefficients of system having
Decenter of 0.050 mm in Y direction
secondary mirror:
1 -0.36199206
2 -0.01882220
3 -0.01792544
4 -0.20896487
5 -0.05280534
6 0.05785166
7 -0.00633900
8 -0.00664649
18
9 -
0.00017451
10 -
0.00028658
11
0.0000239
7
12 -
0.00002335
13
0.0000561
9
19. 19
Machine Learning Software
Dataset from Zemax OpticStudio
Results:
1. Probability of each
element being
misaligned
2. Actual values of
parameter of mis-
alignment for each
component
Is the result within
specified
tolerance levels?
EXIT
Interferogram
Zernike
Coefficients
from physical
measurement
Training / Feedback
Results in the form of Zernike
Coefficients
YesNo
Align Optical Model
according to the results
Prediction
20. ACKNOWLEDGEMENT
I would convey my sincerest thanks to Dr. Sreejith Padinhatteeri, for giving me the opportunity to work
on this project, and providing me with all the possible guidance, help and advice regarding the project.
Also, I would give thanks to the people here at IUCAA, who were a helping hand whenever I faced specific
difficulty, especially Ravi, Chaitanya, Siddharth, Akshay and Vishal.
20
The coefficients am n will vary if the wavefront shape changes.
Components:
Thermal Filter
Primary Mirror
Science Filter 1
Science Filter 2
Lens
CCD Plate
Secondary Mirror
The zemax file contains the optical system designed, with all the configurations defined on using the tolerance calculation. Our aim is to perturb the alignment on different axis. The parameters that can be affected are: Decenter in X, Decenter in Y, Tilt about X, Tilt about Y, Tilt about Z, and the distance between adjacent components.
The main components which will mostly affect the result image are the mirrors, lens and the ccd plate, and therefore we need to perturb these components and perform the estimation.
Clearly, there is a high number of parameters for different components, and all of them have different range. So performing them manually would be cumbersome. Also, creating a ZPL Macro on such a large complexity would not be possible.
Therefore, we have decided to use the ZOS-API for Python, which comes bundled under win32client package for Windows Operating System. The ZOS-API provides various in-built functions to extract the parameters of the different surfaces present in an optical system, and also to perform various analysis and generate results.
RMS and Geo Radius, from the generated spot diagram at the image plane.
X and Y coordinates of the rays obtained on the image plane, by performing a batch ray trace on the entire optical system (using 30 rays).
Parameters of the model after Grid Search:
max_depth': 5, 'min_samples_leaf': 2, 'min_samples_split': 2, 'n_estimators': 10