Autonomous Nanocrystal Doping by Self-Driving Fluidic Micro-Processors

success in the ﬁ eld, their precision synthesis and fundamental mechanistic studies remain a challenge. The vast colloidal synthesis and processing parameters of LHP NCs in combination with the batch-to-batch and lab-to-lab variation problems further complicate their progress. In response, a self-driving ﬂ uidic micro-processor is presented for accelerated navigation through the complex synthesis and processing parameter space of NCs with multistage chemistries. The capability of the developed autonomous experimentation strategy is demonstrated for a time-, material-, and labor-ef ﬁ cient search through the sequential halide exchange and cation doping reactions of LHP NCs. Next, a machine learning model of the modular ﬂ uidic micro-processors is autonomously built for accelerated fundamental studies of the in- ﬂ ow metal cation doping of LHP NCs. The surrogate model of the sequential halide exchange and cation doping reactions of LHP NCs is then utilized for ﬁ ve closed-loop synthesis campaigns with different target NC doping levels. The precise and intelligent NC synthesis and processing strategy, presented herein, can be further applied toward the autonomous discovery and development of novel impurity-doped NCs with applications in next-generation energy technologies. formation of the three main precursors, used in the sequential halide exchange and cation doping reactions. sequential halide exchange and cation doping reactions of LHP NCs using the developed digital twin unveiled a heterogeneous surface doping mechanism of NCs. Further development of the autonomous robo- ﬂ uidic experimentation strategy detailed in this study can result in a modular smart nanomanufacturing strategy for accelerated development and manufacturing of novel impurity-doped NCs with applications for the next-generation energy technologies.

DOI: 10.1002/aisy.202200017 Lead halide perovskite (LHP) nanocrystals (NCs) are considered an emerging class of advanced functional materials with numerous outstanding optoelectronic characteristics. Despite their success in the field, their precision synthesis and fundamental mechanistic studies remain a challenge. The vast colloidal synthesis and processing parameters of LHP NCs in combination with the batchto-batch and lab-to-lab variation problems further complicate their progress. In response, a self-driving fluidic micro-processor is presented for accelerated navigation through the complex synthesis and processing parameter space of NCs with multistage chemistries. The capability of the developed autonomous experimentation strategy is demonstrated for a time-, material-, and labor-efficient search through the sequential halide exchange and cation doping reactions of LHP NCs. Next, a machine learning model of the modular fluidic microprocessors is autonomously built for accelerated fundamental studies of the in-flow metal cation doping of LHP NCs. The surrogate model of the sequential halide exchange and cation doping reactions of LHP NCs is then utilized for five closedloop synthesis campaigns with different target NC doping levels. The precise and intelligent NC synthesis and processing strategy, presented herein, can be further applied toward the autonomous discovery and development of novel impuritydoped NCs with applications in next-generation energy technologies. characterization probe, with minimal reagent consumption and waste generation. Despite the ease of operation of the most commonly used NC synthesis technique, i.e., batch reactors (flaskbased synthesis), their irreproducible/uncontrollable heat and mass transfer rates, large chemical consumption and waste generation per synthesis condition, and lack of online characterization tools complicate their utilization in closed-loop exploration of LHP NC synthesis and processing parameter space. [45,46] Fluidic micro-processors, defined as microscale processing units which may operate different chemical/physical processes on fluids (e.g., mixing, reaction, extraction, separation) in a flow chemistry platform, with their reproducible and tunable mass and heat transfer rates, as well as ease of integration with online NC characterization probes are considered an ideal experimentation technique for autonomous synthetic route discovery and accelerated reaction space exploration of colloidal NCs. [46][47][48][49][50] Our research group has recently developed the Artificial Chemist technology, that is, a robo-fluidic experimentation platform for autonomous single-and multistage synthesis and multiobjective optimization of colloidal NCs. [40,41] In addition to closed-loop formulation optimization, we have recently demonstrated the potential of the in-house-generated data (i.e., experimental data sets that are generated with the same robotic experimental platform in a research lab) using fluidic microprocessors for surrogate modeling of material synthesis in flow. [51] In this work, we demonstrate the application of the Artificial Chemist to fundamental and applied synthesis science studies of metal cation-doped LHP NCs using cesium lead bromide (CsPbBr 3 ) NCs and Mn as the model LHP and impurity dopant, respectively. First, we demonstrate, for the first time, sequential halide exchange and cation doping of LHP NCs with an experimentally accessible parameter space exceeding 1.6 Â 10 11 (i.e., total number of possible experiments calculated based on the accuracy and range of the fluid delivery module). Next, using a "digital twin" of the hardware of the Artificial Chemist, that is an accurate ML model of the sequential halide exchange and cation doping reactions of LHP NCs, we investigate and identify the key independent input parameters controlling the metal cation doping of LHP NCs. Then, we study the closed-loop multistage synthesis of Mn-doped LHP NCs with multiple optimization campaigns using an active learning (AL) strategy. Specifically, we assess the role of in-house-generated prior knowledge on the accuracy of the informative surrogate model to minimize the overall experimental cost for building the most accurate ML model of the Mn-doped LHP NCs (i.e., closest to the ground truth). Figure 1 illustrates an overview of the self-driven multistage fluidic micro-processor for accelerated fundamental studies and autonomous synthesis of Mn-doped CsPb(Cl/Br) 3 NCs. The presented ML-guided flow chemistry experimentation technique can enable accelerated and accurate mapping of complex formulation-synthesis-property relationship of a wide range of energy-relevant materials beyond LHPs toward informed material synthesis with targeted optical or optoelectronic properties, as well as mechanistic understanding.

Results and Discussion
The developed self-driving fluidic micro-processor for the autonomous halide exchange and cation doping of LHP NCs is shown in Figure 2A. The hardware of the robo-fluidic self-driving platform includes: 1) fluid delivery module which automatically controls the network of ten input fluid streams (nine liquid and one gas). All the individually controlled input streams result in the formation of three main precursors (P 1 , P 2 , P 3 ) defined in Table 1. P 1 represents the starting CsPbBr 3 NCs precursor that is diluted with toluene (TOL) in flow. P 2 represents the halide exchange precursor which includes tin chloride (SnCl 4 ) as the halide source along with oleylamine (OAm) and oleic acid (OA) as the ligands. We selected SnCl 4 as the halide source because of its previous success in Mn doping of CsPbCl 3 NCs compared to other chloride salts. [52] P 3 represents the metal cation dopant precursor that is composed of manganese acetate (Mn(Ac) 2 ) as the Mn source dissolved in 1-octadecene (ODE) and activated with OA. Within each closed-loop experimental iteration of the ML-guided optimization campaign, the formulation of the three main precursors is autonomously adjusted. The volumetric flow rates for each input liquid stream, selected by the experiment-selection algorithm (i.e., the decision-making policy under uncertainty), are automatically applied to the  precursor delivery module (nine computer-controlled syringe pumps for controlling liquid streams).
2) The reaction module consists of two in-series fluidic micro-processors for sequential halide exchange of CsPbBr 3 NCs (micro-processor 1) and cation doping of CsPb(Cl/Br) 3 (micro-processor 2). The UV-illuminated images of the halide-exchanged and cation-doped LHP NCs in their corresponding fluidic micro-processors are presented in Figure 2B,C, respectively. The halide exchange reaction takes www.advancedsciencenews.com www.advintellsyst.com place in micro-processor 1 by in-flow mixing of the CsPbBr 3 NCs and SnCl 4 precursors formulated from P 1 and P 2 streams, as the reactive phase in a three-phase (gas-liquid-liquid) flow configuration. The three-phase flow format, using argon (Ar) as the spacer between the reactive phase droplets and perfluorinated oil (PFO) as the inert carrier fluid, is specifically selected to allow for facile self-synchronized sequential addition of the cation doping precursor into the moving reactive phase between micro-processors 1 and 2. [41,53] Following the halide exchange reaction, the cation doping reaction occurs in micro-processor 2 through in-line injection of Mn(Ac) 2 precursor (P 3 ) into the moving reactive phase droplets containing CsPb(Cl/Br) 3 NCs, without an intermediate NC washing/purification stage in the workflow.
3) The online NC characterization module is utilized for real-time in situ monitoring of the PL spectra of the in-flow synthesized NCs through two custom-machined flow cell modules integrated at the outlets of each fluidic micro-processor. An optical switch is used to automatically control the successive recording of PL spectra corresponding to the halide exchange and cation doping reactions. The obtained PL spectra from both flow cells were validated using a bench-top PL spectrometer ( Figure S1, Supporting Information). Both in situ obtained PL spectra were utilized for investigating the three-phase flow uniformity in each fluidic micro-processor. An automated data processing algorithm of the in situ obtained PL spectra was also developed to identify the optical properties of the cation-doped LHP NCs. The excitonic PL peak wavelength (E P ) and Mn:exciton emission peak area ratio (R A ), automatically extracted from the in situ obtained PL spectra of the in-flow synthesized LHP NCs, were utilized as the two output parameters of the selfdriving fluidic micro-processor. The overall operational workflow of the interconnecting modules applied in the autonomous fluidic micro-processor was controlled by an in-house developed process automation code (LabVIEW). Figure S3, Supporting Information, shows the photographs of the developed modular self-driving fluidic micro-processors. Following the development of the hardware of the self-driving fluidic micro-processors, we studied the slowest reaction time within each micro-processor. The length of each flow reactor was then selected in a way to ensure the online data acquisitions of the halide exchange and cation doping reactions were conducted postreaction completion. The temporal PL spectra for the slowest halide exchange and cation doping reactions are presented in Figure 2D,E. The temporal PL spectra for both halide exchange and cation doping reactions were obtained by keeping the total volumetric flow rate constant (i.e., constant mass transfer rate) and varying the position of the flow cell along the flow reactor to achieve different reaction (residence) times under the same precursor mixing timescale ( Figure 2F). As shown in Figure 2D,E, the halide exchange and cation doping reactions reach completion in 45 s and 60 s, respectively. [6,53] Therefore, fluidic micro-processors 1 and 2 were designed in a way to achieve residence times of 60 s and 90 s, respectively. These design criteria were selected to ensure data acquisition was carried out once both reactions were completed.

Precision of the Fluidic Micro-Processors
The critical aspects of the developed self-driving fluidic microprocessors to ensure minimized total experimental cost for both fundamental and applied studies of colloidal NCs include 1) the uniformity of the reactive phase droplets, 2) flow stability over extended period of time, 3) reliability of the in-line precursor injection, and 4) reproducibility of the in-flow NC synthesis. Thus, in the next set of experiments, we conducted a series of flow characterization and sampling precision experiments. The steady-state time is defined as the duration of waiting time from triggering the precursor delivery module until uniform and well-mixed droplets of cation-doped LHP NCs reach the online characterization module placed after micro-processor 2. Figure 3A shows the temporal evolution of R A over 10 min for three different formulations of Mn:CsPb(Cl/Br) 3 NCs. As can be seen in Figure 3A, the sequential halide exchange and cation doping reactions of LHP NCs reaches steady state within 6.5 min. Next, random input perturbation experiments were conducted to assess the sampling precision of the multistage fluidic micro-processors. Figure 3B illustrates the reproducibility of the modular fluidic micro-processor for a specified synthetic condition (AE0.03) alternating between five randomly selected synthesis conditions. Furthermore, the uniformity and stability of the three-phase flow before and after in-line cation dopant precursor injection were characterized by recording the in situ PL intensity of LHP NCs after each fluidic micro-processor at 400 nm. Figure 3C presents the pattern of the PL intensity variation (400 nm) of the three-phase flow over 1 s. The bright-field image of the three-phase flow format inside the fluidic micro-processor with their corresponding zone in the 400 nm PL plot is shown in Figure 3C. The time duration for the reactive phase droplet, Δt, was measured every 30 s for 10 min. Figure 3D shows the transient variation of Δt over 10 min and illustrates the stability of the three-phase flow configuration before and after the in-line precursor injection within 6 min. The fast-Fourier transform (FFT) of the 400 nm PL intensities at steady state, before and after the in-line precursor injection point (between microprocessors 1 and 2), is shown in Figure S3, Supporting Information, revealing a dominant frequency of 3.0 and 2.6 Hz before and after in-line injection, respectively. This result suggests a quasiharmonic behavior for the droplet formation in the three-phase flow format. The results presented in Figure 3 demonstrate the sampling precision, flow uniformity, and reliability of the developed self-driving fluidic micro-processor for autonomous navigation through the multivariate reaction space of cation-doped LHP NCs.

Autonomous Robo-Fluidic Experimentation
The search for the optimal synthesis conditions in the high-dimensional chemical space of metal cation-doped LHP NCs is a time-and resource-intensive endeavor. Even highthroughput combinatorial screening platforms require multiple human expert interventions to partially navigate around the local optima. In this work, we demonstrate that an AL-guided modular fluidic micro-processor can significantly expedite the NC synthesis space exploration rate and achieve informed precision synthesis by learning/acquiring new data with continuously improved accuracy. We developed and integrated a ML modeling and AI-guided decision-making under uncertainty within a Bayesian optimization framework with the multistage fluidic micro-processors to rapidly build an accurate surrogate model (i.e., digital twin) of the sequential halide exchange and cation doping reactions. The closed-loop experimental campaigns included 1) autonomous experiment selection using uncertainty quantification within a Bayesian framework, followed by 2) automated formulation, two-stage reaction, and data acquisition and analysis, followed by ML model training. Building on our prior results, we opted to use an ensemble neural network (ENN) for modeling the sequential halide exchange and cation doping reactions in the fluidic micro-processors and simulate the multivariate reaction space of Mn:CsPb(Cl/Br) 3 NCs. ENN have shown their efficacy for efficient navigation through such a high-dimensional reaction space even without access to prior knowledge. [40,51] Bayesian AL was utilized both for autonomous learning of the multistage LHP NC materials chemistry and accelerated formulation optimization for desired NC optical properties with minimum experimental cost. A weighted nondimensionalized combination of both system outputs (Ep and R A ) is defined as the objective function, z(x), which is then used for the autonomous decision-making (i.e., intelligent experiment selection) based on the goal of the closed-loop campaign: 1) AL-guided data collection for surrogate modeling (explorative decision policy), or 2) on-demand metal cation doping of LHP NCs (exploitative decision policy).
To build an accurate surrogate model of the sequential halide exchange and cation doping reactions of LHP NCs with six independent input and two output parameters, we used the maximum variance (MV) decision policy to informatively sample the reaction space with the highest uncertainty with respect to z(x). The description of the six individual nondimensionalized www.advancedsciencenews.com www.advintellsyst.com input parameters used by the ENN to create and update the surrogate model is presented in Table 2. Once a global learning of the complex multistage reaction is obtained (AL-guided reaction space exploration), an exploitative search using the pure exploitation (EPLT) decision policy can be implemented to further improve the accuracy of the digital twin. R-squared (R 2 ) of the ENN-predicted versus experimentally measured values of E p and R A was used to evaluate the global accuracy of the surrogate model. A model accuracy of 85% for both training and testing data sets was used as the threshold criteria to identify the appropriate ENN architecture as well as the initial closed-loop MV experimental budget for building the most accurate surrogate model of the sequential halide exchange and cation doping reactions of LHP NCs. Table S1, Supporting Information, shows the comparison of the surrogate model accuracy, built using different MV library sizes (10-60 experimental iterations). As can be seen in Table S1, Supporting Information, 60 MV experiments resulted in the highest surrogate model accuracy. Figure 4A,B show all 60 E P and R A data points, respectively, obtained using the self-driving fluidic micro-processors guided by an MV decision policy. The obtained E P and R A values vary from 404 to 418 nm and 0 to 1.3, respectively. Next, the 60 MV data points were used to determine the most accurate ENN architecture. For this purpose, we studied 90 ENN architectures (100 cascade-forward NNs for each ensemble) by randomly varying the number of layers and nodes from two to ten and from one to ten, respectively. The surrogate model performance of each ENN configuration was tested 5 times. Figure S4, Supporting Information, presents the model accuracy plots for the averaged E P and R A training and testing data sets over five trials of each ENN architecture with respect to training time and total number of parameters (N P ) (i.e., weights and biases) in the ENN. From the results shown in Figure S4, Supporting Information, the most optimal ENN architecture in terms of model accuracy with the lowest training time and N P was found to be the configuration with randomized two to five layers and one to ten nodes per layer. Next, we utilized the optimized ENN architecture to build a surrogate model of the sequential halide exchange and cation doping reactions of LHP NCs using the 60 MV data points. The optimized surrogate model accuracy plots are shown in Figure 4C-F. The model accuracies for all the training and testing data sets shown in Figure 4C-F indicate that the developed surrogate model can serve as an accurate digital twin of the self-driving fluidic micro-processors for the 1) closed-loop Mn:CsPb(Cl/Br) 3 NC synthesis and 2) accelerated formulation-synthesis-property relationship mapping used for  www.advancedsciencenews.com www.advintellsyst.com the fundamental mechanistic studies of the sequential halide exchange and cation doping reactions of LHP NCs.

On-Demand NC Doping
The autonomously generated prior knowledge of the material chemistry (i.e., the digital twin) can be utilized for the informed precision synthesis of metal cation-doped LHP NCs with desired optical or optoelectronic properties in a closed-loop fashion using an exploitation decision policy (EPLT). With the self-driving fluidic micro-processor, we autonomously conducted five closed-loop LHP NC doping campaigns to assess the reliability of the developed system in dealing with the conventional batch-to-batch variation problem of colloidal NCs. The EPLT policy along with the surrogate model built using the 60 MV data points was used to find the most optimal synthetic route of Mn:CsPb(Cl/Br) 3 NCs for five distinct R A values (i.e., Mn doping levels) within a budget of ten exploitative experimental iterations for each optimization campaign. Figure 5A presents the performance of the self-driving fluidic microprocessor for the autonomous synthetic route optimization of cation-doped LHP NCs to achieve the five targeted R A values. Transmission electron microscopy (TEM) image of the in-flow synthesized Mn:CsPb(Cl/Br) 3 NCs for each optimization campaign is shown next to its corresponding EPLT performance plots. The results shown in Figure 5A illustrate that despite the batch-to-batch variations originating from a fresh batch of precursors (different than the batch used for the surrogate modeling), the self-driving fluidic micro-processor can identify the optimal synthetic route of Mn:CsPb(Cl/Br) 3 NCs within ten experimental trials (90 min). Interestingly, the input space region of the sequential halide exchange and cation doping reactions to result two of the targeted R A values (1.5 and 1.8) were not explored during the AL-guided surrogate modeling stage. In fact, the developed ENN surrogate model was not trained on any experimental data with an R A value greater than 1.3. However, the unique extrapolative characteristic of the ENN modeling, utilized in our self-driving fluidic micro-processors, enabled rapid identification of the NC synthetic routes with targeted Mn doping levels outside the data used for model training. Table S2, Supporting Information, summarizes the optimized volumetric flow rates obtained for each closed-loop optimization campaign. The TEM images shown in Figure 5A indicate a uniform and similar size distribution of the Mn-doped CsPb(Cl/Br) 3 NCs (see Figure S5, Supporting Information, for the large field of view TEM images of the same NC samples). Moreover, the cubic morphology of the pristine CsPbBr 3 NCs was preserved after the sequential halide exchange and cation doping reactions. Despite the success of the EPLT decision policy in achieving on-demand NC doping within the defined experimental budget (ten trials), it should be noted that there might be a pareto front for each target metal cation doping level (Mn doping level vs total PLQY vs LHP NC concentration). Future developments of the presented selfdriving fluidic micro-processor in this work with incorporation of additional in situ characterization techniques (absorption spectroscopy and total PLQY) in combination with pareto front-specific decision policies, using a similar closed-loop autonomous experimentation framework, will be able to rapidly identify the pareto front of each target metal cation doping level.
The PL spectra of the optimized Mn:CsPb(Cl/Br) 3 NCs from each closed-loop optimization campaign are shown in Figure 5B. As can be seen in Figure 5B, by increasing the Mn doping level (R A ), the full width at half maximum (FWHM) and location of the excitonic PL peak remained unchanged, while the Mn peak was redshifted. This observation is in agreement with our previous findings, indicating the existence of a heterogeneous surface doping mechanism on the surface of the LHP NCs. [53] In the case of heterogeneous surface doping, the size distribution of NCs remains constant, while in homogenous NC doping the overall size of Mn-doped NCs shrinks, due to the smaller ionic radius of Mn 2þ ions. [54] Such phenomenon accounts for the preservation of FWHM and location of the excitonic PL peak while increasing the surface doping level. Figures S6A,B, Supporting Information, show the X-band electron paramagnetic resonance (EPR) spectra of the pristine CsPbBr 3 and Mn:CsPb(Cl/Br) 3 NCs. Upon Mn doping, a broad EPR peak centered at 3515 G was Figure 5. EPLT autonomous closed-loop optimization campaigns using the self-driving fluidic micro-processor. A) Representation of best-condition-so far R A values during the EPLT search for five distinct optimization campaigns using a ten experimental iteration budget for each campaign. The TEM images of the targeted optimal formulations are shown next to each EPLT performance plot. B) PL spectra of the optimal compositions of Mn:CsPb(Cl/ Br) 3 NCs for each optimization campaign.
www.advancedsciencenews.com www.advintellsyst.com obtained, which confirmed the successful incorporation of Mn 2þ ions into the outer surface of the host LHP NCs. Typically, the EPR spectra for Mn-doped LHP NCs include a six hyperfine splitting profiles. [54,55] However, the presence of such a broad EPR peak indicates the strong Mn 2þ -Mn 2þ interactions with reduced neighboring distance as a result of high concentration of Mn 2þ centers around the outer surface of NCs. The relationship between R A and Mn concentration in Mn:CsPb(Cl/Br) 3 NCs is shown in Figure S6C, Supporting Information. [56] Moreover, the exciton, Mn, and total PLQYs were measured for all five autonomously synthesized Mn:CsPb(Cl/Br) 3 NC samples using the self-driving fluidic micro-processor, and are summarized in Table S3, Supporting Information. As can be seen in Table S3, Supporting Information, it is clear that by increasing R A , the doping level increased as the Mn PLQY increased from 0.7% to 5.5%. Also, the enhancement of the exciton PLQY, while increasing the doping level, suggests the surface healing effect of the Mn doping process by removing the surface defects of the host NCs, including halide vacancies.

Accelerated Fundamental Studies of LHP NC Doping
The vast synthesis and processing parameter space of colloidal NCs in combination with the aforementioned challenges of one-at-a-time batch experimentation strategies complicate the fundamental understanding of the bandgap tuning and doping mechanism of LHP NCs. Understanding the underlying halide exchange and cation doping reaction mechanisms can facilitate the design and precision synthesis of next-generation LHP NCs for solution-processed energy and chemical technologies. In this section, we demonstrate the power of the ML-guided surrogate modeling of the complex two-stage reactions of LHP NCs to unravel the fundamental mechanisms governing the halide exchange and cation doping reactions of LHP NCs. The digital twin of the self-driving fluidic micro-processors constructure by ML-guided autonomous experimentation can facilitate the navigation throughout the reaction space of metal cation-doped LHP NCs.
In the first step, relying on the accuracy and predictive knowledge of the developed surrogate model, we used Shapley value (SHAP) analysis technique to investigate the relative importance of each independent input parameter of the sequential halide exchange and cation doping reactions with respect to the other input parameters in tuning the excitonic PL peak wavelength and cation doping of LHP NCs ( Figure 6A,B). In the Shapley plots, shown in Figure 6A,B, all independent input parameters, known as the plot features, are ranked from the most effective one at top to the least important at the bottom. For each individual feature (i.e., independent input parameter), there is a row of dots, and each one represents a single experiment with a feature value recognized by a color bar. As the dots move away from the vertical line toward the positive SHAP values, the associated input parameter leads to enhancement of the output value (E p or R A ), and vice versa. For instance, Figure 6A presents the SHAP values for E P and implies that the concentrations of SnCl 4 (X 2 ), NCs (X 1 ), and OA (X 4 ) have the highest impact on tuning the extent of E P in this system. Based on this analysis, high concentration of SnCl 4 results in decrease of E P which is due to the completion of the halide exchange reaction (micro-processor 1) and moving www.advancedsciencenews.com www.advintellsyst.com toward the formation of chloride-rich LHP NCs with lower peak emission wavelengths. Also, increasing the concentration of the starting pristine CsPbBr 3 NCs (X 1 ) can increase E P , as the halide salt precursors are not available enough to complete the halide exchange reactions. Additionally, as shown in Figure 6A, increasing the OA concentration results in an increase of E P values as extra oleate ions in the reaction environment avoid chloride exchange reactions to happen due to the removal of the OAm-Cl ligand shell from the surface of the NCs. [57,58] Similarly, SHAP analysis of R A values shown in Figure 6B reveals that concentrations of SnCl 4 , OA-TOL, and Mn(Ac) 2 are the most important input parameters affecting the extent of R A . Further information regarding the effect of each of the identified key parameters on R A values is provided in Supporting Information S6. Next, in order to investigate the synergistic impact of the key input parameters on the system outputs and unveil the underlying aspects of the sequential halide exchange and cation doping mechanism in more details, the top three ranked input parameters by the Shapley analysis were selected to investigate their collective effect on the resulting E P and R A values of LHP NCs using the developed digital twin of the self-driving fluidic micro-processors. Figure 6C-H presents surface plots obtained from the digital twin, revealing the impact of each two selected input parameters (two out of the top three-ranked SHAP features) at three separate levels of the third parameter (the third feature out of the top three-ranked SHAP features not selected as X or Y axis) on both E P and R A while considering a constant value for the rest of the input parameters. Figure 6C presents the effect of the concentration of SnCl 4 and OA on R A at three different concentrations of Mn(Ac) 2 . Similar to the outcome of R A Shapley plot, it is clear that regardless of the concentration of OA, increasing the concentration of SnCl 4 enhances the metal cation doping of CsPb(Cl/Br) 3 NCs. Moreover, at low concentrations of SnCl 4 , it is expected to obtain low metal cation doping levels, and the concentration of OA does not appear to have a significant impact on the extent of R A . However, at high concentrations of SnCl 4 , the accumulation of OA results in lowering the metal cation doping due to the aforementioned ligand detachment issues on the surface of the LHP NCs. In addition, increasing the concentration of Mn(Ac) 2 results in higher cation doping of CsPb(Cl/Br) 3 NCs, due to the higher availability of cation dopants in the reaction mixture. The surface plots presented in Figure 6D reveal that at low concentrations of OA in the reaction mixture, increasing the concentration of Mn(Ac) 2 results in enhancement of cation doping levels in CsPb(Cl/Br) 3 NCs. However, in the presence of high concentrations of OA, increasing the concentration of Mn(Ac) 2 beyond an optimal value has a diminishing effect of the cation doping level of CsPb(Cl/Br) 3 NCs. This behavior may be attributed to the diffusional limitations induced by excess Mn 2þ and oleate ions for conducting the surface doping reactions. Moreover, the reaction mechanisms inferred from Figure 6C,D further validate the accuracy of the feature importance analysis of SHAP values ( Figure 6A, B). The surface plots presented in Figure 6E reveal that at low concentrations of SnCl 4 , increasing the concentration of Mn(Ac) 2 decreases the cation doping level. This result can be explained by the existence of extra oleate ions in the dopant precursor which can remove the ligand shell around the NCs and hinder the sequential cation doping process. Furthermore, at high concentrations of SnCl 4 , increasing the concentration of Mn(Ac) 2 does not enhance the metal cation doping level, which confirms the completion of the metal cation doping reaction as all of the available NC surface sites are filled with the dopants. Moreover, the results shown in Figure 6E suggest that increasing the concentrations of SnCl 4 results in enhancing the metal cation doping level. This observation can be explained by the fact that increasing the concentration of chloride sites in the NCs can increase the possibility of cationic exchange reaction between the activated MnCl 2 -OAm complexes and the PbCl 2 -OAm unit cells, located at the outer surface of NCs. [53,59] Figure 6-H reveals the synergistic effects of the concentration of SnCl 4 , pristine NCs, and OA on the excitonic PL peak wavelength. The analyses of the presented surface plots ( Figure 6F-H) further confirm the mechanistic analyses obtained from the SHAP values of E P values, as shown in Figure 6A. Briefly, increasing the concentration of SnCl 4 provides the driving force for moving toward the completion of chloride exchange reaction in micro-processor 1 and we expect to see a blueshift in the excitonic PL peak wavelength. However, higher initial concentration of the pristine CsPbBr 3 NCs at a constant SnCl 4 concentration will only achieve a partial chloride exchange reaction in microprocessor 1, i.e., higher E P values. Moreover, the existence of excess oleate ions is detrimental for the sequential cation doping reaction, as they impede the completion of the halide exchange reaction.
Considering the results of our accelerated mechanistic studies using the digital twin of the fluidic micro-processors, in combination with the off-line characterizations of the in-flow synthesized Mn:CsPb(Cl/Br) 3 NCs, we propose a heterogeneous surface doping mechanism for the developed sequential halide exchange and cation doping reactions. CsPbBr 3 NCs have a ligand shell consisted of x-type OAm-Br and OAm-OA complexes bound to the surface of NCs besides oleate ions attached to Cs or Pb by occupying the halide sites. [57,60] Purification of the CsPbBr 3 NCs with methyl acetate can remove major portion of oleate ions from the ligand shell, [58] resulting in formation of numerous Pb 2þ and Cs þ vacancies on the surface of NCs. Also, further dilution of the washed NCs can result in breakage of the OAm-Br bindings, and thus the formation of additional surface defects. Thus, the surface defects of the starting CsPbBr 3 NCs include detached ligands and localized trap states due to the formation of truncated octahedra and Br À vacancies. In the first stage, the halide exchange reactions are conducted in microprocessor 1 with the SnCl 4 -OAm-OA complexes. As a result, excess free Cl À and OAm þ ions are introduced around the NCs. Next, Cl À ions can fill the bromide vacancies or halide exchange reaction can happen between Cl-OAm and Br-OAm unit cells. Then, oleate ions can attach to Cs and/or occupy halide sites by attaching to Pb 2þ in the truncated octahedral at the surface of NCs. If the concentration of OA (oleate ions) increases, the OAm-Cl or OAm-Br ligand shell is removed by detaching OAm þ ions bound to the surface of NCs, resulting in deterioration of the NCs. [57] Also, it is likely that the oleate ions occupy the halide sites that can be used for later cation doping reactions. In the second stage of the sequential halide exchange and cation doping reactions in flow, Mn 2þ ions are activated with OA as the metal cation dopant precursor, and the heterogeneous surface doping can take place through two possible pathways: first, the activated Mn-OA units are exchanged with Pb-OA units at the surface of NCs; second, depending on the composition of the halide exchange and dopant precursors, high concentrations of Mn 2þ and Cl À ions in the reaction mixture can result in the formation of the MnCl 2 -OAm unit cells and their further replacement with the PbCl 2 -OAm unit cells at the outer surface of NCs. [53,59] Once all the surface Pb 2þ ions are exchanged with Mn 2þ ions, the reaction reaches to its completion.

Conclusion
In summary, we developed an autonomous robo-fluidic experimentation strategy for accelerated fundamental studies and closed-loop synthetic route discovery of colloidal NCs with multistage chemistries. Specifically, we utilized the developed self-driving fluidic micro-processors for the accelerated formulation optimization and mechanistic studies of the metal cationdoped LHP NCs. A closed-loop AL strategy within a Bayesian framework was utilized to rapidly build a digital twin of the self-driving fluidic micro-processors using 60 autonomously conducted experiments. The architecture of the ENN modeling strategy was tuned by optimizing for the surrogate model accuracy. The developed surrogate model was then utilized for both on-demand synthesis and fundamental mechanistic investigations of the sequential halide exchange and cation doping reactions of LHP NCs. Next, utilizing the materials chemistry knowledge of the surrogate model, we conducted five closed-loop optimization campaigns of Mn-doped CsPb(Cl/Br) 3 NCs with different target doping levels. The unique attributes of the developed self-driving fluidic micro-processors include 1) rapid navigation through the complex multivariate reaction space of halide exchange and cation doping reactions within less than 90 min per target metal cation doping level, 2) reliable system response when dealing with the batch-to-batch precursor variations, and 3) extrapolative search through the unexplored regions of the reaction space. The accelerated mechanistic studies of the sequential halide exchange and cation doping reactions of LHP NCs using the developed digital twin unveiled a heterogeneous surface doping mechanism of NCs. Further development of the autonomous robo-fluidic experimentation strategy detailed in this study can result in a modular smart nanomanufacturing strategy for accelerated development and manufacturing of novel impurity-doped NCs with applications for the next-generation energy technologies.

Synthesis of CsPbBr 3 NCs:
The pristine CsPbBr 3 NCs were synthesized using the hot-injection method reported by Protesescu et al. with minor modifications. [1] The Cs-oleate precursor was prepared through loading 101.7 mg Cs 2 CO 3 , 5 mL ODE, and 312.5 μL OA into a 20 mL septa vial. The mixture was kept under vacuum and heated at 120 C for 30 min, and then heated under N 2 to 150 C to completely dissolve Cs 2 CO 3 . The Cs-oleate precursor was preheated to 150 C before final injection into the PbBr 2 precursor. The PbBr 2 precursor was prepared by loading 138 mg of PbBr 2 , 10 mL of ODE, 1 mL OAm, and 1 mL OA into a 100 mL threeneck flask and dried at 120 C for 30 min and heated under N 2 to 170 C. Next, 1.6 mL of the preheated Cs-oleate precursor was injected into the PbBr 2 precursor, and after 5 s the flask was immersed into an ice bath. The crude mixture of the CsPbBr 3 NCs was then washed using MA as the antisolvent. MA was added to the crude mixture with a 1:1 volumetric ratio. The mixture was then centrifuged at 8000 rpm for 5 min to precipitate the CsPbBr 3 NCs. The precipitated CsPbBr 3 NCs were redispersed in toluene and the solution was centrifuged again at 8500 rpm for 5 min to remove large NCs. [61] The supernatant was further diluted to adjust the initial concentration of the washed CsPbBr 3 NCs to 4 mM, using the molar extinction coefficient reported in the literature. [57] Preparation of Halide Exchange Precursor: A 0.06 M SnCl 4 was prepared by adding 385.5 μL of SnCl 4 , into 50 mL TOL, 2.5 mL OAm, and 2.5 mL OA under N 2 . The SnCl 4 precursor was further diluted in flow through mixing with the streams of pure TOL, OAm-TOL (1:2), and OA-TOL (1:2).
Preparation of Cation Doping Precursor: A 0.12 M Mn(Ac) 2 precursor was prepared by dissolving 1245.8 mg Mn(Ac) 2 powder, into 50 mL ODE, and 10 mL OA. The metal cation dopant precursor was heated under N 2 at 150 C for 2 h. A mixture of OA-ODE (1:2) was used to further dilute the dopant precursor in flow.
Modular Fluidic micro-processor: The modular flow synthesis platform was constructed using three main modules: 1) precursor delivery, 2) reaction, and 3) spectral monitoring modules. The process flow diagram is shown in Figure S7, Supporting Information. The precursor delivery module included nine automated syringe pumps (seven Chemyx Fusion 6000 and two Chemyx Fusion 4000) loaded with gas-tight stainless steel syringes (nine 50 mL, Chemyx) and one automated mass flow controller (MFC, Bronkhorst, EL-Flow Select) for the controlled injection of liquid precursors and Ar into the fluidic micro-processor. All the syringes and MFC were connected to the fluidic junctions by fluorinated ethylene propylene (FEP) tubing (500 μm inner diameter, ID, 1.59 mm outer diameter, OD, 90 cm long). Both fluidic micro-processors were constructed using 750 μm ID FEP tubing. The CsPbBr 3 , SnCl 4 , PFO, and Ar streams were directed to a custom-designed five-port segmentation module to form a three-phase flow in the first fluidic micro-processor. The pristine NC stream was formed by mixing a concentrated CsPbBr 3 NCs solution (4 mM) with pure toluene in a T-junction before entering the segmentation module. The SnCl 4 stream was formed by in-flow mixing of the SnCl 4 precursors in a four-way cross-junction (IDEX Health & Sciences) with OAm-TOL (1:2), OA-TOL (1:2), and pure TOL streams. Two in-line braided tubing were used to ensure uniform mixing of the CsPbBr 3 and SnCl 4 streams before entering the segmentation module. The Mn(Ac) 2 stream was formed by in-flow mixing of the Mn(Ac) 2 precursor with the OA-ODE (1:2) and pure ODE streams. The in-line injection of the metal cation doping precursor into the reactive phase droplet exiting micro-processor 1, before entering micro-processor 2, was accomplished through a T-junction. The total flow rates of the precursors in micro-processor 1, microprocessor 2, PFO, and Ar were set at 400, 250, 50, and 500 μL min À1 , respectively. The spectral monitoring module consisted of two custommachined flow cells, located at the end of each fluidic micro-processor for in situ PL spectroscopy of the in-flow doped LHP NCs. Each flow cell was connected to a fiber-coupled UV LED (365 nm, Thorlabs, M365LP1) as the only excitation light source, and a fiber-coupled spectrometer (Ocean Insight, Ocean HDX Miniature Spectrometer) in a 90 configuration. The in situ PL spectra were acquired using an integration time of 20 ms. To reduce the signal-to-noise ratio for the PL spectroscopy after cation doping reaction, the outlet of micro-processor 2 was connected to an adapter (IDEX union) to increase the FEP tubing ID to 1.59 mm (3.18 mm OD). The droplet formation stability and uniformity within the three-phase www.advancedsciencenews.com www.advintellsyst.com flow configuration in both microreactors were studied using the methodology reported in our previous work. [41] The travel time of each phase passing through the flow cell was measured by monitoring the PL intensity at 400 nm in each flow cell. Neural Network Modeling and Intelligent Experiment-Selection Algorithm: Experiment selection was conducted using an optimized algorithm similar to our prior work. [51] An ensemble of 100 cascade forward neural networks with randomized structure (two to five layers and one to ten nodes per layer) were used to model the 6-parameter input and 2-parameter output space. The output parameters included the peak emission wavelength (E p ) and the Mn:exciton emission peak area ratio (R A ). Output parameters were converted to a scalar value using an objective function, (z(x), Equation (1)) where E P r and R A r are the measured peak emission wavelength and area ratio, respectively, and E P t and R A t are the targeted peak emission wavelength and area ratio, respectively. The weights 0.1 and 0.9 were assigned based on the relative importance of E p and R A during the optimization process, respectively. For each autonomous metal cation doping campaign, the MV policy used to design a set number of experiments to achieve a global understanding of the system. Following the AL stage, an EPLT policy was applied for ten consecutive experiments-using the Bayesian beliefs trained on the data obtained during the AL stage-to reach a target Mn doping level. Exploitation runs were used to refine the model near the target, but they were not used to train models in subsequent closed-loop optimization campaigns. The ENN model was trained on the in situ measured E p and R A values, and the model predictions were created relying on the minimization of z(x). Dimensionless Input Parameters: Given the total flow rates for each fluidic stream, six dimensionless input parameters were used to limit the volumetric flow rate values between 0 and 1. Using the ENN model, the dimensionless parameters were used as the independent input parameter for the construction of the belief model (i.e., sequential halide exchange and cation doping reactions) and choosing the next set of input parameters during the autonomous exploitation runs for each optimization campaign.
Q TOL ¼ 400 À Q NC À Q SnCl 4 À Q OAÀTOL À Q OAmÀTOL (6) X 5 ¼ Q MnðAcÞ 2 À 25 110 (7) Real-Time Data Processing: The PL spectra of the in-flow Mn-doped LHP NCs were extracted from the multiphase system using a procedure outlined in our prior work. [40] In short, 500 consecutive spectra were taken for each experiment. The spectra were sorted by maximum peak intensity at the peak emission wavelength, and a trimmed mean of the 20 highest values was used for the final spectra. Because the reactive phase was encapsulated by the carrier fluid, this process ensured that the center of the droplet was used for correct PL spectra extraction. The values of R A were calculated using trapezoidal rule integration across the relevant wavelength ranges (395-540 nm and 540-800 nm). For the final representation of the in situ obtained PL spectra, a second-order Gaussian fitting was applied to the averaged spectra, similar to the method in our previous study. [53] Flow Cell Validation: The in situ obtained PL spectra of metal halide perovskite NCs using the custom-designed flow cell were validated using a bench-top PL spectrometer (Edinburgh FS5). Figure S1, Supporting Information, illustrates the accuracy of the in situ obtained PL spectra for both pristine and Mn-doped LHP NCs against the benchtop spectrometer.
Purification of Mn-Doped CsPb(Cl/Br) 3 NCs: The collected Mn-doped LHP NCs were washed with EA as the antisolvent with a 2:1 EA:NCs volumetric ratio. For instance, 6 mL Mn-doped LHP NCs with 3 mL EA were mixed and then centrifuged at 7000 rpm for 10 min and the resulting precipitates were dispersed in 2 mL hexane. The clear solution was centrifuged again at 4500 rpm for 5 min to remove large NCs and unreacted Mn 2þ ions. The supernatant was kept for off-line characterizations.
To study the morphology of the pristine and doped LHP NCs, TEM imaging was performed using an FEI Talos F200 operated at the acceleration voltage of 200 kV. The washed NC samples were drop-casted on TEM grids (200 mesh with carbon coating). The EPR spectroscopy was conducted using a Bruker ELEXSYS E500 X-Band CW Spectrometer.

Supporting Information
Supporting Information is available from the Wiley Online Library or from the author.