Autonomous sputter synthesis of thin film nitrides with composition controlled by Bayesian optimization of optical plasma emission

Autonomous experimentation has emerged as an efficient approach to accelerate the pace of materials discovery. Although instruments for autonomous synthesis have become popular in molecular and polymer science, solution processing of hybrid materials and nanoparticles, examples of autonomous tools for physical vapor deposition are scarce yet important for the semiconductor industry. Here, we report the design and implementation of an autonomous workflow for sputter deposition of thin films with controlled composition, leveraging a highly automated sputtering reactor custom-controlled by Python, optical emission spectroscopy (OES), and a Bayesian optimization algorithm. We modeled film composition, measured by x-ray fluorescence, as a linear function of emission lines monitored during the co-sputtering from elemental Zn and Ti targets in N$_2$ atmosphere. A Bayesian control algorithm, informed by OES, navigates the space of sputtering power to fabricate films with user-defined composition, by minimizing the absolute error between desired and measured emission signals. We validated our approach by autonomously fabricating Zn$_x$Ti$_{1-x}$N$_y$ films with deviations from the targeted cation composition within relative 3.5 %, even for 15 nm thin films, demonstrating that the proposed approach can reliably synthesize thin films with specific composition and minimal human interference. Moreover, the proposed method can be extended to more difficult synthesis experiments where plasma intensity depends non-linearly on pressure, or the elemental sticking coefficients strongly depend on the substrate temperature.


I. INTRODUCTION
Advances in robotics, machine-learning and data science are driving progress in materials science in a data-driven approach, considered as the fourth scientific paradigm 1 after experimental, theoretical, and computational approaches. With the rise of self-driving laboratories, synthesis and characterization of materials can now be carried out with minimal human intervention and at a faster pace, due to efficient exploration of vast spaces of experimental variables by decisionmaking algorithms 2-6 . Contrary to solution-processed hybrid materials, autonomous synthesis of inorganic thin films by PVD is rather scarce 4 , especially in sputtering, despite its widespread use in research and industry. Some of the few existing reports of autonomous PVD include synthesis and optimization of SrRuO 3 7,8 and TiN 2 9 thin films prepared by MBE, and Nbdoped TiO 2 10 thin films prepared by sputtering, which is so far the only work reporting a fully autonomous closed-loop PVD synthesis instrument with in-situ measurements and feedback to a control algorithm.
Although these studies focused on the optimization of material properties such as resistivity and crystallinity, precise control of cation and anion composition in inorganic thin films is of paramount importance. For example, it has been theoretically predicted 11 and experimentally 12 demonstrated that short-range ordering tunes the optical absorption edge in the long-range disordered alloy (ZnSnN) 1-x (ZnO) 2x at a very specific composition of x = 0.25. Also, the resistivity and bandgap of ternary nitrides and their alloys depend mostly on cation composition 13,14 . Furthermore, many promising oxynitrides were recently predicted to possess semiconductor electrical transport and ferroelectric polarization properties similar to halide perovskites, but with longer-term stability 15 . However, the specific O:N = 2:1 required for these properties is challenging to control during synthesis 16 .
In this context, here we report the design and implementation of an autonomous instrument for controlling the composition of thin films with minimal human intervention, leveraging a highly automated sputtering reactor and optical emission spectroscopy (OES). By fabricating Zn x Ti 1-x N y thin films with simultaneous monitoring of optical emission lines from the sputtering of elemental targets, we show that cation composition, spanning a wide range, can be expressed as a function of emission lines only.
Informed by OES measurements, a closed-loop control algorithm with Bayesian optimization as its decision-making agent can effectively optimize the power on each sputtering source to fabricate thin films with specific cation composition, defined prior to deposition, with minimal human interference. Moreover, we show that our model can accurately predict film composition regardless of total power or gas flow, as long as the OES signal is reproduced, but re-calibration is needed if autonomous depositions are carried out at chamber pressures different than that set during model calibration.

II. OVERVIEW OF THE SPUTTERING INSTRUMENT
To enable autonomous synthesis of thin films with controlled composition, we recently designed and built a highlyautomated sputtering reactor. Equipped with four sputtering sources (cathodes), and able to source RF and DC power to the substrate, this high-vacuum (< 1 × 10 −7 Torr) instrument allows the exploration of a wide substrate temperature range, from cryogenic temperatures up to 1000°C.  Fig. 1 shows a high-level diagram of this system, depicting sputtering sources, distribution of process gas and data flow. Additional capabilities include control of gas mixing and distribution to key locations within the sputtering environment, such as individual targets and substrate, time-sequenced shutters, and pressure control via positioning of the gate valve to the turbo molecular pump.
The high degree of automation of this sputtering instrument was accomplished by connecting all its sensors and actuators, such as pressure gauges, power supplies, and pneumatic valves, to a Graphite Edge controller (Red Lion Controls) that interfaces with the user through a Human-Machine Interface (HMI), developed with Crimson 3.1.
This approach allows the implementation of customized software solutions and enables the user to execute complex programmable synthesis recipes, besides offering room for further custom automation. Moreover, real-time deposition data of sputtering parameters (such as power, voltage, pressure, gas flow) are recorded and loaded into a data warehouse 17 .
A unique feature of this reactor is that the Graphite Edge controller supports the Open Platform Communications Unified Architecture protocol (OPC UA), acting as a server. In this way, a Python client can directly communicate with the controller through Python OPC UA libraries, effectively controlling all chamber parameters.
Thus, Python libraries for machine learning and optimization can be leveraged to control sputtering parameters in realtime, which is usually not possible for chambers and accompanying systems available, making this instrument an excellent platform for implementing an autonomous workflow for the synthesis of thin films.

III. OPTICAL EMISSION SPECTROSCOPY
Optical Emission Spectroscopy (OES) is a passive optical diagnostic method that analyzes light emitted from excited atoms and molecules in a plasma environment and, due its simplicity and non-intrusive aspect, it was one of the earliest techniques applied to the analysis of sputtering plasma 18 .
The basic physical process in OES is the excitation of particles by electron impact from level i to j and decay into level k by spontaneous emission with transition probability A jk , resulting in a line emission ε jk with wavelength λ = hc/(E j − E k ), where h is the Planck's constant, c is the speed of light, and E j and E k are the energy levels of states j and k, respectively. This wavelength is detected by the emission spectrometer and is a fingerprint for the radiating particle 19 , while line intensities are proportional to the density of particles in the plasma 20 . It has been shown by previous works that the intensity of emission lines monitoring during sputtering can be connected to resulting film composition 21,22 and material properties [23][24][25] , besides being useful for process control 26,27 .
In glow discharge optical emission spectroscopy (GDOES), a sample of interest acts as a cathode and is sputtered, usually with Ar. By analyzing the emitted light with a spectrometer, elemental composition of the sample and depth profile analysis can be carried out, since the basic assumption is that the intensity of a certain emission line of an element is a function of the concentration of this element in the analyzed material 28 .
Since it is a comparative technique, it needs calibration 29 : reference materials of known composition must be analyzed in order to build a calibration function I λ (X),M = f (c E,M ), where X is the element to be detected in the material M and I λ (X) is the line intensity at wavelength λ of the element X with concentration c in the material M.

IV. CALIBRATION
Optical emission spectroscopy can measure film composition after a calibration procedure is performed, which consists in finding a relation between intensity of emission lines of interest and film composition, which must be measured by a direct technique. In this section, we will discuss each part of this procedure: fabrication of thin films and composition measurement by Energy Dispersive X-ray Fluorescence (EDXRF), OES characterization, and establishing a connection between EDXRF and OES measurements through an analytical function.

A. Thin film fabrication
To demonstrate autonomous synthesis of thin films with controlled composition, Zn x Ti 1-x N y was considered as a validation case as it has been successfully synthesized by our group 13 in the sputtering instrument described in section II. In this work, we assume nitrogen composition will fall on the TiN -ZnTiN 2 -Zn 3 N 2 tie lines, although it is not explicitly measured since cation composition is our focus.
We fabricated thin films on glass substrates (2" x 2" Corning Eagle XG Glass). Before each deposition, the chamber was evacuated at pressures lower than 1 × 10 −7 Torr, after transferring the substrate from a load lock chamber. Two-inch diameter Zn (99.99 % purity) and Ti (99.995 % purity) elemental targets were excited by radio-frequency (RF) sputtering sources. Common to all depositions, the chamber pressure was set at 10 mTorr after introducing 20 sccm of Ar adjacent to each sputtering source (40 sccm total) and 20 sccm of N 2 adjacent to the substrate gas inlet.
Depositions lasted between 45 min and 2 h, always after a pre-sputtering step of 30 min with the substrate shutter closed to clean the surface of the targets, and no substrate heating or cooling was applied. The substrate was rotated during deposition to grow films with homogeneous composition. Fig.  2a shows a sample of zinc titanium nitride fabricated by this process.
Several depositions were carried out with varying powers applied to each target. The resulting films spanned a wide composition, expressed as the average of Zn/(Zn+Ti) (at.%) in The range of power applied to each sputtering source takes into account the maximum power allowed on each target, as well as the minimum to sustain a plasma. Thus, powers ranging from 12 W-30 W and 50 W-140 W for the Zn and Ti targets, respectively, resulted in samples with average composition spanning the range 53 %-98 %, as summarized in Fig. 2. Although it could be possible to obtain cation compositions below 50 % Zn/(Zn+Ti) (at.%), the power on the Zn target would be too small, below 12 W, which was seem to result in films with irreproducible composition for the same chamber conditions. On the other hand, the power on the Ti target would be at the maximum of 150 W, and could not be increased without risking damage to the target.

B. Plasma monitoring
To enable in-vacuum plasma monitoring with OES in our sputtering system, 2-inch stainless steel chimneys were specially adapted to accommodate 90 • collimators with 3 • acceptance angle, as shown in Fig. 3a, each monitoring the glow discharge just above the target.
During each deposition, optical emission spectra from each target were independently recorded by a multi-channel Plasus Emicon MC spectrometer, between 195 nm and 1105 nm, avoiding signal interference during co-sputtering. A useful feature of this setup is that each collimator is equipped with a coating-protection device, consisting of a quartz plate and a capillary cartridge, to avoid deposition of sputtered material on the collimator optics.
Each spectrometer integration time was set to 50 ms, and 10 spectra were collected and averaged to increase the signalto-noise ratio, amounting to a total recording time of about 500 ms per spectrum. Background OES spectra were collected before igniting the plasma on the sputtering sources and then subtracted from all subsequent measurements.
Spectrum measurement and signal processing were carried out with the Plasus Emicon MC software that accompanies the spectrometer, while analysis of emission lines was accomplished with the Specline software, which has an extensive database of spectral lines for atoms, ions and molecules, and features automated line detection based on the elements of interest.
To detect non-overlapping Ti and Zn lines that are sensitive to changes in sputtering power, the Ti and Zn targets were initially sputtered with Ar at 10 mTorr, by injecting 20 sccm of Ar through a gas inlet adjacent to each sputtering source. Fig. 3b shows that a Zn I line at 307.5 nm and Ti I lines between 496 nm and 510 nm are suitable choices, since they do not show any overlap and are intense enough to be detected with the aforementioned spectrometer acquisition settings.
Moreover, these lines are also sensitive to changes in power, as shown in Figs. 3c-d. However, to avoid inaccurate signal evaluation due to broadening and peak shift, common in OES analysis 30 , the integral under the emission signal was taken instead of line intensities. For simplicity, we will refer to this integral as intensity only.
Thus, to incorporate information from both sputtering targets into the analysis, the normalized ratio was taken, as given by Eq. (1): where I is the intensity of the optical emission signal monitored by independent channels over each target. Then, considering that I OES was observed to be stable over time, the median of I OES was taken between signal stabilization -10 min from plasma ignition -and the end of deposition, so that a single OES parameter characterizes the plasma environment.

C. Analytical function
In GDOES, the goal is initially to find a calibration function: a model that describes emission lines as a function of elemental composition in reference samples of known composition 29 . Then, to characterize samples of unknown composition, this calibration function is mathematically inverted, and the resulting model is called the analytical function. By measuring the intensity of a specific line of element X, its composition in a material M can be obtained 31 .
Therefore, in our approach, we establish an analytical function through the calibration procedure, i.e., fabricating samples and measuring their composition with EDXRF, and then finding a model to express film composition as a function of the normalized ratio of intensity of emission lines given by Eq. (1). Fig. 4 shows that a simple linear relation between I OES and composition was obtained, with R 2 = 0.995, Root Mean Square error of 1.0 × 10 −2 , and maximum residual of 2.1 percentage points.
All depositions and OES measurements taken to find this analytical function were carried out on different days, spanning several weeks, including many sources of random changes, such as venting the chamber to perform routine maintenance work, inspection of the collimators for possible coating, and so on. Thus, the analytical function incorporates all these changes that occurred over time, making the model more robust against these sources of noise. However, for future experiments, all the steps for the calibration procedure can be completed in about one day to avoid these sources of noise.

V. CONTROL ALGORITHM
An autonomous closed-loop control system leveraging the high degree of automation of our sputtering reactor was implemented using Python. The flowchart in Fig. 5 summarizes the workflow. At its core, a Bayesian optimization algorithm, implemented with the scikit-optimize (skopt) 32 package, controls the radio frequency sputtering power on elemental targets (Zn and Ti, in this study) and, informed by OES measurements, explores the 2D-space of power applied on the targets until a user-defined OES signal (I OES ) that corresponds to a specific film composition is obtained.
The goal of the optimization algorithm is to minimize an objective function, which in this case is the absolute error between the measured I OES and the user-defined I OES (setpoint), given by Eq. (2): where I current OES = median(I OES ) over the last 10 s of data, to filter out measurement noise.
A Gaussian process was employed as surrogate model for the unknown function that models Eq. (2) as a function of the sputtering powers on the targets. The Radial Basis Function (squared-exponential) was used as kernel, with its hyperparameters optimized at each optimization loop by scikit.
After loading the substrate into the chamber, the only step requiring human intervention is to define start-up optimization and chamber parameters, such as process pressure, gas flows and power on each target, and to specify the desired OES signal (setpoint). Upon setting these initial parameters, the control algorithm initially checks for high vacuum condition in the sputtering chamber. If this condition is satisfied, an automatic routine ignites the plasma on each sputtering source, adds reactive gas (N 2 ) through the substrate gas inlet and controls the chamber pressure.
A countdown for OES signal stabilization begins, and, after it completes, the Bayesian optimization loop starts. Starting with an arbitrary pair of sputtering powers on the two targets set during start-up, the optimization algorithm checks if I OES is stable by verifying it is within a maximum allowed deviation of 3 % from its median over the last 10 s of data. Then, if the signal is stable, it measures I current OES and calculates the objective function given by Eq. (2).
If the objective is higher than a tolerance criterion, a Gaussian process is then fitted to the data, and the point where the Expected Improvement (EI) acquisition function is maximized is then suggested as the next sampling point, within a search space: a new pair of sputtering powers are then set on the RF power supplies connected to the sputtering sources, and adjusted by a ramp procedure at a rate of 2 W s −1 (userdefined) to avoid plasma destabilization due to fast changes in power.
The algorithm then waits for signal stabilization and takes another I current OES measurement. This whole process -OES analysis, evaluation of the objective function, Gaussian regression, sampling a next point -continues until convergence is achieved, i.e., the objective function falls below a tolerance criterion, or a maximum number of iterations is reached, as depicted in Fig. 5. If the convergence criterion is satisfied, the substrate shutter is automatically opened, and deposition starts.
Although the sputtering powers could be controlled by a more conventional Proportional-Integral-Derivative (PID) approach 33 to minimize the objective function, human tuning of PID parameters to control the growth variables represent a serious bottleneck for an autonomous framework, especially if more variables must be controlled, hindering scalability and maintainability, since re-tuning of these parameters is often needed. Conversely, a control method based on Bayesian optimization eliminates these issues by efficiently sampling the search space and refining the surrogate model in a data-driven approach: our knowledge about the likely objective function improves as more data are observed 34 .
Note that this optimization problem is a degenerate one: several sets of power levels can lead to the same OES signal. As we will discuss later in section VI B, our approach of taking the first set of powers for which the algorithm finds convergence does not lead to any detriment in the prediction results, since as long as the desired OES signal is obtained, the composition will not significantly change.

A. Validation
To validate the proposed approach, the aim was to fabricate films with a specific composition, defined prior to deposition: 75 %, 95 %, 65 % and 85 % Zn/(Zn+Ti) (at.%), denoted as validation runs 1, 2, 3, and 4, respectively, in Table I. Zn-rich conditions were chosen due to irreproducible OES measurements and film composition obtained at low powers on the Zn target, as previously mentioned, and the search range for the Bayesian algorithm was set as 50 W-150 W for the Ti target and 13 W-45 W for the Zn target.
For these experiments, the sputtering chamber was kept at 10 mTorr by adding 20 sccm of Ar through each sputtering source and 20 sccm of N 2 through the substrate, as in the calibration procedure. We then set 10 min as initial stabilization window after automatic plasma ignition, which was reduced to 2 min after ramping the power on the sputtering sources during the optimization loop.
After chamber start-up with arbitrary sputtering powers, the control system adjusts the powers to obtain OES signals that would result in films with desired composition. The algorithm was allowed to run for up to 30 iterations, and the convergence threshold was set as 6 × 10 −3 , which was found to guarantee convergence and resulted in a good trade-off between convergence time and accuracy of the predicted film composition. Fig. 6a shows the evolution of the emission signal as a function of time, while the Bayesian optimization algorithm searches for the best set of powers to achieve the desired setpoint signal. After convergence is achieved, the OES signal is stable over time until the deposition ends. Although convergence was fast for Runs 1 and 2, as shown in Fig. 6b, with only 5 and 3 iterations needed for convergence, respectively, the algorithm sometimes needs more iterations due its stochastic nature, as seen for Run 3, which took 17 iterations. Nonetheless, the algorithm was able to achieve convergence for all four validation runs. Moreover, Fig. 6c-f show the values of sputtering powers explored by the Bayesian optimization algorithm and the resulting objective function for all the validation runs.
To verify whether the resulting films had the targeted compositions, EDXRF measurements were carried out across 44 spots on the substrate, and the average value was taken as film composition, as previously discussed. Since the algorithm had a convergence threshold for the OES signal taken as the optimum (convergence happens for when ob jective ≤ 6 × 10 −3 ), we report the predicted composition, i.e., the composition predicted from the analytical function from Fig. 4 based on the OES measurement taken at the last iteration of the optimization routine. Average film thickness was (26.7 ± 0.2) nm,  Prediction errors, calculated as (predicted/actual − 1), express the relative error between predicted and actual film composition. As shown in Table I, the proposed approach was able to autonomously fabricate thin films with composition within 3.5 % of the desired value. As more depositions are carried out with simultaneous plasma monitoring, the resulting OES signal and film composition can be retrofitted into the analytical function to improve its accuracy in predicting film composition. Other routes of improvement include the fabrication of thicker films for higher precision of EDXRF measurements, waiting a longer time for OES signal stabilization after a new power set is suggested by the algorithm, and reducing the convergence criterion from 6 × 10 −3 , at the expense of convergence time.

B. Degeneracy: total power effects
We studied if degeneracy would have any adverse effects in the prediction results. As previously mentioned, the optimization problem of finding the optimal set of sputtering powers to achieve a desired OES signal is a degenerate one: several sets of powers may result in the same signal.
For this study, we varied the power applied to each target for three independent depositions while keeping I OES ≈ 0.902 (dashed line on Fig. 7a), which corresponds to a 75 % Zn/(Zn+Ti) (at.%) (dashed line on Fig. 7b) according to the analytical function. The chamber pressure was set at 10 mTorr by adding 20 sccm of Ar through gas inlets adjacent to each sputtering source (total of 40 sccm), and 20 sccm of N 2 adjacent to the substrate, as summarized in Table II (samples  1, 2, and 3). Fig. 7a shows that it was possible to reproduce the desired OES signal for three different sets of power levels, with a maximum deviation of 3.3 × 10 −3 between the desired I OES and the median of I OES taken from 10 min to the end of the deposition. As seen in Fig. 7b, film composition did not show any significant changes, even though the powers on both targets changed. Prediction errors between actual and predicted composition (given by the analytical function from Fig. 4 based on the median of the OES signal between 10 min and the end of each deposition), were −3.8 %, 1.7 % and −3.3 %, respectively. Therefore, this degeneracy caused by simultaneously optimizing two power supplies does not constitute an issue as long as the OES signal can be reproduced, since the prediction errors are of the same order of those found for the validation experiments shown in Table I. However, other film properties may change, such as morphology and crystallinity, but since we are only optimizing for composition, these side effects are out of scope here.

C. Effects of chamber pressure and gas flow
We also investigated the effects of chamber pressure and gas flow on the OES signal and on the accuracy of the analytical function (Fig. 4) for predicting film composition. For this purpose, we fabricated films at different total flows of Ar and N 2 , and at lower (5 mTorr) and higher pressures (15 mTorr), as summarized in Table II, while keeping constant the set of sputtering powers that the algorithm found in the validation experiments for a film with 75 % Zn/(Zn+Ti) (at.%): 115 W and 15 W on the Ti and Zn targets, respectively.
As shown in Fig. 7a -samples 1, 4 and 5 -the optical emission signal I OES did not show significant changes for different gas flows, with a constant pressure set at 10 mTorr. For these samples, predicting film composition by feeding I OES into the analytical function (Fig. 4) results in small prediction errors, expressed as the relative error between actual and predicted composition, as demonstrated in Table II.
Therefore, the proposed approach can still produce reliable results for different gas flows, but only if the chamber pressure is equal to that set during the calibration step: decreasing the pressure to 5 mTorr resulted in a significant drop in the emission signal with an uncorrelated increase of Zn in the film (Fig. 7b -sample 6).
If the analytical function was still valid for this case, 58.8 % Zn/(Zn+Ti) would be observed in the film, according to the observed emission signal. Fig. 7b shows that the composition of Zn/(Zn+Ti) in the resulting film was 84 %, thus invalidating the analytical function for depositions at pressures lower than that of the calibration procedure.
If this was an autonomous deposition with a desired 75 % of Zn/(Zn+Ti) in the film, the algorithm would try to converge to the setpoint signal of 0.902 by increasing the power on Zn or decreasing the power on Ti, or both, leading to an even higher percentage of Zn in the film, although the desired OES signal would be achieved.
Higher pressures lead to the same effect: increasing the pressure to 15 mTorr resulted in a shift of the emission signal towards a higher value (Fig. 7 -sample 7), with an uncorrelated decrease in Zn/(Zn+Ti) (at.%) in the film to 72.4 %. Although a higher pressure did not cause significant changes in actual composition, the predicted composition from the analytical function in Fig. 4 was 80.9 %, resulting in a relative error close to 12 %, too large for the purpose of controlling film composition. Again, if this was an autonomous deposition, the algorithm would try to reduce the emission signal, which would lead to even higher prediction errors.

VII. DISCUSSION
The effects of chamber pressure in the resulting film composition and OES signal (Fig. 7) can be explained by two effects 20 : at low pressures, the mean free path of the sputtered atoms increases, since they do not experience a significant amount of collisions with Ar atoms and do not get accumulated in the discharge, reducing the intensity of the emission signal.
On the other hand, the substrate is also sputtered by energetic particles, and lighter atoms (Ti, in this case) are preferentially resputtered from the film, which explains the higher Zn/(Zn+Ti) ratio in the film fabricated at low pressure, even though gas flows and powers were the same as for sample 1. In contrast, this phenomenon is reduced at higher pressures, explaining the decreased Zn/(Zn+Ti) ratio at 15 mTorr.
Any effects at the substrate are thus not taken into account, and substrate temperature can also cause large errors on the prediction results, since substrate heating can result in different film compositions even though the plasma conditions are the same. In this way, the variation caused by substrate effects constitutes a hindrance, since several film compositions could be obtained for the same OES signal, contrary to the previously discussed degeneracy caused by total power. Nonetheless, the proposed approach is useful for autonomous synthesis of thin films with user-defined composition. Taking advantage of a short calibration procedure and an automated deposition setup, several analytical functions can be quickly obtained for different pressures and substrate temperatures, making it possible to explore chamber conditions for which film quality is enhanced.
Finally, to further improve the acceleration provided by the synthesis of thin films with controlled composition, future work will focus on developing calibration procedures that are independent of chamber conditions and geometry.

VIII. CONCLUSION
We reported the design and implementation of an autonomous instrument for sputter synthesis of thin films with controlled cation composition, in a highly automated reactor that interfaces with Python scripts. After a calibration procedure to correlate actual film composition, measured by ex-situ Energy Dispersive X-ray Fluorescence (EDXRF), and in-situ optical emission spectroscopy (OES) data obtained during the RF sputtering of elemental targets, we showed that a linear function can predict composition based solely on emission lines.
Informed by real-time OES measurements, a Bayesian optimization algorithm optimized the RF power applied to sputtering sources to synthesize films with user-defined composition. As a case study, our instrument fabricated Zn x Ti 1-x N y thin films targeting x = 0.65, 0.75, 0.85, and 0.95. EDXRF measurements showed that the proposed approach resulted in films with x = 0.65, 0.77, 0.86, and 0.92, thus in good agreement with the targeted composition.
However, for accurate results, it is crucial to maintain the chamber pressure at the level set during calibration, as any variations in this parameter can shift the optical emission signal with uncorrelated changes in the final film composition, leading to substantial inaccuracies. Conversely, changes in gas flow and total sputtering power do not seem to increase the prediction errors if the chamber pressure can be kept at a constant level.
Laboratory Directed Research and Development (LDRD) program. R.W.S. acknowledges support from the Director's Fellowship within the NREL LDRD program. The views expressed in the article do not necessarily represent the views of the DOE or the U.S. Government. Schematics were designed using icons made by FreePik and Vectoricons from www.flaticon.com.

AUTHOR DECLARATIONS
The authors have no conflicts to disclose.

DATA AVAILABILITY STATEMENT
The data that support the findings of this study are available from the corresponding author upon reasonable request.