On-Line Estimation of the Ultrasonic Power in a Continuous Flow Sonochemical Reactor

: Sonochemical reactors can be very e ﬀ ective in many applications, including: degradation of chemical pollutants, inactivation of microorganisms, or production of biofuels. However, due to various factors, the ultrasonic power that is dissipated into sonicated liquid may vary in time. Hence, it is obvious that the ultrasonic power must be known for an optimal design and operation of the sonoreactor. In this paper, we present a method for on-line estimation of the ultrasonic power in continuous ﬂow sonoreactors. In this method, we design an observer that estimates unknown model parameters by using a mathematical model of the sonoreactor and by measuring input and output temperatures in the sonoreactor system. The e ﬀ ectiveness of the method is shown for a simulated and real continuous ﬂow sonoreactors. We also discuss the possibilities of ultrasonic power stabilization by using control algorithms.


Introduction
The use of ultrasonic waves to improve the efficiency of chemical reactions is the subject of intensive research and the number of applications for ultrasonic devices is growing rapidly. Techniques related to sonochemistry and the phenomenon of cavitation are the basis for obtaining many natural products (e.g., proteins, oils, dyes, spices, bioethanol, etc.) without using toxic reagents, shortening the reaction time, increasing the reaction efficiency, product purity, improving efficiency of production processes, and reduction of reagent consumption [1][2][3][4][5]. The ultrasounds can also be used in degradation of chemical pollutants in water [6]; thus, the sonochemistry is seen as a "green" future technology, beneficial to the environment [1]. It is also well-known that ultrasounds are responsible for the cavitation phenomenon which is the formation, growth, and collapse of bubbles in the liquid medium. The result of the ultrasonic cavitation is the production of free radicals (e.g., hydroxyl radicals) that are very effective in the inactivation of microorganisms [7]. In turn, the results presented in a study [8] show that airborne viruses such as severe acute respiratory syndrome (SARS) coronavirus or influenza viruses can also be inactivated by generating ultrasonic vibrations.
Recent papers show a growing interest in continuous flow sonochemical reactors, since they are often more efficient and more flexible than batch sonoreactors [6,[9][10][11][12]. However, the potential for using sonochemical reactors is still limited by a lack of knowledge about their design, operation, and performance characteristics. Experimental results show that the ultrasonic power released in

Materials and Methods
The complete measuring setup is shown in Figure 1. The main element of the measuring setup is the continuous flow sonoreactor (REACTOR) with a cooling jacket (CJ) adapted to work with the Branson 450 sonifier (maximal input electric power 350 W, ultrasonic frequency 20 kHz). The ultrasonic power is pulsed (frequency: 1 Hz) and can be controlled manually by changing its duty cycle. The ultrasonic horn with diameter 1 2 " (US HORN) is attached to the reactor via a screw connection. The jacketed sonoreactor has three connections to the reaction vessel (volume about 36 mL) and two connections to the cooling jacket (volume about 5 mL). The topmost connection of the reaction vessel is used to vent the reactor and the other connections are used as input and output for reagents. The sonoreactor has two circuits: the cooling circuit through the cooling jacket with the input "CJ IN" and the output "CJ OUT", and the main circuit through the reaction vessel (REACTOR) with the input "REACTOR IN" and the output "REACTOR OUT" (Figure 1). All the temperature values, including input and output temperatures in each circuit and ambient temperature, are measured by using PT100 sensors connected to the multi-channel temperature data logger (APAR, model AR207; sampling period: 1 s). The flow rates in both circuits are controlled by using peristaltic pumps (Masterflex, model no. 77521-57) and the programmable logic controller (Allen Bradley, Compact Logix).
Both reactor circuits are fed with a cold water from a water bath with the immersion cooler "Chiller 1" (Huber, TC40E). For a better stabilization of the inlet temperatures, the additional chiller "Chiller 2" (Hailea, HC-130A) is included in the cooling jacket circuit (Figure 1). The medium exiting the reactor vessel can be redirected through valve V2 back to the water bath or to the conductivity meter "CDM" (Elmetron, Model CC-401), operating in the on-line mode. By measuring the conductivity, it is possible to study the mixing flow patterns in the reactor vessel.

Results
Since the volume Vc of the reactor jacket is several times smaller than the vessel volume V, and  be determined from the distribution of exit times curves E(t) [22,23]: (1) Figure 1. Scheme of the measuring setup for ultrasonic tests.

Modeling of Sonochemical Reactor
Since the volume V c of the reactor jacket is several times smaller than the vessel volume V, and the flow rates F c of cooling water in the jacket are several times greater than the flow rates F through the vessel, it is assumed that the reactor jacket is well-mixed, and the mixing flow pattern was only analyzed in the main reactor vessel. To study the mixing pattern in the sonochemical reactor, a series of tracer pulse experiments have been performed. First, a finite amount of sodium chloride (NaCl) was injected in the input of the vessel (Figure 1). Then, by measuring the conductivity in its input and output, it was possible to determine a residence time distribution (RTD) in the vessel for different flow rates F through the reactor. If the C(t) is the output concentration of the tracer, then the RTD can be determined from the distribution of exit times curves E(t) [22,23]: (1) To show the differences between the mixing patterns, the experiments were performed when the ultrasounds are switched on or off. Figure 2 shows exit times curves E(t) for different flow rates through the reactor vessel. through the reactor vessel.

104
The experimentally determined E(t) curves clearly show that the measured responses are 105 delayed in time and the delay time is strictly dependent on the flow rate F. Then, one can observe a is also dependent on the flow rate F. Hence, the mixing pattern in the reactor vessel can be 108 approximated by using the first order system with a delay [22,23]: where: C(t), Cin(t) are output and input tracer concentrations (conductivity), τ is the overall time   presence of ultrasounds and we can assume that the reactor vessel is almost ideally mixed. The fact 120 that the sonification can improve the mixing is also mentioned in other studies (e.g., [11,24,25]). The experimentally determined E(t) curves clearly show that the measured responses are delayed in time and the delay time is strictly dependent on the flow rate F. Then, one can observe a high rise of the tracer concentration (conductivity), followed by its exponential decay with a rate that is also dependent on the flow rate F. Hence, the mixing pattern in the reactor vessel can be approximated by using the first order system with a delay [22,23]: where: C(t), C in (t) are output and input tracer concentrations (conductivity), τ is the overall time constant, τ = V/F, and τ 0 is the delay time.
Model (2) is fitted to the experimental data by determining τ and τ 0 parameters and by using the least squares method. The black lines in Figure 2 represent model responses and Table 1 shows model parameter values when the ultrasounds are switched on or off. The volumes V in Table 1 are the vessel volumes determined from the definition of the overall time constant τ = V/F for the ideally mixed reactor. As it can be clearly seen, if the ultrasounds are switched on, then the differences between the calculated volume V (Table 1) and the vessel volume determined experimentally (about 36 mL) are relatively small. There are also shorter exit times in the presence of ultrasounds and we can assume that the reactor vessel is almost ideally mixed. The fact that the sonification can improve the mixing is also mentioned in other studies (e.g., [11,24,25]).
Hence, when deriving a mathematical model for the sonochemical reactor, one can assume that the reactor vessel is well-mixed. The other model assumptions are as follows: the volumes of water in the reactor vessel and jacket are constant, the heat is transferred between the reactor vessel and its jacket and between the vessel and the surroundings, and the cooling water in the reactor jacket is also well-mixed. The tracer pulse experiments have shown that the delay time in Equation (2) is about nine times smaller than the overall time constant, thus it can be neglected. Then, from mass and energy balances we have: where: F, F c -flow rates through the vessel and jacket, respectively; V, V c -volumes in the vessel and jacket, respectively; T in , T cin , T, T c -input and output temperatures for the vessel and jacket, respectively; T amb -ambient temperature; UA, UA amb -the overall heat transfer coefficients between the reactor vessel and the jacket, and between the vessel and the surroundings, respectively; ρ, c p -density and specific heat of the fluid in the vessel and jacket, respectively; P US -maximum ultrasonic power; c-duty cycle.

Estimation of the Ultrasonic Power
Now, by using Equations (3) and (4) it is possible to estimate on-line the unknown model parameters, i.e., the maximum ultrasonic power P US and heat transfer coefficients UA amb and UA. All the temperatures are measured on-line and the other model parameters in Equations (3) and (4) are known. To design an observer for on-line estimation of the unknown parameters, we follow the design procedure given in [26,27]. Model Equations (3) and (4) can be presented in a more compact form: where: x-vector of known state variables; u-vector of known inputs; θ-vector of unknown parameters; A, B, E-matrices of known model parameters and variables. Then, the observer equations for model (5) are as follows [26]: .θ where: A F -a Hurwitz matrix; P-a positive definite matrix; Λ-a diagonal matrix with positive entries;θ-estimate of the vector of unknown parameters;x-estimate of the state variables. For model (5) and observer Equations (6) and (7), it can be shown that the state and parameter errors: e x =x − x, e θ =θ − θ tend to zero as time tends to infinity. Assuming that the vector of unknown parameters θ is constant and by using Equations (5)- (7), the time derivatives of state and parameter errors are: . .
It is obvious that the only equilibrium point for the system (8) and (9) is (e θ , e x ) = (0, 0) and to prove asymptotic stability at the origin, the following candidate Lyapunov function is used: By calculating the time derivative of (10), we have: and by substituting (8) and (9) into (11) yields: If Q is a given positive definite and symmetric matrix and A F is a Hurwitz matrix, then there exists a positive definite and symmetric matrix P that can be found by solving the Lyapunov equation: Then, from (12) and (13), it is obvious that: and the state and parameter errors: e x =x − x, e θ =θ − θ tend to zero as time tends to infinity. The estimation of the vector of unknown parameters θ can be performed on-line by numerical integration of Equations (6) and (7) at each sampling time instant t n = nT s , where T s is the sampling time. If the sampling time T s is sufficiently small (to ensure numerical stability), then for given initial values ofx(0) andθ(0), Equations (6) and (7) can be solved by using the explicit Euler's method. For example, let P US = 80 W, UA = 200 J/min/K, and UA amb = 10 J/min/K be true parameter values for system (3) and (4). Then, from (13) for Q = 20KI 2 and A F = -10I 2 , one gets P = KI 2 , where I 2 is 2 × 2 identity matrix and K > 0 is the observer gain. Figure 3 shows time courses of estimatesP US (t), UÂ amb (t), and UÂ(t) for numerically simulated system (3) and (4) with Λ = diag(200,1,0.1) and K = 500. The ultrasonic power c(t)P US is switched on and off between 0 and 80 W with a period T p = 10 min.
It is obvious that the only equilibrium point for the system (8)-(9) is ( , ) (0,0) x e e θ = and to prove 150 asymptotic stability at the origin, the following candidate Lyapunov function is used: By calculating the time derivative of (10), we have: and by substituting (8) and (9) into (11) yields: If Q is a given positive definite and symmetric matrix and AF is a Hurwitz matrix, then there 154 exists a positive definite and symmetric matrix P that can be found by solving the Lyapunov equation: Then, from (12) and (13), it is obvious that: and the state and parameter errors:     Irrespective of the initial conditionsx(0) andθ(0), the estimates converge to true values of model parameters. It should also be noticed that in the case of proposed observer, the convergence of estimation error to zero is ensured, if the persistent excitation condition is satisfied [27]. This can be achieved, if the input signal (e.g., the ultrasonic power c(t)P US ) is manipulated in such a way that enough information on the dynamical behavior of the identified system can be gathered. In practice, a square wave input signal of an appropriate frequency can be chosen, which means that the ultrasounds are switched on and off (Figure 3).

Experimental Results
The effectiveness of the estimation procedure was tested using results of two experiments carried out for the continuous flow sonochemical reactor depicted in Figure 1. During both experiments, the flow rate through cooling jacket, F c , was kept constant at F c = 441 mL/min. The ultrasonic power c(t)P US was changed in a stepwise manner, where P US is the maximum ultrasonic power. First, the ultrasonic power was increased from zero to its maximum value P US by increasing the duty cycle c(t) from 0% to 100% by 20% every few minutes. Then, the duty cycle c(t) was decreased, also in a stepwise manner like before by 20%, and finally to zero. Results of both experiments are presented on Figure 4; Figure 5 for constant flow rates through the reactor F = 93 mL/min or F = 69 mL/min, respectively. The estimates of unknown model parametersθ:P US (t), UÂ amb (t), and UÂ(t) are obtained by numerical integration of (6) and (7) for K = 100, Q = 100KI 2 , A F = -50I 2 , P = KI 2 , Λ = diag(5·10 5    190 Figures 4b and 5b show the corresponding simulation results for model (3) Figures 4b and 5b show the corresponding simulation results for model (3) and (4) by substituting the estimatesP US (t), UÂ amb (t), and UÂ(t) into unknown model parameters P US , UA amb , and UA, respectively. The model Equations (3) and (4) are solved on-line by using explicit Euler's method and the vector of estimatesθ(t) updated by the observer (6) and (7) every sampling period T s .

Discussion and Concluding Remarks
As shown in Figure 4; Figure 5, the estimated maximum ultrasonic power is not constant and may slightly vary in time. In both experiments for different flow rates F, one can notice a very good agreement (Figures 4b and 5b) between the experimental results and the model (3) and (4) predictions for the vector of estimatesθ(t). Hence, one can first perform a preliminary identification experiment to tune the observer (6) and (7) and to find the estimateθ(t). Then, the unknown model parameters in (3) and (4) are updated in the normal operation of the sonochemical reactor, when the ultrasounds are switched on and off. By using the first set of the experimental data (Figure 4), it was possible to tune the observer (6) and (7). According to Equations (8) and (9), the convergence rates of state and parameter errors: e x =x − x, e θ =θ − θ are dependent on the observer parameters. By increasing the observer gain K or the absolute values of elements of diagonal matrices A F and Λ, the convergence rates can be significantly increased. On the other hand, by increasing these values, the observer is more sensitive to measurement noises, and even slight changes in the measured temperatures may lead to significant changes in the estimates, as it can be noticed for UÂ(t) in Figure 4a. A closer look at the estimates in Figures 4a and 5a shows that all the estimated parameters are not constant and may vary. There might be many reasons for this variability, including: amplification of the measurement noises or the non-stationary character of the sonochemical reactor (e.g., the effect of temperature or, in the long run, cavitation erosion of the ultrasonic horn tip). However, in spite of the changes inθ(t), the differences between the simulated and the measured temperatures are minimal (Figures 4b and 5b).
As mentioned earlier, one of the problems with using the observer (6) and (7) is to ensure that the input signals of the identified system are sufficiently exciting [27]. Numerical simulations of the sonoreactor model (3) and (4) have shown that if the ultrasonic power is changed in a stepwise manner (e.g., it is switched on and off), then the estimates converge to true values ( Figure 3). The experimental results also showed that step changes in the ultrasonic power ensured the convergence of estimates. Therefore, in the case of batch reactors that are operated at steady-state conditions in continuous (non-pulsed) mode, the system may not be sufficiently excited and the estimates may converge to wrong values. In that case, other methods (e.g., recursive least squares method) may be more suitable.
By using the observer Equations (6) and (7), the ultrasonic power can be easily monitored on-line in the pulse mode. Then, it is possible to design a controller that stabilizes the estimated ultrasonic power at the desired level P sp , also in the presence of disturbances. A possible structure of the control system is shown in Figure 6. The observer estimates the ultrasonic power c(t)P US (t) and the controller manipulates the duty cycle c(t) to minimize the control error e(t), i.e., the difference between the setpoint P sp and the estimated ultrasonic power c(t)P US (t). Since there is a very good agreement between the measured temperatures and the model (3) and (4) predictions, advanced control algorithms (e.g., model-based controllers [28,29]) can also be considered. However, in this case, for the proposed estimation method, we must also ensure that the control signal c(t) is sufficiently exciting. This problem will be explored in our future studies.

236
(e.g., model-based controllers [28,29]) can also be considered. However, in this case, for the proposed 237 estimation method, we must also ensure that the control signal c(t) is sufficiently exciting. This 238 problem will be explored in our future studies.

240
Author Contributions: All authors have read and agree to the published version of the manuscript.