Simulates a non-linear regression workflow on synthetic experimental data containing systematic and random errors. Evaluates the effects of random measurement noise, systematic alignment offsets, and uncalibrated geometric parameters on the extracted refractive index.
System Parameters
Target Material
True bulk refractive index. Overridden if a specific wavelength is selected.
Geometric Calibration
True physical angle (Solver assumes exactly 60°).
Goniometer Alignment
Rigidly shifts data (e.g., inaccurate normal reference).
Visual Precision
Gaussian scatter scale multiplier.
Plot Limits
Extracted Index (nglass)
--
True Value: --
Extraction Error (Δn)
--
Deviation from True Index
Non-Linear Regression Fit
Fit Residuals
Angle of Deviation Regression
Governing Analytical Model
δ(θtrue) = θtrue + arcsin[ sin A [ (nglass / nair)2 − sin2θtrue ]1/2 − cos A sin θtrue ] − A
1. Forward Modeling vs. Inverse Regression
The true angle of deviation (δ) is physically governed by the true incident angle (θtrue), the prism apex angle (A), the refractive index of the prism (nglass), and the refractive index of the ambient medium (nair). An inverse curve-fitting regression calculates the unknown variable (nglass) from a discrete array of physical measurements by minimizing the sum of squared residuals (SSR) between the theoretical model and the empirical data.
This simulation employs a 1D Golden Section Search bounded between nglass = [1.60, 1.90]. The algorithm iteratively narrows the bracketed interval containing the SSR minimum by evaluating the objective function at internal points defined by the golden ratio, φ = (1 + 51/2) / 2. The optimization loop terminates when the bracket width falls below a specified tolerance limit (10-6).
2. Metrological Errors & Residual Signatures
The 1-Degree-of-Freedom (1-DOF) regression solver modifies only nglass to minimize the SSR. Because of this mathematical constraint, the solver cannot absorb structural geometric errors without generating characteristic residual signatures.
Random Measurement Noise (σδ): Visual misalignment of reticle crosshairs produces stochastic scatter. Because this Gaussian noise is symmetrically distributed, the statistical regression averages out the error, allowing the extracted nglass to remain highly accurate. The residuals exhibit an unstructured, flat scatter around the zero-axis.
Systematic Zero-Offset (θoff): A goniometer baseline misaligned with the surface normal means the apparent dial reading (θi) differs from the true incident angle by the offset (θtrue = θi + θoff). Mathematically, this applies a rigid horizontal translation to the continuous theoretical deviation curve. However, standard experimental procedure entails the operator measuring data at predetermined, fixed dial readings. Because the sampling grid (θi) remains locked while the physical optics shift horizontally, the sampled data points are displaced vertically along the fixed grid axes. The 1-DOF solver minimizes the SSR by scaling the theoretical curve vertically via nglass. Fitting a vertically scaled curve to data points displaced by a horizontal shift generates a slanted or S-shaped differential in the residuals.
Uncalibrated Apex Angle (A): Manufactured prisms may deviate from the exact 60.00° nominal geometry. If the synthetic data are generated by an apex angle of 60.10°, but the solver algorithm is hardcoded to assume exactly 60.00°, a mismatch occurs. Modifying nglass cannot mimic the distinct boundary constraints induced by an altered apex angle. The fit yields a skewed nglass accompanied by a structured residual signature.
Solver Boundary Limits: The regression algorithm is constrained to evaluate nglass within a physical domain of [1.60, 1.90]. If uncalibrated errors (such as a large negative θoff or a minimized A) drop the experimental deviation curve below the theoretical limit of the lower index bound, the algorithm terminates with a solver failure, indicating the physical data fall outside the valid parameter space of the assumed mathematical model.