Authored By Ethan Keeler
Introduction
Designing an optical system for PCR (polymerase chain reaction) diagnostics combines molecular biology, fluorescence spectroscopy, and robust product engineering. The PCR test is a powerful technique that takes a small sample and replicates DNA and other genetic material into a higher volume suitable for fluorescence identification. As the DNA amplifies through the reaction, real-time PCR tests must repeatedly measure the weak fluorescence signals from dyes or bio-probes. In a clinical setting, these optical measurements can be used to drive quantitative diagnostic and treatment decisions. This article will explore the design of the PCR test's optical subsystem with special consideration on reliability and multiplexing requirements.
A typical optical architecture for this application includes an excitation source (often LEDs or laser diodes), wavelength-selective optics (filters and/or dichroic beamsplitters), collection optics matched to the sample format (tubes, strips, or multi-well plates), and a detector such as a photodiode, PMT, or CMOS camera. Here we will consider a simple topology using LEDs, filters, a multi-well plate, and a rectangular detector to show design steps using Ansys Zemax OpticStudio.
Modern PCR diagnostic platforms increasingly demand multiplex detection, compact form factors, and lower cost without sacrificing analytical sensitivity. Therefore, key design goals include maximizing signal-to-noise ratio, minimizing cross-talk between fluorescent channels, ensuring samples are adequately illuminated, and calibrating channels to detect weak fluorescent signals.
Optical System Design
For this design, we will consider the excitation and emission of five different fluorophores, and therefore, five illumination LEDs and five filtered spectral channels. In this case, Non-Sequential Mode (NSC) in OpticStudio is the right choice for model development, due to the need to consider fluorescent/scattering effects and power. To this end, we’ll need to define excitation sources, cascaded dichroic combiners, interaction with the physically defined well region, and then an out‑coupling lightguide where we analyze the power on each of the five channels. The goal of the model is to capture realistic considerations, including partial reflections at every interface, dichroic angle sensitivity, etendue limits at the well and light guides, and stray light paths that create channel cross‑talk.
Definition of Wavelengths
We can select the center wavelengths of the illumination LEDs using the System Explorer (Wavelengths 1–5). These wavelengths match the spectral absorption of the PCR labels we'll consider. In the preliminary design shared here, it is acceptable to use one wavelength per LED corresponding to the appropriate emission band center; however, for more realistic channel crosstalk or fluorescent absorption, we will want to expand the wavelengths to include multiple points across each LED spectrum. For the purpose of this system, we'll use specifications for available reporter dyes and detection bands created by Bio-Rad® (Real-Time PCR Systems — Bio-Rad).
These PCR dyes are fluorescent labels that report amplification by emitting light at characteristic wavelengths. Each is matched to a suitable illumination source. These dyes can perform common functions, including dyes that bind to double‑stranded DNA to show the amplification process, whereas other dyes are sequence‑specific probes which identify particular targets (pathogens). In multiplex assays, multiple reporter dyes are chosen so their excitation and emission spectra can be separated into distinct optical channels as illustrated in the spectral plots below. Each report dye requires matching excitation LEDs/lasers, dichroics, and bandpass filters. Because spectra are broad and can shift with temperature and optics angle, channel design must account for spectral overlap, filter cutoffs, detector sensitivity, and background sources (autofluorescence, excitation leakage) to minimize cross‑talk while maintaining sufficient signal‑to‑noise performance.
In this model, each LED is added as a simple Source Two Angle, but you could consider a more complex Source Diode or Source File if you have data or a model from a vendor.
Addition of Dichroic Combiners
We define the dichroic combiners by using Rectangular Volumes (glass plates) with coatings in Zemax. In this example they are idealized; however, you can define these coatings using vendor data or by defining the physical layer stack explicitly. These coatings (and later the filters) are defined in Libraries...Coating Catalog. Shown here are idealized cut-on filters at specific wavelengths that correspond to the LED wavelengths (470 nm, 525 nm, 580 nm, 630 nm, and 678 nm).
Using Analyze…Coatings, we can plot the behavior of these coatings over angle, wavelength, etc., to ensure they perform as we expect. These dichroics demonstrate short-pass behavior, meaning shorter wavelengths transmit while longer wavelengths reflect.
Optimizing Focusing Optics
Once all of the LEDs are combined into a co-linear path, we need to focus the diverging beams onto a single sample well. The condenser lens must be carefully optimized so that we fully illuminate the well, while avoiding the illumination of neighboring wells. In this model, we’ve placed a Detector Rectangle at the top of the sample well location, and we leverage ray trace data to optimize for an ideal spot.
We can first define rough optical parameters for the placement of the condenser lens as well as it's optical parameters. Then we set these as variables for optimization:
To set-up the optimization, we will just generate a simple RMS Spot Radius Merit Function that we can generate using the Optimization Wizard. For more information on NSC optimization, please see this article Using the OpticStudio Non-Sequential Optimization Wizards – Ansys Optics. (The attached file has Configuration #7 set up for optimization where we don't consider fluorescence, and we have all LED channels active.)
Important Note: when we run the NSC ray-trace, we will need to ensure we enable Split Rays so that rays can partially transmit and reflect at the dichroic components as well as other interfaces. Initially, we will not consider scattering or fluorescence (leave Scatter Rays disabled) as we optimize the basic optical geometry and lenses.
Once we've completed the optimization, we can view the achieved spot using the Analyze...Detector Viewer:
We can see here that we achieved our initial goal of illuminating a single well for all five LED center wavelengths using a single lens. To further refine the illumination optics, we could also consider adding Merit Function operands for maximizing power, uniformity, etc, but that is not necessary for this example. For now, if we cannot fabricate the custom lenses we optimized in the design, we can find an available off-the-shelf lens to swap in. To do this, we can use the Library...Lens Catalog to help search for suitable optical components. This tool will provide sequential models, but we can easily convert them to NSC models for inclusion here. Many vendors can also provide Zemax files for their off-the-shelf components.
Fluorescence Signal Collection Optics
Introduced near the sample well, the collection lightguide is comprised of a prism and light guide with reflective side faces. The goal of this element is to collect as much of the fluorescence signal as possible and convey it to the filtered detection channels. Each detection channel consists of a smaller light guide and a matching spectral filter to match the chosen reporter dyes. Just as was done for the dichroics, we can define a set of bandpass filters to give the channels the necessary selectivity using the Coating Catalog.
At the end of each channel guide, we've added a matched Detector Rectangle with a single pixel to emulate a high-sensitivity photodiode (or other optoelectronic component) for readout on each of the channels. The Detector Rectangle is commonly used for power and irradiance measurement, and we'll see later that we can leverage Detector Color and other object types to consider spectral information.
Now that we have the full optical model defined, we can run ray trace simulations to see how much power leaks across channels. We will consider this in more detail in later sections where we calibrate the detection for the model. You will notice that there can clearly be impacts from stray-light in the system; to mitigate obvious sources, the model includes a number of simple baffles. In a finalized design, we would want to more carefully consider the true opto-mechanical housing and all the unintended light paths that reduce the signal-to-noise ratio.
Sample Fluorescence Modeling
The final and most important component of the model is definition of the PCR sample. OpticStudio models fluorescence as a probabilistic, ray-based process that mimics absorption and re-emission within a material, rather than explicitly solving the underlying quantum physics. In practice, fluorescence is treated as a stochastic interaction that occurs as rays propagate through a volumetric medium resulting in "bulk scattering" events.
There are two primary approaches used in OpticStudio to represent fluorescence. The simpler method models fluorescence as a byproduct of bulk scattering within a volume. In this approach, when a ray undergoes a scattering event, it may also probabilistically change wavelength according to a user-defined mapping between input and output wavelengths. This effectively simulates the Stokes shift, where absorbed light is re-emitted at a longer wavelength, and the ray is also redirected according to a scattering distribution. This method is computationally efficient and useful defining simple, first order behavior.
A more physically representative approach uses the photoluminescence model. In this formulation, fluorescence is treated as a separate physical process governed by material properties, including absorption spectra, emission spectra, and quantum yield. As rays propagate through the volume, the probability of absorption is determined by the material’s extinction coefficient and absorption spectrum. If absorption occurs, a new ray is generated with a wavelength sampled from the emission spectrum and a randomized direction, while its power is scaled according to the quantum yield. This model also allows fluorescence to be combined with Mie-type scattering in the same medium. We will use this approach in the PCR model with some default values, but these values should be changed to match particular sample characteristics for future studies.
OpticStudio uses Monte Carlo ray tracing to implement these processes. Each ray carries properties such as wavelength and power, and interactions are governed by probabilistic rules defined by the material and user inputs. Parameters such as mean free path determine how often interactions occur, while spectral data and quantum yield control the likelihood and characteristics of re-emission. As a result, fluorescence modeling in OpticStudio consists of branching ray paths where rays can be absorbed, re-emitted at new wavelengths, and redirected multiple times before reaching our light guide.
For more information on how these models work in OpticStudio, please see these articles:
In order to consider the five different reporter dyes and their fluorescent characteristics, we have defined five different sample well values. We can toggle between the volumes using the Multi-Configuration Editor (MCE) by changing the Parent Object parameter of our Array object (more information on this to come).
Each reporter dye has assigned fluorescence properties in the object settings under Object Properties...Volume Physics...Phosphors and Fluorescence. Each dye fluorescence requires three spectral inputs: an absorption spectrum (probability of absorption vs. wavelength), a quantum yield (probability of re‑emission), and an emission spectrum (output wavelength distribution). These are scaled using an extinction coefficient and particle density, which together determine how frequently fluorescence events occur.
We can visualize these spectral inputs by using the Libraries...View Spectrum File viewer. Shown below is the absorption spectrum for the HEX reporter dye as an example. (Note: the data shared in these spectral files is approximate and is for demonstration purposes only. For real-world and production-level simulations, you will want to get accurate data from the vendor).
To simplify management of these sample fluorescence materials, we can leverage the Multi-Configuration Editor to represent each configuration and material. In the figure below, we see six configurations, corresponding to the fluorescent reporters, as well as a calibration setup (Configuration #6). We utilize NPAR to control the Non-Sequential Object's parameters by index. In operand line 2, we control the Parent Object number for the sample tray array, and in lines 4-13, we control which LED source is active by toggling on or off its # Layout Rays and # Analysis Rays parameters. With this setup, all other sources remain off when not in use.
Simulating Optical Performance
After running the ray trace (with Configuration #1, the FAM dye), we can look at the Detector Color (Object #68) using the Flux vs. Wavelength tool. To do this, the rays need to be saved to a to a .ZRD (Ray Database File) during the ray trace and the object needs to be set to Detector Color. In the Flux vs. Wavelength tool settings, we can select the number of bins to visualize, and with a setting of 20, we obtain a result like shown. This spectrum represents the emission of the FAM reporter. Next, we will consider the measured data on the lightguide photodiode detectors.
Collecting/Calibrating Results
To simplify the readout and any required calibration (or post-processing) of the simulation required for the real system, we can leverage the Zemax Programming Language (ZPL) to automate readout from each detector. Then, we can perform subsequent calibration, as well as generate a plot for each channel to show the total detected power after each of the bandpass filters. To generate the readout, you can simply click Programming...Edit/Run, select "pcr_channels.ZPL", and click Execute.
In the ZPL macro, notice the key operations where we loop over each detector, acquire the power from the matched detector, and then calibrate the output signal for the channel.
After the script runs, it will generate a similar plot to the one below that shows the raw power on each channel.
As mentioned, one important consideration here is the calibration of the detection levels at the detectors designed to account for variation in optical coupling through the lightguides (and losses from the bandpass filters). To this end, we can run a "calibration" sample, or light source that has a known power and spectrum. In our example model, we will consider a uniform light source represented by a Source Volume Cylinder. The Source Volume Cylinder will reasonably represent the random nature of the fluorescent sample (not that its effects will be that significant, given the close proximity of the Detector Color). We can configure the settings for this source by going to Object Properties...Sources and specifying the Color/Spectrum for the source. Here, we chose a Uniform Power Spectrum with a range from 450 nm to 800 nm discretized into 25 wavelength points. Many other, more complex, spectrum types can exist to match your test source, and the settings also give the option to import a custom Spectrum File.
If we now run the simulation with Configuration #6 (calibration), then we launch our uniform source into the lightguides. We can see that we get an expected uniform spectrum on the Detector Color. The results of this ray trace are shown in the previous Channel Outputs plot. At first, it looks quite odd since we'd expect that the power detected on each channel should be flat, but we need to consider two important effects: (1) the further channels along the waveguide collect less energy, and (2) the injected power on each channel is not the same due to bandpass filtering (more on this later). By performing a calibration, we can correct for losses and inconsistent light collection across the channels.
We can get the injected power for each channel bandwidth using the Detector Viewer and a filter string representing the band of interest. X_WAVERANGE will filter the rays at the detector from a lower to upper bound on the wavelength range. We must remember to save the rays to a Ray Database file, and then select that file to apply the filter. The total power calculated in the data is found at the bottom of the window.
After we find the power for each spectral band (shown in the second column of the table below), we can run the pcr_channels.ZPL macro again to obtain the raw power values measured at the channel detectors (shown in the third column). From these values we can calculate a simple calibration factor such that we see a scaled output across all channels. Keep in mind this is a very simplistic approach to calibration that makes no attempt to carefully consider statistical behavior, including noise from the ray trace. This is for demonstration purposes only. Also note that the values at the Detector Color are not flat due to varying bandpass ranges for each given channel.
Channel |
Power at Detector Color (μW) |
Power at Channel Detector (μW) |
Calibration Factor |
1 |
5744.6 |
19 |
302.3 |
2 |
5768.7 |
32 |
180.3 |
3 |
17061 |
44 |
387.8 |
4 |
5735.9 |
11 |
521.4 |
5 |
11444 |
17 |
673.2 |
In the script we can enter these calibrated values on lines 16-20.
Final Results & Crosstalk
We can now simulate the actual PCR volumes (Configurations #1-#5) and consider the detected power on each channel. For this ray trace, you will want to make sure that Scatter NSC Rays is active to see fluorescent effects. We also no longer need to save the Ray Database unless you want to see some characterizations that we considered previously.
After running the data collection script, we see the response for the FAM dye. We can understand how the emission spectrum affects adjacent channels, to get a measure of the channel-cross talk for various fluorescent markers.
Stray Light Measurement
A final design consideration is to determine how stray light paths affect the detected power on the channels. For instance, if we activate the HEX excitation channel (of Configuration #2), we may want to determine how much of the LED illumination light leaks into the FAM detection channel (of Configuration #1). We can simulate this by activating the HEX light source, but leaving the corresponding fluorescent sample deactivated (i.e., using a dummy well and sample in a real system). Here we will set the SAMPLE TRAY to use Parent Object #7 and then activate the right source. You can switch to Configuration #2 and then manually change the Parent Object (remember you will want to reverse this later to go back to using the right HEX sample details).
After running the ray trace (you can deactivate scattering), we can use the Detector Viewer and open the Text Tab. Here we see that CHANNEL 1 detects 6 μW of power from the HEX source LED. As we observed previously, this is on the same order of the power detected from the weak fluorescence emissions into the lightguides. This finding tells us that we either need to carefully add stray light controls to the model (which may be challenging) or we can further calibrate this energy out of the measurement. Luckily, the sources and channels have been chosen carefully to avoid channel noise, but this will be an important consideration in systems that have many light sources and detection channels.
Additional Resources
How to design a confocal fluorescent microscope in OpticStudio – Ansys Optics
How to model fluorescence using bulk scattering – Ansys Optics
How to perform stray light analysis – Ansys Optics
Overview of photoluminescence simulation in OpticStudio – Ansys Optics