A Proportional–Integral Feedback Controlled Automatic Flow Chemistry System to Produce On‐Demand AgAu Alloy Nanoboxes

Mixed‐metal nanoparticles present a challenging task for synthesis with high precision and reproducibility due to the complex interplay of compositional and reaction condition factors. The present study demonstrates a highly precise and automated flow chemistry technique for synthesizing AgAu alloy nanoboxes with tailored optical properties. The synthesis process involves a proportional–integral (PI) feedback control mechanism that enables accurate regulation of reaction parameters, such as the flow rate, to achieve the target AgAu nanoboxes having a desired UV–vis absorbance wavelength. The PI control algorithm is built on the first‐order plus dead‐time model, which correlates the flow rate of the precursors with the maximum absorbance peaks of the resultant nanoalloy products. Based on the difference between the real‐time measured UV–vis absorbance wavelength and the target wavelength, the flow rate of the precursor (i.e., reagent concentration) is tuned via an iterative process until the real‐time absorbance wavelength of the AgAu alloy nanoboxes is matched with the target setpoint. The implementation of a PI feedback control mechanism in a flow chemistry system can offer a highly versatile and universal strategy for generating on‐demand complex nanomaterials with significantly enhanced consistency and reliability by mitigating concentration variations and minimizing the need for human intervention.


Introduction
[6] However, large-scale and continuous flow synthesis to produce the target nanomaterials with desired chemical properties requires a trial-and-error approach, which is time-, labor-, and resource-consuming. [7]emission energy. [20]Some efforts were also made in the slow synthesis of inorganic NPs, such as machine learning-driven oscillatory microfluidic and dial-a-particle platforms. [21,22]owever, depending on the target nanomaterials and required properties, a new special model should be developed, which is complicated and unintuitive, and needs expertise in the fields of electrical engineering and information technology.Such limitations could be overcome by developing a universal and easy-to-adopt algorithm for synthesizing target nanomaterials.Such a universal and easy-to-adopt approach includes data acquisition, model creation, and model verification that would accelerate the transition from a manual synthetic batch process in an ordinary laboratory to a fully automatic continuous synthetic platform. [2] proportional-integral-derivative (PID) control, which produces a control signal that adjusts the system's output in response to changes in its input or disturbances, is a commonly used feedback control mechanism that plays a critical and universal role in various control applications, including industrial control systems, robotics, and process control. [23]The efficacy of PID controllers lies in their ability to provide robust control while being relatively simple to implement without need of a high-level of mathematical operations and a high-quality microprocessor.PID controllers are straightforward and very effective, particularly when paired with a depictive dynamic model.Dynamic models are essential for understanding system dynamics in open-loop (manual) or closed-loop (automatic) control.Particularly, the first-order plus deadtime (FOPDT) model is a standard empirical model to be used for stable dynamic control in various industrial processes.The FOPDT model is employed to obtain the initial controller tuning constants, such as process gain (K p ), process time constant (τ p ), and process dead time (θ p ).Those values are subsequently used in a prespecified tuning algorithm to design a PID controller.Based on the K p , τ p , and θ p values, the K C , τ I , and τ D could be determined, and based on those values, the flow rate of the precursor solutions can be continuously changed until the target nanomaterials are produced.
In this context, we have demonstrated the feasibility of the PI (derivative (D) control equals zero due to no change of the target peaks (TPs)) control in the flow chemistry by presenting an integrated continuous microfluidic system to synthesize on-demand AgAu alloy nanoboxes as a model.The target maximum absorbance wavelength of the AgAu nanoalloy is predefined, considering a balance between the chemical stability of Ag and the high activity of Au as a catalyst, [24,25] and the composition of Ag and Au is automatically tuned by a PI algorithm to produce the desired spectroscopic properties of the products.We evaluated the capability of the proposed platform by producing AgAu alloy nanoboxes with three TPs through blueshift or redshift experiments and have proven its effectiveness and versatility in creating models that can accurately generate the optical properties of nanomaterials based on specific input parameters.This innovative approach has paved the way for a universal methodology to develop a model for the automatic synthesis of target nanomaterials with desired properties.

Construction of an Integrated Continuous Flow Synthetic System with a PI Control
Figure 1a depicts the overall schematics of an integrated flow chemistry synthetic system operated by a PI control to synthesize the AgAu alloy nanoboxes.The platform consisted of a custommade syringe pump module to adjust the flow rate of the reagents, a flow cell for real-time measurement of the UV-vis absorbance of the produced AgAu alloy nanoboxes, a feedback controller to reset the reaction conditions, and a sample collector.The syringe pump body was designed using a Cut2D version 10.5 software (Vectric, USA) and fabricated from PMMA sheets (Acrytals, South Korea) by a TinyCNC-6060C milling machine (Tinyrobo, South Korea).The syringe pump motors were equipped with a 51/1 reduction gear for fine-tuning the flow rate and were controlled by a TMCM-3110 motor driver (TRINAMIC, Germany) through a Python API (pyTMCL).The Seabreeze package was used for the portable spectrometer interface, and a matplotlib package was employed for process monitoring.The absorbance flow cell has a 10 mm light path to mimic the standard cuvette.A balanced light source using deuterium and tungsten halogen lamps passes through a filter to eliminate the alpha deuterium line in the visible region.The two light cables were 2 m-long multimode fibers with a diameter of 400 μm for enhanced transmitted light signals (QP400-2-UVÀvis, Ocean Optics, UK).The first cable was plugged into the absorbance flow cell from the light source.The second cable was aligned with the first, plugged into the other end of the flow cell, and linked to a portable spectrometer (USB4000, Ocean Optics, UK).A singleboard computer Raspberry Pi 4 was used for signal processing, visualization, and PI feedback control.The peak detection was performed by fitting the upper half of the spectrum to a polynomial equation after raw signal processing using the 1D Box filter (width = 10).
Figure 1b shows a digital image of the proposed synthetic system.Each of three solutions (Ag nanocube [NC], HAuCl 4 , and ascorbic acid [AA]-poly(vinylpyrrolidone) [PVP]) was loaded separately into a syringe.A syringe containing the AA-PVP solution was connected to a commercial pump for providing constant flow rate, while custom-built pumps with a PI control regulated the flow rates of a syringe containing the Ag NC and HAuCl 4 solutions.The two solutions of the Ag NC and HAuCl 4 have encountered at a T-connector, and then the AA-PVP solution merged at the next T-connector.The Ag/Au molar ratio was controlled by regulating the flow rate of the Ag NCs and HAuCl 4 precursor solutions.All mixing and chemical reaction occurred in a PTFE tube (1/16" OD Â 1/32" ID), which retains chemical resistance, flexibility, low absorption, and high transparency.The flow rate of the AA-PVP solution was maintained at 150 μL min À1 , and the total flow rate of the Ag NCs and HAuCl 4 precursor solution was maintained at 300 μL min À1 , doubling that of the AA-PVP solution.The tube length from the first to the second T-connector was 500 mm.The combined solution was then transferred to a reaction tube that was immersed in a water bath at 70 °C.The product stream of AgAu alloy nanoboxes flowed through a bubble trap to eliminate any bubbles before they reached the absorbance flow cell.With a total flow rate of 450 μL min À1 , the tubing length from the second T-connector to the absorbance flow cell was 1750 mm, ensuring that the AgAu alloy nanoboxes were fully synthesized before reaching the detection point (i.e., total reaction time: %2 min).Real-time absorbance measurements were displayed on the monitor screen as AgAu alloy nanoboxes passed through the flow cell.Finally, the products were collected in vials for further characterization.

Continuous Flow Synthesis of a Variety of AgAu Alloy Nanoboxes
Firstly, Ag NCs were synthesized on a batch scale and characterized by UV-vis absorbance spectrometry, field emission transmission electron microscope (FE-TEM), Fourier transform infrared spectroscopy (FT-IR), and X-ray diffraction (XRD) analysis (Figure S1-S3, Supporting Information).Secondly, AgAu alloy nanoboxes were synthesized on a batch scale for reference, and their normalized UV-vis absorbance spectra and FE-TEM analysis are shown in Figure S4-S5, Supporting Information.
We also synthesized seven types of AgAu alloy nanoboxes in a continuous flow synthetic system (Figure 2a) by varying the ratio of the flow rates of the Ag NC and the HAuCl 4 precursor solution.As the flow rate of the HAuCl 4 precursor solution gradually increased, the color of the synthesized AgAu alloy nanoboxes changed from yellow to brown to purple to blue.As the resultant AgAu alloy nanoboxes had different metal compositions between Ag and Au, the AgAu nanoalloys revealed different UV-vis absorbance wavelengths under the irradiation of the deuterium and tungsten halogen lamps.
In Figure 2b, the shortest UV-vis absorbance wavelength of 434 nm was observed with a flow rate ratio of 290 μL min À1 : 10 μL min À1 for the Ag NC and Au ion solution, respectively.On the other hand, the longest wavelength of 615 nm was detected at the flow rate ratio of 170:130 of the two solutions.As the flow rate of the HAuCl 4 precursor solution gradually increased, the Au ions were coated on the Ag NCs, and then the void nucleation was formed in the Ag nanoboxes, followed by void propagation and shell deposition (Figure 2c). Figure 2d shows a nonlinear graph of the shift in the maximum absorbance peak according to the flow rate of the Au ion solution.Our research goal was to automatically produce AgAu alloy nanoboxes with the desired maximum absorbance wavelength using a continuous flow synthetic system equipped with a PI control.We set three TPs (525, 535, and 545 nm) for red-shift experiments and three TPs (440, 450, and 460 nm) for blue-shift experiments to demonstrate the feasibility of the automatic PI control.

Workflow from the Screening and Modeling Step to the Synthesis Step
Figure 3 outlines a flowchart describing the total workflow from the screening and modeling step to the synthesis step to generate AgAu alloy products with the desired absorbance peak, even without prior knowledge of the compositional ratio between Ag and Au.First, in the screening and modeling step, a step test was carried out to correlate the UV-vis absorbance peaks with the flow rate of the Au ion solution.During the step test, we conducted a systematic variation of the flow rate of the Au ion precursor solution in order to determine the range of flow rates that would result in a UV-vis absorbance response of the resultant AgAu nanoalloys that could be correlated with the applied flow rate of the precursor solution.The total number of steps (i.e., the tuning number of the flow rate) was also maximized as long as the absorbance peaks were distinguishable upon the change of the step.The duration time for each step was 600 s, while the last step was maintained for 1200 s to ensure that the output (maximum absorbance wavelength) was stabilized.
From the step-test data, K p , τ p , and θ p values could be calculated using the FOPDT model as shown below with a sequential least squares programming (SLSQP) optimizer. [26] where y(t) is the recorded maximum absorbance peak and u(t) is the flow rate of the Au ion solution.
In the next step, the controller gain (K C ) was acquired after an additional tuning step with the internal model control (IMC) method. [27,28]Although the τ I value was initially generated by the IMC method, we further optimized it experimentally to lower the overshooting, shorten the time to reach the TP, and minimize the fluctuation of the maximum absorbance peak after reaching the TP.The derivative time constant (τ D ) value was set zero because the TP did not change during the synthesis run.Through this process, the values of K C and τ I were determined, which corresponded to the value of P and I, respectively.The adequacy of those values for the PI feedback control was evaluated in the blueshift and redshift experiments.
The synthesis step starts with a graphical user interface (GUI), allowing the user to enter necessary information such as the initial flow rates of the precursor solutions, a TP, a sampling interval time (SIT), the K C and τ I values, and other graph plotting configuration.The screen capture of the GUI is shown in Figure S6, Supporting Information.An initial flow rate was kept constant for 240 s to stabilize the whole synthetic system before triggering the PI control.Then, an infinite loop started with the arbitrary initial flow rate of the precursor solutions, and the generated absorbance spectrum was recorded and compared to the TP.The wavelength difference (represented as e(t) in the equation below) between the TP and the currently observed absorbance peak was calculated, and the PI control considers the e(t) value as an input.Then, it provides a new set of an output flow rate of the Au precursor solutions (i.e., u(t) in the equation below) that allows the absorbance peak of the resultant AgAu nanoalloys to approach the TP.The adjusted flow rates of the Ag NC and Au ion precursor solutions were calculated using the following equation with predefined K C , τ I , and τ D values.
where u bias is the current flow rate, e(t) is the wavelength difference, Δt is the SIT, PV is a process variable, and u(t) is the new flow rate of the Au ion solution.Note that the derivative (D) control equals zero due to no change of the TP (τ D = 0).The commands for the adjusted flow rate received from the PI controller were delivered to the motor driver to change the flow rate of the customized syringe pump for the Ag NC and Au ion solutions.The new set of the precursor solutions synthesized a novel AgAu nanoalloy whose absorbance wavelength was closer to the TP than before.Again, the wavelength difference between the TP and the current peak was measured (i.e., e(t) value) and based on the above equation, a new u(t) value was generated.Such an adjustment of the flow rate of the precursor solutions was repeated until the current UV-vis absorbance peak was finally matched with the TP.The monitor screen in Figure 1b shows the current spectrum with a current flow rate of the Ag and Au precursor solution (at the bottom bar), the change of the maximum absorbance spectrum (at the top left), and the change of the flow rate of the Au ion solution (at the bottom left).During these infinite iteration processes, all data of the absorbance spectra and the flow rates of the precursor solutions were automatically recorded in a CSV format.Even if sudden alterations such as precipitation occurs in the precursor concentration, the system can be self-corrected through iterative processes.User can close the monitoring window and ends the experiment at any time without data loss.

A Screening and Modeling Step to Induce the Dynamic Relationship between the Maximum Absorbance Peaks of the AgAu Alloy Nanoboxes and the Flow Rate of the Au Ion Solution
Four kinds of the step test were conducted to observe the effect of the step changes in the Au ion flow rate on the maximum absorbance peaks of AgAu alloy nanoboxes.The first experiment was the step-up, meaning that the flow rate of the Au ion solution gradually increased from 10 to 110 μL min À1 , with incremental steps of 20 μL min À1 .The second experiment was the step-down from 110 to 10 μL min À1 , with six decremental steps of 20 μL min À1 .In the third and fourth experiments, the flow rate of the Au ion solution was changed randomly with six steps.Figure 4 illustrates the results of these screening step-test experiments.In the step-up test in Figure 4a, the maximum absorbance peaks increased as the flow rate was augmented, while the stepdown test shows the gradual decrease in the absorbance peaks in proportion to the flow rate of the Au ion solution (Figure 4b).In the two random step tests, the profiles of the absorbance peaks were similar to those of the flow rate.In all four experimental trials, even though some part of the data set showed that the absorbance peaks did not follow the pattern described in Figure 2b,d due to intrinsic fluctuation of the flow rate and relatively long reaction time for the feedback control, the observed maximum absorbance peaks of the AgAu alloy nanoboxes displayed a correlation with the flow rates of the Au ion solution with the time delay of approximately 2 min, which is consistent with the calculated total reaction time.Each step test produced the unique set of K p , τ p , and θ p values using the FOPDT model with the SLSQP optimizer.Thus, four sets of K p , τ p , and θ p values and their average were obtained after four screening experiments (Table 1).Now we have established a descriptive model that accurately characterizes the correlation between the observed maximum absorbance peaks of the AgAu alloy nanoboxes and the flow rates of the Au ion solution.Then, the average K p , τ p , and θ p values were used for the next step of tuning correlation by the IMC method.Through the IMC-based tuning process, the K C value was obtained by inputting the τ C value. [29,30]The τ C parameter will serve to regulate the degree of responsiveness (aggressive, moderate, or conservative) of the PI control system in response to the deviation between the present peak and the TP.Thus, the τ C could be chosen as the following options and accordingly the K C value was calculated.In this case, the closed-loop speed or the SIT was set at 10 s.
The choice rule among the aggressive, moderate, or conservative tuning was generally applied to industrial processes with low dead time and high tolerance for overshooting of the input (the control variables) and the output (the process variables).However, the current flow synthetic system had low tolerance for the input (the flow rate) overshooting and high dead time (i.e., relatively long reaction time).For example, as we kept the total flow rate of the Ag and Au precursor solution as 300 μL min À1 , the exceeding flow rate of Au would lead to a negative flow rate of the Ag precursor solution.Thus, an extremely conservative tuning approach would be adequate in this case so that the overshoot of the tuned flow rate was minimized during the long reaction time.As a result, the PI control system may exhibit a relatively slow response to the difference between the current peak and the TP, but such an algorithm would prevent overshooting problems or the occurrence of a negative flow rate.Considering all these factors, we set the τ C value as 120θ p , which is equivalent to 22868.793, and the K C value was obtained as 0.01.Through experimental optimization, the optimal value of τ I was determined to be 5000.This value was selected based on a balance between the time required to reach the TP and the amount of fluctuation of the maximum absorbance peak observed after reaching the TP.

Production of AgAu Nanoalloys Having Shorter Absorbance Wavelength through Blueshift PI Feedback Control
We used the GUI to set up the TP values (440, 450, and 460 nm) and PID values (K C = 0.01, τ I = 5000, τ D = 0) for blueshift feedback control.Figure 5 depicts the plots of the recorded data from three blueshift experiments.Figure 5a shows the changes of the flow rates of the Au ion solution, while Figure 5b displays the maximum UV-vis absorbance peak of the resultant AgAu  nanoalloys.The initial flow rates for both the Ag NC and the HAuCl 4 precursor solutions were set at 150 μL min À1 , generating the AgAu alloy nanoboxes with an absorbance wavelength of approximately 560 nm.The initial flow rate was maintained for 240 s to stabilize the whole synthetic system.Then, the flow rates of the precursor solutions were adjusted by the PI feedback control based on the difference between the observed and the target wavelength.Such an iteration was repeated every 10 s during the synthesis experiment for 5000 s.As the flow rate of the Au ion solution gradually decreased, the maximum UV-vis absorbance wavelength of the resultant AgAu nanoalloys was reduced similar to the pattern of the flow rates.For the TP of 440, 450, and 460 nm, all the flow rates declined and were dipped around 50 μL min À1 at 1500 s and then stabilized at distinguishable flow rates of 62.7, 54.6, and 49.3 μL min À1 , respectively (Figure 5c).At the same time, the absorbance peak gradually approached the TP with slight overshoot and undershoot and then was stabilized around the TP (Figure 5d).Complete changes in the absorbance spectrum over the experimental period are shown in Figure 5e for the TP of 440 nm, Figure 5f for the TP of 450 nm, and Figure 5g for the TP of 460 nm.All of them started from around 560 nm of the UV-vis absorbance wavelength, and then were blue-shifted to touch each target wavelength after 1600 s and maintained with stability, demonstrating that the PI feedback control-based flow chemistry could produce the on-demand nanomaterials with high speed and accuracy.Note that the interval among the three TP wavelengths was only 10 nm, indicating high precision of the proposed synthetic methodology.Record of the entire processes for the blueshift PI control to synthesize the target AgAu alloy nanoboxes with an absorbance wavelength of 450 nm is provided in the abstract video Movie S1, Supporting Information.

Production of AgAu Nanoalloys Having Longer Absorbance Wavelength through Redshift PI Feedback Control
After completing blueshift experiments, the proposed synthetic system was further tested with redshift experiments using the TPs of 525, 535, and 545 nm. Figure 6 depicts the plots of the recorded data for the synthesis of the AgAu nanoalloys using the redshift PI feedback control.Similar to Figure 5a, the change of the flow rates of the Au ion solution is displayed in Figure 6a to produce the target nanomaterials having the TPs of 525, 535, and 545 nm.At the same time, the transition of the maximum UV-vis absorbance peak of the resultant AgAu nanoalloys are shown in Figure 6b.The only modification made for these redshift PI control experiments was the initial flow rate and the TPs in the GUI.All other parameters, such as the PID values, the SIT, the total running time (5000 s), and the monitoring plot parameters, remained unchanged.The initial flow rates of the Ag NC and HAuCl 4 precursor solutions were set to 290 and 10 μL min À1 , respectively, to produce the AgAu alloy nanoboxes with an absorbance wavelength of 420 nm.Then, the flow rate of Ag NCs was reduced, and that of the HAuCl 4 precursor solution increased by the PI control, leading to a redshift of the absorbance peak of the AgAu nanoalloys.The flow rates of the Au ion solution increased from 10 μL min À1 to more than 90 μL min À1 and then were stabilized at different flow rates to produce distinct AgAu nanoalloys with different TPs (Figure 6c).As the gap between the TP of 545 nm and the initial peak (420 nm) was largest, the slope of the flow rate showed the steepest gradient among the three TPs.As the flow rate of the Au ion solution was stabilized, the UV-vis absorbance peaks gradually approached the TP and oscillated around the TP (Figure 6d).The time required to reach the TP was approximately 1200 s for all cases.Although the TP was far from the initial value of 420 nm, the absorbance peak of the synthesized AgAu nanoalloys rapidly and smoothly reached the TP without a significant overshoot, highlighting one of the merits of the PI control.In the equilibrium state, the synthesized AgAu nanoalloys showed distinct absorbance peaks at 525, 535, and 545 nm, respectively (Figure 6d), which features another advantage of the PI control in reducing steady-state error.Unlike other methods such as proportional control or integral control, PI control incorporates both the proportional and integral components, allowing it to react not only to the present error but also to any accumulated past error.This is capable of the system accurately tracking the target setpoint and compensates for any persistent errors that may arise due to system disturbances or other external factors.The complete absorbance spectra for the redshift experiments with three different TPs are shown in Figure 6e-g.The 3D graphs show an overall view for the entire evolution of the absorbance spectrum, and the stability of the whole spectrum at the equilibrium state.
The synthesis of the AgAu alloy nanoboxes with an absorbance wavelength of 535 nm via the redshift PI control is provided in the abstract video Movie S1, Supporting Information.Both blueshift and redshift experiments successfully demonstrated the adoptability of the PI control to produce the on-demand nanomaterials having the TPs. Figure 6a,b was analogous to Figure 5a,b with a vertically flipped pattern.In the PI feedback control process, we could assume that the flow rate of Figure 5a and 6a was an input parameter, while the resultant absorbance wavelength of the AgAu nanoalloys of Figure 5b and 6b was an output result.Compared with the blueshift experiments, the redshift ones presented less fluctuation in the flow rate of the precursor solution as well as the absorbance TPs.The standard deviation (SD) of the average absorbance wavelength in the three TPs was 8.8 nm for the redshift, while the blueshift counterpart showed 19.8 nm.In addition, the average SD of the flow rate of the HAuCl 4 precursor solution was 1.8 μL min À1 for the redshift experiments, which was lower than the corresponding blueshift ones of 2.6 μL min À1 .This phenomenon may be attributed to the effect of the unstable region of the light source.Figure S7, Supporting Information, shows the initial spectrum of the light source, the spectrum after 1 h of irradiation, and the difference between these two spectra.An unstable wavelength region between 450 and 480 nm was observed after 1 h irradiation, whose wavelength was close to the TPs of the blueshift experiments (440, 450, and 460 nm).It might interfere the detection for the maximum absorbance wavelength.On the other hand, in case of the redshift experiments, the TPs (525, 535, 545 nm) were located in a region far away from the unstable region of the light source, resulting in more consistent detection for the peaks.As the PI control is a closed-loop control, the flow rate and the absorbance peak are interconnected.The adjustment of the flow rate was guided by the absorbance peak, which, in turn, facilitated the stabilization of the flow rate.As shown in Figure 5c and 6c, the flow rate at the equilibrium state has less fluctuation in the redshift rather than in the blueshift.These results imply that the flow chemistry with the PI feedback control reduces the time required to reach the TP and minimizes overshooting issues, while it increases the stability of the whole synthetic system after the TPs are reached.These characteristics act as strong advantages in the automatic flow chemistry platform. [31]

Characterization of the Resultant AgAu Alloy Nanoboxes
We chose the AgAu alloy nanobox product having the absorbance wavelength of 450 nm obtained from the blueshift experiment (Figure 7a) and that having the absorbance wavelength of 535 nm produced from the redshift experiment (Figure 7b), and analyzed their size, morphology, and composition using an FE-TEM and energy-Dispersive X-ray spectroscopy (EDS) mapping.The TEM images of both samples show a cubic shape with good crystallinity.The resultant AgAu nanoalloys had an average size of 50 AE 5 nm.The EDS data show the mapping of the element of Au and Ag in the AgAu nanoalloys.The element percentage of Ag and Au was 97.56% and 2.44%, respectively, for the blueshifted product, while those were 81.97% and 18.03%, respectively, for the redshifted product.The observed relationship between the flow rate of the Au ion precursor and the elemental composition of the synthesized NPs can be attributed to the kinetics of the reduction process.A higher flow rate of Au ions increases the concentration of Au ions in the reaction mixture, resulting in a higher rate of reduction and a greater percentage of Au atoms in the final redshift products.

Conclusion
Development of an algorithm for automation in flow chemistry was still a considerable obstacle and inaccessible for chemists with limited computer science skills.To address such concerns, we, for the first time, demonstrated a ubiquitous approach by applying the universal PI feedback control, which is the conventional control methods in the industry, to flow chemistry.In the proposed PI control system, the difference wavelength between the TP and the observed peak served as an input parameter, which reconfigured the flow rate of the precursor solutions.This iterative process was repeated until the on-demand products were generated.Thus, we could monitor the real-time synthesis of the product and constantly optimize the reaction conditions to obtain the target nanomaterials automatically in the end.The integrated continuous flow synthetic system with a PI control could produce the AgAu alloy nanoboxes by the blueshift or the redshift within a reasonable range of the TPs.This platform included several aspects: 1) the customized 3D printed syringe pumps for the adjustment of the flow rate of the precursor solution and the portable optics of the UV-vis absorbance spectrometry for real-time detection in the flow chemistry, 2) a continuous flow synthesis system with an integrated control of both an optical spectrometer and syringe pumps by Python scripts, and 3) a PI control algorithm built on the FOPDT model between the flow rate and the maximum absorbance peak.Such a real-time rapid PI feedback control allows a self-regulated system to mitigate the interferences of the unavoidable factors such as fluctuations of reagent concentration without human intervention, producing the target nanoalloy with high precision.In conclusion, the application of PI feedback control to flow chemistry represents a significant advancement in the field of chemical synthesis, offering a versatile and efficient approach that has the potential to revolutionize the way target chemicals are produced in the industry.The approach can be applied to a wide range of chemical synthetic reactions such as QDs, nanocrystals, and nanocomposites, and its potential benefits make it an attractive alternative to traditional batch chemistry.
Synthesis of Ag NCs: A volume of 60 mL of EG was placed in a 250 mL round-bottomed flask and stirred at 150 °C with a large egg-shaped Teflon-coated stir bar.Argon was supplied via a long needle after 50 min of preheating.After 10 min, 0.7 mL of NaHS solution in EG (3 mM) was injected into the preheated EG solution, followed by 15 mL of a PVP solution in EG (20 mg mL À1 ) and 5 mL of a AgNO 3 solution in EG (48 mg mL À1 ) after 8 min.A septum with a small aperture was fixed on the top of the reaction flask to allow gaseous species to escape.Within 20 min after the addition of AgNO 3 , the color of the reaction solution underwent four different stages from golden yellow to deep red, reddish gray, and finally green ocher.Subsequently, the solution was quenched by immersing the reaction flask in cool water.The sample was centrifuged and washed once with acetone to remove any residual precursor or EG, and then twice with DI water to remove excess PVP.The product was dissolved in DI water and kept in the dark at 4 °C.
Batch Synthesis of AgAu Alloy Nanoboxes: The Ag NC precursor solution was prepared by dissolving 0.2 mM of Ag NC and a surfactant solution PVP (0.2 wt%) in water.The HAuCl 4 precursor solution was prepared by dissolving 0.2 mM HAuCl 4 in water.The reducing agent was prepared by dissolving 0.2 g of AA in 10 mL water.A variety of AgAu alloy nanoboxes were synthesized by mixing the Ag NC and HAuCl 4 precursor solutions.The ratio of Ag/Au was tuned as 5:0, 4:1, 3:1, 2:1, 1:1, 1:2, 1:3, 1:4, and 0:5.A mixture solution containing 10 mL of the Ag NC suspension (0.2 mM), 2 mL of an AA solution (3 mg AA), and 2 mL of the PVP solution (5 mg PVP) was heated at 80 °C, and stirred vigorously.Then, the HAuCl 4 precursor solution (0.2 mM) was added and heated at 80 °C for 6 min.
Characterization: FE-TEM and EDS mapping were performed using a JEM-2100F electron microscope (JEOL, Japan) with an accelerating voltage of 200 kV.For the TEM measurement, a solution of 0.1 wt% AgAu alloy nanoboxes in water was drop-casted onto a carbon-coated copper grid, and the solvent was evaporated in a vacuum. [32]FT-IR measurements were carried out using a Spectrum One System spectrometer (Perkin-Elmer, USA) in the mid-IR range of 4000-400 cm À1 with a spectral resolution of 8 cm À1 in the transmittance mode.High-resolution XRD patterns were collected using a MiniFlex 600 X-ray diffractometer (Rigaku, Japan) with Cu Kα radiation (λ = 0.154 nm).Absorption spectra were obtained using a UV-2450 UV-vis absorption spectrophotometer (Shimadzu, Japan).

Figure 1 .
Figure 1.a) Schematics of the integrated flow chemistry system with a PI feedback control.b) A digital image for the experimental setup of the proposed flow synthetic system.

Figure 2 .
Figure 2. a) Different colors of the AgAu alloy nanoboxes depending on the ratio between the Ag and Au elements (from left to right, the ratio of the flow rate of Ag/Au = 290/10, 270/30, 250/50, 230/70, 210/90, 190/110, 170/130).b) UV-vis absorbance spectra of the resultant AgAu alloy nanoboxes prepared by tuning the flow rates of the Ag NC and Au ion solution in a continuous flow synthetic system.c) The reaction schematics of AgAu alloy nanoboxes as the Au ions were coated on the Ag NC and the corresponding TEM images.Void nucleation was first observed in the Ag nanoboxes, followed by void propagation and shell deposition.d) A nonlinear curve depicting the maximum absorbance wavelengths based on the flow rate of the Au ion solution.Three TPs were chosen for blueshift (440, 450, and 460 nm) and redshift (525, 535, and 545 nm) experiments to produce the on-demand AgAu alloy nanoboxes via a PI feedback control in the continuous flow chemistry synthesis.

Figure 3 .
Figure 3.A flowchart describing the total workflow from the screening and modeling step to the synthesis step.The P, I, and D values were obtained from the screening and modeling step.Then, the PI (the derivative (D) control equals zero due to no change of the TP) feedback control-based synthetic experiments were conducted to produce the target AgAu nanoalloys having the desired UV-vis absorbance wavelength.

Figure 4 .
Figure 4.The screening and modeling steps to induce the dynamic relationship between the maximum absorbance peaks of the AgAu alloy nanoboxes and the flow rates of the Au ion precursor solution.a) Flow rates of the Au ion solution were changed in a step-up manner from 10 to 110 μL min À1 by five increments with 20 μL min À1 .b) Flow rates of the Au ion solution were tuned step-down from 110 to 10 μL min À1 by five decrements with 20 μL min À1 .c,d) Six steps of the flow rates of the Au ion solution were randomly changed, and correspondingly the maximum UV-vis absorbance wavelength was measured.

Figure 5 .
Figure 5. Performance of the blueshift PI feedback control experiments to produce the AgAu nanoalloys having the UV-vis absorbance wavelength of 440 nm (red), 450 nm (violet), and 460 nm (brown).a) The profile of the flow rates of the Au ion solution.The initial flow rates were set at 150 μL min À1 and changed to different flow rates depending on the TPs.b) The maximum absorbance wavelengths according to the flow rates of the Au ion solution.c) An enlarged image of the flow rate at the equilibrium state.d) Zoomed-in images of the correspondent maximum absorbance wavelengths (440 nm (red), 450 nm (violet), and 460 nm (brown)) at the equilibrium state.The scatter plots are the maximum absorbance wavelengths after each iteration, and the continuous lines are the recorded peaks with a 1D Box filter.e-g) 3D images of the complete absorbance spectra over the reaction time coupled with the recorded maximum absorbance wavelengths, starting from 560 nm to the target UV-vis absorbance wavelength of the AgAu alloy nanoboxes via blueshift.

Figure 6 .
Figure 6.Performance of the redshift PI feedback control experiments to produce the AgAu nanoalloys having the UV-vis absorbance wavelength of 525 nm (blue), 535 nm (orange), and 545 nm (green).a) The profile of the flow rates of the Au ion solution.The initial flow rates were set at 10 μL min À1 and changed to different flow rates depending on the TPs.b) The maximum absorbance wavelengths according to the flow rates of the Au ion solution.c) An enlarged image of the flow rate at the equilibrium state.d) Zoomed-in images of the correspondent maximum absorbance wavelengths (525 nm (blue), 535 nm (orange), and 545 nm (green)) at the equilibrium state.The scatter plots are the maximum absorbance wavelengths after each iteration, and the continuous lines are the recorded peaks with a 1D Box filter.e-g) 3D images of the complete absorbance spectra over the reaction time coupled with the recorded maximum absorbance wavelengths, starting from 420 nm to the target UV-vis absorbance wavelength of the AgAu alloy nanoboxes via redshift.

Figure 7 .
Figure 7. FE-TEM images and EDS mappings for a) AgAu alloy nanoboxes with the TP of 450 nm produced by the blueshift feedback control and b) AgAu alloy nanoboxes with the TP of 535 nm produced by the redshift PI control.

Table 1 .
The resultant values of K p , τ p , and θ p from the screening and modeling experiments.