I have been busy for a few months working on an optical design software programmed in Matlab and I wanted to share a little bit the results I obtained with it so far. It is not ready yet to be released but I successfully used it to design a custom 5x wide field microscopy objective from Thorlabs stock parts.
Optical design is all about the conception of optical assemblies to achieve desired optical performances by overcoming the optical aberrations. For an introduction to optical aberrations and design strategies to correct them, a detailed assembly procedure of the objective and a brief description of the test setup and results obtained, please have a look at the following video:
Good microscope objectives are relatively hard to design because they need to have large acceptance angles and very low aberrations to resolve tiny objects such as cellular features. Moreover, all high performances objectives are also designed to deliver their performances over a large field of view, typically of 25/M mm where M is the magnification of the objective. For instance, high performances 5x objectives usually operate at diffraction-limit over a field of view of 5 mm diameter. Diffraction-limited means that the optical resolution of the objective is limited by the laws of refraction and not by the optical aberrations of the objective. At diffraction limit, the resolution limit is λ/2NA where λ is the wavelength of the light used and NA the numerical aperture of the objective. High magnification objectives then require to have very high NA values (up to 1.4!) which requires to have an extremely good control on optical aberrations (see the video to understand why). As a consequence, optical design gets more and more complex as the magnification of the objective increases.
It is not uncommon to have microscope objectives with more than five lenses with precisely optimized shape to reduce the aberration to a minimum. Optical design softwares do a very good job at optimizing the curvature radii of the lenses but all of that is of little usage to the amateur because custom lenses are simply unaffordable. I would like to be clear on this: custom lenses are no better than stock lenses that you can buy off-the-shelve, they just have the curvature radius and thickness you ask the manufacturer and that you cannot find in stock parts. And because they are made on-demand, they become pretty expensive. Count easily 10 times the price of a stock lens, without the anti-reflection coating and fancy features like mounting and so on.
The big challenge for this article was to design a relatively high performances objective from stock parts. This means that all the lenses aberration must be cancelled by using only off-the-shelve elements and not by software optimization of radii like it is usually performed. The strategy used is the one explained in the video:
- divide high power lenses in two or more lenses to reduce spherical aberration
- find a negative lens that nicely compensate the field curvature effect
- reduce the coma aberration by playing with the aperture position
- ignore chromatism issues to simplify design
The final design of the objective is shown in Figure 1.
The strongest source of aberration comes from the spherical of the high-power lens. To have a magnification effect, the effective focal length of the objective should be short. Using a 200 mm tube lens (one of the standard for microscopes), a 5x magnification requires to have a 35 mm equivalent focal length. With such short focal lengths, we quickly get spherical aberration if we use only one lens. By splitting the power over two identical 50 mm lens (Thorlabs LA1213-A) we almost cancel completely the spherical aberrations.
However, two lenses of 50 mm make something that is between 25 and 30 mm focal length depending on the spacing between the two lenses but, here, I said that the effective focal length was 35 mm. This is because the two lenses used alone have plenty of field curvature as demonstrated in the video. To compensate the field curvature, a 20 mm focal length negative element (Thorlabs ACN127-020-A) is inserted in the optical train. This negative lens will cancel the field curvature independently of its position relative to the other lenses, but it will also reduce the power of the system. The only way to limit the power reduction is to place the lens very close to the object plane. By leaving about 6 mm between the object and the lens, we decrease the objective equivalent focal length to 35 mm.
Choosing the correct lens to compensate for the field curvature is a tricky task because each lens will correct more or less the field curvature depending on its refraction index and the radii of its interfaces. It is a bit like a trial and error process and you should test several negative lenses to see how they perform. If you cannot find a good match, you have to replace one or two of the other lenses and retry all your negative lenses to see if you get a better match.
Once you have reduced the spherical and field curvature, you can try to optimize the position of the aperture to reduce coma. For infinity-corrected microscope objective, the aperture is usually placed at the back of the objective (opposite to the object side) and for finite conjugate objectives or relay system it is better to try to build a symmetric system with the aperture placed at the centre. The fact that you place the aperture at the back side of the microscopy objective in infinity-corrected system is not surprising because you have to consider the microscope setup as a whole including the tube lens. Indeed, the objective-tube lens system makes a finite conjugate system and we know that finite conjugate system must be designed as symmetric with the aperture at the centre. By placing the aperture at the back of the microscopy objective, it split the objective-tube lens in two almost-symmetric part (conceptually). To achieve the best performances, you can build your microscopy setup as a 4f system then.
Finally, the last part is to tune slightly the objective aperture diameter and field dimensions until your objective performances becomes diffraction-limited. If you notice bad-on axis performances, try to reduce the aperture diameter first. If you notice bad off-axis performances, try to reduce the field dimensions. This is how I settled the properties of the custom objective here to 0.07 NA and field number 25. 0.07 NA is a bit short for commercial microscopy objective which are move in the 0.10 NA range for that magnification but that was the best I managed to get with stock elements without complexifying the setup even more. On the other side, a field number of 25 is very good when compared to commercial objectives. On the price range, it is a bit cheaper than the Olympus 4x Plan although the latter is achromatic and offers a little bit more resolution.
All of this bring us to the question of how to assess the performances of the objective. In this post, I will talk about two methods: spot diagrams and modulation transfer functions (MTFs). There are many other techniques available (wavefront aberration maps, raytrace intercept plots, Seidel aberration coefficients…) but they fall beyond the scope of this introduction to optical design techniques.
Let’s start with spot diagrams.
The idea behind spot diagrams is purely geometric. We take a bunch of rays that passes through the lenses at different positions, apply the refraction laws at the various air-glass interfaces using raytracing techniques and look at where the rays intercept the image plane. If the system was perfect, all the red rays of Figure 1 would merge to the same point and all the blues rays should merge to another point. In practice, it is never the case and we get a distribution of positions. This means that, depending on the travel path of the ray through the optical system, we get slightly different ending position. Because the image of a point is not a point anymore, the image becomes blurry. The amount of blur will depend on the distribution spread of the spot, hence the name spot diagram.
Spot diagrams are often represented for on axis source (blue rays in Figure 1) and off-axis rays (red rays in Figure 1) for 70% and 100% maximum field. A circle is usually drawn on top of the spot diagrams to represent the diffraction-limited performances of the system. Remember that because we use a purely geometrical technique, we ignore the effect of diffraction when we render the spot diagrams and in the real world you can never beat the diffraction limit. The setup will be diffraction-limited when all (or almost all) the points will lay inside the diffraction limit circle.
The rays of Figure 1 have the spot diagrams of Figure 2 for a gaussian source of 625 nm with 18 nm FWHM (typical for a red LED illumination). We see that the on-axis performances are diffraction limited and that the off-axis performances (at 2.5 mm field) are slightly above diffraction limit and suffer a little bit of astigmatism, another type of aberration that was not discussed in the video and which originates in a slightly different focal length in the transverse direction.
Working with spot diagram is usually the first thing to look at when designing optical systems because it gives you indication on the type of aberrations you are facing. Large spreads for on-axis rays indicates spherical aberration or defocus for instance and cone-shaped distribution for off-axis rays are typical of coma aberrations.
When we look at the spot diagram of Figure 2, we clearly see that the resolution limit will be about 3 µm (neglecting diffraction effects) on axis because two points lying closer than 3 µm will have spot diagrams that will start to merge together in a common distribution shape. Off-axis, things are a bit more contrasted because the resolution will differ depending on whatever the points will be placed next to each other horizontally or vertically. Clearly, the horizontal separation power will be better than the vertical separation power.
To go one step further and try to figure out what will be the resolution of an actual object, we introduce the Modulation Transfer Function (MTF). The idea behind the MTF is to decompose any input image in a series of sine wave patterns and to check the contrast of each individual sine waves. The contrast defines how black and white separates with 0 being no contrast (uniform grey image) and 1 being maximum contrast (unaltered sine wave pattern). This is helpful because if we record an image of a sine wave pattern and we calculate its contrast, we can compare the experimental value with the simulated one and see how they compare to each other. This is not possible with the spot diagram because we would have to generate an infinitely small point source which is not possible in practice.
The MTF of the system of Figure 1 is shown in Figure 3. I have computed it using OSLO software because my current processing of the MTF does not handle diffraction-limited system very well.
There are quite a lot of information displayed in Figure 3. The two axis of the figure represents the spatial frequency in X and contrast (modulation) in Y. The spatial frequency is given in cycles/mm and is the period of the sine wave pattern for which the curve at that point gives the contrast. Small details correspond to high frequencies and large features to low frequencies. We see that we achieve a contrast of 20% at roughly 160 cy/mm (about 3 µm features size). 20% is usually taken as the limit at which humans or machines cannot distinguish features but the actual cut-off frequency of the optical system is given for a contrast of 0%.
Several curves are drawn in Figure 3. The black curve on top is the diffraction limit of the system which can never be beaten. The other curves are the performances of the system on-axis and off-axis. These two last curves are almost at the diffraction limit which allows us to say that the system performs at diffraction-limit or very close to it.
If we increase the aperture of the system in Figure 1 from 5.2 mm to 7 mm diameter, we see that the system does no longer perform at diffraction limit. This simply means that the aberrations start to limit the performance of the system. If we look at the modulation for off-axis objects, we see that the contrast at 160 cycles/mm slightly dropped below 20%. This effect is even worse at lower frequencies which means that the image will be more blurred than with the smaller aperture. This is a normal effect because, if you check the rays of the extended-aperture system, you see that we get more aberrated rays. Always use the aperture dimension that will maximize the system performance.
The conclusion of all of this is that the system drawn in Figure 1 will be limited to features size of about 3 µm. This is however only the theory for a perfectly aligned optical setup with perfectly manufactured lenses. In reality, lenses will be slightly tilted or shifted in regards to each other and the lens manufacturing quality may be poorer than expected. The only way to have a good idea of the properties of a real system is to proceed to a tolerance analysis. In a tolerance analysis, the system is copied several thousands of times and each copy is slightly perturbated within some given margins. Lenses are tilted, offset laterally, thickness and curvature radius are changed… The MTF of each copy is then computed and the statistical distributions of the MTFs are outputted to the optical designer in quartiles. That way, the optical designers knows that, say, if he builds ten objectives, eight will be at diffraction limit and two will have decreased performances. If you are a microscope objective manufacturer, you will produce a lot of objectives and keep only the one that fit the required performances. Depending on your business strategy, a rejection ratio of 20% might be acceptable or not.
Some systems are more sensitive to others in terms of tolerance and this can affect the manufacturing requirements for the lenses (precision for the thickness, curvatures, shape of the lenses, refraction indices…) or the technology used to hold the lens in the objective tube.
Here, we will build the objective using the most basic lens mounting techniques: spacer tubes.
Spacers tubes are just regular tubes but with carefully controlled dimensions and, eventually, with some extra features to prevent it from having specular reflection. Also, the ends of the tubes are barely chamfered such that they press square on the lenses. When the edge of the tube contacts a spherical lens, it will push on the lens surface such that they auto-centre to correct offset and tilt. This technology is the most straightforward lens mounting technique and it can give you a 0.1 mm centring accuracy typically.
The spacers for the objective are shown in Figure 5. I would strongly suggest you to produce the spacers using a lathe from POM (acetal) plastic but if you do not own one, I have added .stl files at the end of the post so that you can print the spacers using a 3D printer. If you do so, I would advise to dip the spacers in a thick black matte paint to prevent reflections if using FDM printing method or that the model produces dust on the optics if you used SLS printing method.
Finally, I have tested the performances of the objective on an actual USAF 1951 resolution test target from the centre of the field of view and up to the edge (2.5 mm off-centre) to assess the performances. Please have a look at the video for a description of the test setup.
The results are shown in Figure 6 for different field position. The yellow square is the 3 µm features that we expect the objective to resolve from the simulations.
We see that the objective performs exactly like in the simulations with the 3 µm bars clearly defined on-axis and almost defined off-axis. Moreover, we see that the bars can be resolved in one direction but not the other in the off-axis image which confirms the astigmatism predicted by the simulation software. Full performances were measured up to 1.5 mm off-centre.
Considering the nature of the elements (stock lenses) and the mounting used, these performances are very good. The objective does not perform as good as a commercial one in terms of numerical aperture and chromatism, but it definitively shows that it is possible to build successful optical design setups using simple mounting techniques and off-the-shelve lenses.
In a next post, I will describe in details how you can implement your own raytracing software without having to pay thousands of bucks for commercial softwares like Zemax or CodeV!
The .stl files for the spacers and aperture can be downloaded [∞] here. Use 100 µm resolution printing or better.
Please note that I did not test these models because I made my spacers using a lathe. If you notice something odd with the spacers once printed, please contact me so that we can patch this together. You should normally have no problem with them however because I applied safe designing rules.
You may also like: