Banner image placeholder
Banner image
Site avatar

Sukriti Mantri

PhD (UNSW Sydney), B.Tech (IIT Kanpur)

Full-Frame Camera Lens Using a Custom Sequential Ray Tracer


Design Objective:

Design a fixed-focal-length imaging lens for a camera with the following specifications:

1.Sensor format: Full-frame (36 × 24 mm)

2.Horizontal field of view: 40°

3.Maximum f-number: f/8

4.Object distance: Infinity

5.Operating spectrum: Visible light (486–656 nm)

The objective is to develop a multi-element lens system that meets these specifications while minimizing optical aberrations and maintaining good image quality across the entire sensor.

Tasks:

1. Lets start with using first order optics to calculate the focal length and entrance pupil diameter

2. Narrow down on starting number of elements and materials

3. Find out what radii and thicknesses as well as any air gaps if needed

4. Design the system, run optical ray tracing, calculate the aberrations, and image quality (RMS spot, ray fan etc)

5. Optimize the design to improve the aberrations and image quality in the field of view

First Order Calculation of focal length and EPD:

We first calculate the sensor diagonal:

\[D=\sqrt{36^{2}+24^{2}}=\sqrt{1872}=43.27\,\mathrm{mm}\]

Now we use the sensor horizontal dimensions and fov to calculate the focal length:

\[f=\frac{sensor}{2\tan(\theta_D/2)}=\frac{36}{2\tan(40^{\circ}/2)}\approx49.45\,\mathrm{mm}\]

To calculate the EPD, we use the following f/# and the above calculated focal length:

\[\mathrm{EPD}=\frac{f}{F/\#}=\frac{49.45}{8}\approx6.18\,\mathrm{mm}\]

Narrowing on the number of elements and materials:

Here we have off-axis fields in addition to polychromatic spectrum, we would thus have the following aberrations -> chromatic aberrations (longitudinal and transverse), sherical aberration, coma, astigmatism, field curvature and distortion. We need to minmiize all of them. In a very hand-wavy way, we need to satisfy 8 equations (7 aberrations + 1 focal length), thus we need atleast 8 independent variables. A triplet can give us those 8 variables. So lets start with 3 element lens design.

Now we know that for coma and distortion can be minimized with making the two extreme lenses ie first and third lens mirror identical as a seed and to have the aperture stop at the second lens. So lets go with that as out first order deisgn.

Also to minimize chromatic aberrations, let have the two extreme lenses be made of crown glass and the middle lens to be made of flint.

In addition, the  middle flint with negative power can do one more thing. Its negative power reduces the Petzval sum, which flattens the field. All the above are characterstics of classic cooke triplet.

As can be seen, we have already utilized many of those independent variables. However, this will only be a seed so all the variables are still available as independent degrees of freedom. We start with the standard cooke triplet deisgn. This standard cooke triplet design would have N-SK16 as the crown glass and F2 as the flint glass.

Initial focal lenghts:

We know the net focal length from above and we can use the net axial chromatic aberration to be zero. These two together give startign focal lenghts of the three lenses. We only need two equation despite three powers because we have assumed as our seed that power of first and third lens is equal.

\[\phi_1+\phi_2+\phi_3=\phi_{net}\]

\[\frac{\phi_1}{V_1}+\frac{\phi_2}{V_2}+\frac{\phi_3}{V_3}=0\]

We can then use these powers to calculate the seed radii of the three lens using thin lens formula. Seed thickness and air gaps are taken to be 10% of radii and focal length respectively. Once we have all the data, system is designed and exact ray tracing is done.

Results:

The following polychromatic spot diagram for each field is at its own best focus. That focus might not be at the same plane. The sensor, however, is at a fixed location and thus the rms spot for each field needs to be done at the plane.

Polychromatic spot diagram for three fields at their focus. Airy radius was calculated using primary wavelength (d-line)

It should also be noted that at the best focus for each field (not on the same plane), the residual aberrations e.g. spherical. coma, astigmatism are all below 0.1 waves. Zernike aberration values in terms of waves are shown below. In additoin, distortion at the sensor plane (chosen to be the best focus plane of on-axis field at d line) is also small ~ 1.4% for largest off-axis field.

Primary Aberrations (Left, calculated at best focus) and Distortion (Right, calculated at sensor plane)

At the best focus for each field, defocus is very minimal and there to mostly compensate for spherical aberration. Chromatic Aberration - axial as well as transverse for on-axis field is shown. The transverse spread is not much, the axial spread is ~ 0.31 mm. This spread remains around the same value for all the fields.

Axial and Transverse chromatic shift for on-axis field

Values above are shown for each field at its best focus - which does not lie on the same plane. This means there is field curvature in the system. It is shown below. Left panel shows almost a field curvature of 1.7 mm for the largest field. Thus at the sensor plane, this FC shows up as zernike defocus (right panel).

Field curvature vs field angle (Left) and zernike defocus when at sensor plane (Right)

The polychrhromatic spot diagram shown above was at each field's best focus. Below, we see the comparison between the rms spot radius as well as rms wavefront error for polychromatic (weighted equally) for the two cases - when the fields are at their best focus and when they fields are imaged at the sensor plane.

The polychromatic rms spot radius values for comparison are for field {0,10,20} changes from {6.9, 7.2, 10.9} µm for best focus case to {6.9, 24.3, 80.5} µm for sensor plane. Similarly, The polychromatic wavefront error values for comparison are for field {0,10,20} changes from {0.068, 0.072, 0.121} waves for best focus case to {0.068, 0.407, 1.467} waves for sensor plane

The gap comes from field curvature (as seen before using aberrations)

RMS spot radius and RMS wavefront error across fields for best focus case and fixed sensor plane case.


For each field's best focus the residual aberrations - spherical, coma, astigmatism are all below ~0.1 waves. Therefore, on a flat sensor, the perfomance is limited by field curvature (1.66 mm for the 20 degree field), which a field flattener can correct. Thus, our three element design can only get us so far. Optimizing this system usig our in-built custom tracer did not move the deisgn a lot as it is already optimized by using the cooke's triplet arrangement of equiconvex lens and near-symmetric stop position.

Remedy for Field Curvature:

To add the fourth element: summing up the petzval sum of the elements in this system, we can add a fourth element that makes the net petzval sum to be zero. This will give us the power/refractive index ratio we want our fourth element to have. Wanting the power of this lens to not be very high (so that our other aberratiosn are controlled), we would choose a smaller n glass. Once we have the power, we can design an equi-convex lens near the image plane and go from there. With this flattener lens, we trace the rays again. The rms spot radius goes from 80 µm for the largest field to 25 µm for the sensor plane.

Once this is further optimized to keep the rms spot radius, wavefront error, and the field curvature minimum while keeping the net focal length and F/# fixed, the performance improves even further to 14 µm rms spot radius at the sensor plane. The field curvature also reduces to 0.09 mm for 20 degree field. The distortion, however, increased to 4.5%. Chromatic aberrations did not increase al lot with transverse spread being very small and axial spread being 0.29 mm for on axis field (other fields were hovering over the similar values). The field curvature plot and rms spot radius (best focus) is shown below

RMS spot diagram (for each field's best focus) and Field Curvature (showing each field's best focus) for optimized with flattener lens

Final layout and the prescription of the lens' system.

Lens Layout for the camera
Final Prescription of the lens system

Conclusions

The optimized four-element lens achieves low monochromatic aberrations. The f/8 full-frame system (N-SK16 crowns, F2 flint, and N-FK51A field flattener) maintains an effective focal length of 49.45 mm. The residual monochromatic wavefront error remains below approximately 0.1 waves RMS at the three evaluated fields when individually refocused. The polychromatic RMS spot radii range from 6.8 to 13.4 µm at their respective best-focus planes, compared with a 5.7 µm Airy radius. Performance is therefore close to diffraction-limited on-axis, with greater residual blur off-axis.

Adding a field flattener substantially improves image quality on a flat sensor. The original three-element triplet exhibited approximately 1.66 mm of field curvature, producing an RMS spot radius of roughly 80 µm at the outer field on a flat sensor. Introducing an N-FK51A field-flattening element and optimizing the system reduced the best-focus displacement to below approximately 0.1 mm. The resulting flat-sensor RMS spot radii are 6.8, 9.4, and 14.6 µm at 0°, 10°, and 20°, respectively. This demonstrates the effectiveness of adding a dedicated element to correct field curvature.

Distortion and chromatic aberrations remain important design trade-offs. The optimized system exhibits approximately 4.35% maximum distortion over the sampled field, while the measured axial and lateral chromatic spans are 228.8 µm and 15.6 µm, respectively. This is an important design compromise. For an actual camera application, further optimization or software distortion correction is necessary.

The final four-element configuration demonstrates how additional optical degrees of freedom can improve one aberration while requiring compromises in others.

Code Snippets:

#Creating the system

L.add(R1_1, t1, glass='N-SK16', semi_dia=12, conic=0.0, asph=None, kind='sphere', coating=None)
L.add(R2_1, ag1, glass='air', semi_dia=12, conic=0.0, asph=None, kind='sphere', coating=None)
L.add(R1_2, t2, glass='F2', semi_dia=12, conic=0.0, asph=None, kind='sphere',  coating=None)
L.add(R2_2, ag2, glass='air', semi_dia=EPD/2, conic=0.0, asph=None, kind='sphere', stop = True, coating=None)
L.add(R1_3, t3, glass='N-SK16', semi_dia=12, conic=0.0, asph=None, kind='sphere', coating=None)
L.add(R2_3, finaldis, glass='air', semi_dia=12, conic=0.0, asph=None, kind='sphere', coating=None)

#runnning a trace
res = L.trace(ot.Pupil(n_rays=2000))

#zernike aberration
for i in 0,1,2:
    print("the aberrations for", i, "th field is")
    res[i].zernike()
Share

Text Only Owlstown
QR Code
Translate to