# Modeling and Optimization of the Drug Extraction Production Process

Authors: Dakuo He; Zhengsong Wang; Le Yang; Tongshan Liu; Yao Yao; Zhizhong Mao
Journal: Scientific Programming
 (2016)

---

## Abstract

Optimized control of the drug extraction production process (DEPP) aims to reduce production costs and improve economic benefit while meeting quality requirements. However, optimization of DEPP is hampered by model uncertainty. Thus, in this paper, a strategy that considers model uncertainty is proposed. Mechanistic modeling of DEPP is first discussed in the context of previous work. The predictive model used for optimization is then developed by simplifying the mechanism. Optimization for a single extraction process is first implemented, but this is found to lead to serious wastage of herbs. Hence, the optimization of a multiextraction process is then conducted. To manage the uncertainty in the model, a data-driven iterative learning control method is introduced to improve the economic benefit by adjusting the operating variables. Finally, fuzzy parameter adjustment is adopted to enhance the convergence rate of the algorithm. The effectiveness of the proposed modeling and optimization strategy is validated through a series of simulations.


---

## Body

## 1. Introduction

Drug extraction, or drug leaching, is one of the most significant operations in the pharmaceutical industry. As the basic and primary process of drug production, it has been widely applied to many medicinal plants [1–7]. In the drug extraction production process (DEPP), a solvent or chemical reagent that offers high solubility for the effective constituent (EC) in the herbs and poor solubility for constituents that need not be extracted is applied to solid herbs. The EC then dissolves out of the herb organization and into the solvent or chemical reagent [8]. The extracted EC is finally used in various types of drugs, such as granules, tablets, and capsules, in subsequent pharmaceutical processes.The disadvantages of this production process include low extraction yield, wastage of materials, and high energy consumption. Modeling and process optimization, which aim to increase the extraction yield and minimize production costs while meeting specific quality requirements, are therefore particularly significant in both theoretical research and practical applications.The optimization of drug extraction process has received increasing attention. For example, Alam et al. [9] studied the optimization of the extraction parameters of embelin fromEmbelia ribes through ultrasound-assisted extraction with a Box–Behnken design. Bochi et al. [10] optimized the extraction conditions and anthocyanin yields in experiments with high proportions of water. Chen et al. [11] applied an orthogonal experiment to optimize the extraction conditions of polysaccharides fromOrnithogalum caudatum Ait. Chen et al. [12] used the response surface methodology to optimize the experimental conditions for ultrasonic-assisted extraction of functional components from sugar beet molasses. Bae et al. [13] successfully developed and validated a simple qualitative and quantitative method for the simultaneous determination of 15 phenolic compounds and caffeine from teas and then optimized the extraction process using the response surface methodology based on a central composite design. In addition to these innovations, many other scholars have made tremendous contributions to the theoretical and practical optimization of DEPP [3, 14–16]. However, many of these reports focus on optimizing the extraction conditions using experimental design or simulation techniques. To the best of the authors’ knowledge, the optimization of DEPP in terms of improving the economic benefit of the whole production process has rarely been reported in the literature. The present work develops a mechanism model for DEPP based on some previous efforts and then proposes an optimization strategy to resolve practical problems such as the production efficiency and production costs.To implement this optimization, a mechanism model of DEPP should be developed. Such mechanistic modeling plays several significant roles: first, the modeling process will analyze the mechanism of the drug extraction process, confirm its operating variables and quality indicators, and analyze the relationship between them; second, an appropriate model can be used to simulate the actual production process to generate the required data and analyze the optimization results. As an actual simulator, the mechanism model should be able to link the extraction efficiency of the EC and volatile oil—the quality indicators—with the operating variables (steam flow at the bottom and side of the extraction tank and the extraction time).The mechanistic modeling of DEPP mainly consists of modeling the following components: extraction tank, mass transfer process of EC, volatile oil recycling, and efficiency of the oil-water separator. A mathematical model of the extraction tank that describes the changes in temperature and liquid level over time has been developed [17]. As the principle and mechanism of the mass transfer process in drug extraction are very similar to those of metal leaching, mechanistic models of metal leaching [3, 18–22] can be used as references in developing a mass transfer model for the EC. Additionally, Han et al. derived a diffusion rate equation for volatile oils, allowing a mechanistic model of volatile oil recovery to be developed [23]. Finally, the efficiency of the oil-water separator is introduced to describe the separation efficiency of oil droplets with a certain diameter [24]. The above mechanistic models are combined to simulate the whole DEPP, and the rationality and validity of this approach are verified through a series of simulations. The innovation and contribution of the DEPP model presented in this paper can be summarized as follows. First, we extend a modeling approach for the leaching process to model the mass transfer process of ECs. Second, we present a combined mechanistic modeling framework for the overall DEPP by integrating four discrete components described in previous studies.In addition to a mechanistic model, a predictive model is also necessary for such optimization. In this work, the established mechanism is simplified to serve as a predictive model. The economic benefit per unit time is considered as the optimization objective, while the steam flow at the bottom and side of the extraction tank and the extraction time are treated as decision variables. The optimization model is then established under certain quality constraints. Several classical optimization algorithms, such as particle swarm optimization (PSO) [25, 26], differential evolution (DE) [27], and artificial bee colony (ABC) [28], are adopted to solve this optimization problem. Comparing these algorithms, it is concluded that PSO achieves the best performance in determining the optimal solution. Thus, a PSO algorithm is used to solve this optimization problem and obtain the optimal economic benefit and corresponding parameters, including optimal quality indicators and operating variables. The present work first considers the optimization of a single extraction process. However, the extraction efficiency of the EC in this case is very low, leading to serious wastage of herb materials. The optimization control for multiextraction is therefore investigated. In the multiextraction process, the extraction frequency is defined as the number of times that the herbs are subjected to the extraction process. However, the optimal extraction frequency in terms of economic benefit is unknown. Thus, the extraction frequency is treated as one of the decision variables when establishing the optimization problem. Note that the extraction frequency is an integer in this problem.The optimal economic benefit of the multiextraction process is based on the predictive model, whereas the actual optimal economic benefit can be calculated by plugging the best operating variables into the mechanism model. There are some discrepancies between the predicted and actual values of the optimal economic benefit. In practice, however, it is unlikely that the actual production process can be modeled accurately (or even approximately) with a process model [29, 30]. Process optimization is hampered by such model uncertainty, and so the “optimal” value given by the model may not necessarily mean “optimal for the process” [31].Iterative learning control (ILC) is highly effective in controlling systems with repetitive operations that precisely follow a desired target trajectory. It has been widely applied in repetitive industrial processes because of its perfect learning ability from the repetitive tracking task [32–34]. Recently, data-driven ILC methods have been proposed to deal with complicated practical systems [35–37]. The control scheme is data-driven because there is no explicit model information or training process, and only the measured input and output data are used for the controller design, analysis, and implementation [36]. As one such method, data-driven optimal terminal ILC (DDOTILC) works under the principle that the control law is only updated using the terminal output tracking error [35]. In this work, DDOTILC is applied to implement iterative optimization control for DEPP in order to overcome the model uncertainty via the online adjustment of the operating variables. The fuzzy adaptive adjustment of parameters in DDOTILC is then implemented to enhance the convergence rate. Using this approach, the model uncertainty can be reduced and the economic benefit improved by adjusting the operating variables.


## 2. Principle and Production Technology of the Drug Extraction Process

### 2.1. Principle of the Drug Extraction Process

#### 2.1.1. Mass Transfer Theory of Effective Constituent

Drug extraction is one kind of solid-liquid extraction. Thus, the mass transfer principle and computing method follow the solid-liquid extraction system model shown in Figure1. It is assumed that the herb particles are composed of solute (EC) and inert carriers (herb residues), so the solid-liquid extraction system is composed of solute, solvent, and inert solid. Additionally, there will be a gas-liquid film at the interface between the solid particles and liquid phase. It is generally acknowledged that this mass transfer process can be divided into the five steps described in Figure 1 [3, 8]:(1)
The diffusion of solvent into the herb particle surface(2)
The permeation of solvent from the herb surface to the interior(3)
The dissolution of the EC inside the herb particles(4)
The diffusion of EC from inside the herb particles to the surface (internal diffusion)(5)
The diffusion of EC from the herb particle surface to the solvent across the gas-liquid film (external diffusion).Figure 1
Unextracted core shrinking model of effective component.


#### 2.1.2. Recycling Theory of Volatile Oil

Volatile oil (VO), also named essential oil, is a generic term for the volatile and oily components in plants. VOs are insoluble in water and can be distilled out along with the water vapor. During the extraction process, the recycling of VO is divided into the following three steps (see Figure2):(1)
Internal diffusion: with increasing temperature, VOs diffuse into the outer surface of the solid herb particle from the interior(2)
External diffusion: VOs diffuse into the water vapor from the surface of the solid particle by threading the gas-liquid film(3)
Gas-liquid transition: VOs and water vapor enter the condenser and are condensed into the liquid phase, after which the VOs are separated from water though the oil-water separator.Figure 2
Schematic diagram of volatile oil recycling.


### 2.2. Production Technology of the Drug Extraction Process

Generally, DEPP includes the following three procedures.(1) Preprocessing of Herb Materials. In this procedure, the herb materials are smashed and soaked in water for some time to inflate the herb organization. This preprocessing accelerates the dissolution and diffusion of EC during extraction.(2) Extraction. As the most important process of DEPP, this procedure involves various pieces of equipment including the extraction tank, condenser, gas-liquid separator, oil-water separator, and filter (see Figure 3). In this process, the preprocessed herb materials are placed into the extraction tank, and steam is added through both the bottom and side of the tank. As the temperature increases, the valuable components of the herb particles, such as EC and VO, will continually diffuse into the extraction solution and water vapor, respectively. For a batch of herb materials, it is extremely difficult to achieve acceptable yields of EC and VO with a single extraction process. Therefore, multiple extractions are required to prevent the wastage of raw materials.Figure 3
Diagram of equipment used in the extraction procedure.(3) Separation. In this procedure, the feed liquid containing EC and VO are separated from the herb residues and steam, respectively, using the filter and oil-water separator. The feed liquid and VO are then sent to the next phase for further processing.The extraction efficiencies of EC and VO are the main quality indicators of DEPP. There are numerous factors influencing these indicators, such as the radius of the herb material particles, extraction temperature, extraction time, concentration difference, and solid-liquid contact condition. For the purpose of DEPP optimization, the present study explores the impact on the extraction efficiency of the steam flow at both the bottom and side of the extraction tank and the extraction time.


## 2.1. Principle of the Drug Extraction Process

### 2.1.1. Mass Transfer Theory of Effective Constituent

Drug extraction is one kind of solid-liquid extraction. Thus, the mass transfer principle and computing method follow the solid-liquid extraction system model shown in Figure1. It is assumed that the herb particles are composed of solute (EC) and inert carriers (herb residues), so the solid-liquid extraction system is composed of solute, solvent, and inert solid. Additionally, there will be a gas-liquid film at the interface between the solid particles and liquid phase. It is generally acknowledged that this mass transfer process can be divided into the five steps described in Figure 1 [3, 8]:(1)
The diffusion of solvent into the herb particle surface(2)
The permeation of solvent from the herb surface to the interior(3)
The dissolution of the EC inside the herb particles(4)
The diffusion of EC from inside the herb particles to the surface (internal diffusion)(5)
The diffusion of EC from the herb particle surface to the solvent across the gas-liquid film (external diffusion).Figure 1
Unextracted core shrinking model of effective component.


### 2.1.2. Recycling Theory of Volatile Oil

Volatile oil (VO), also named essential oil, is a generic term for the volatile and oily components in plants. VOs are insoluble in water and can be distilled out along with the water vapor. During the extraction process, the recycling of VO is divided into the following three steps (see Figure2):(1)
Internal diffusion: with increasing temperature, VOs diffuse into the outer surface of the solid herb particle from the interior(2)
External diffusion: VOs diffuse into the water vapor from the surface of the solid particle by threading the gas-liquid film(3)
Gas-liquid transition: VOs and water vapor enter the condenser and are condensed into the liquid phase, after which the VOs are separated from water though the oil-water separator.Figure 2
Schematic diagram of volatile oil recycling.


## 2.1.1. Mass Transfer Theory of Effective Constituent

Drug extraction is one kind of solid-liquid extraction. Thus, the mass transfer principle and computing method follow the solid-liquid extraction system model shown in Figure1. It is assumed that the herb particles are composed of solute (EC) and inert carriers (herb residues), so the solid-liquid extraction system is composed of solute, solvent, and inert solid. Additionally, there will be a gas-liquid film at the interface between the solid particles and liquid phase. It is generally acknowledged that this mass transfer process can be divided into the five steps described in Figure 1 [3, 8]:(1)
The diffusion of solvent into the herb particle surface(2)
The permeation of solvent from the herb surface to the interior(3)
The dissolution of the EC inside the herb particles(4)
The diffusion of EC from inside the herb particles to the surface (internal diffusion)(5)
The diffusion of EC from the herb particle surface to the solvent across the gas-liquid film (external diffusion).Figure 1
Unextracted core shrinking model of effective component.


## 2.1.2. Recycling Theory of Volatile Oil

Volatile oil (VO), also named essential oil, is a generic term for the volatile and oily components in plants. VOs are insoluble in water and can be distilled out along with the water vapor. During the extraction process, the recycling of VO is divided into the following three steps (see Figure2):(1)
Internal diffusion: with increasing temperature, VOs diffuse into the outer surface of the solid herb particle from the interior(2)
External diffusion: VOs diffuse into the water vapor from the surface of the solid particle by threading the gas-liquid film(3)
Gas-liquid transition: VOs and water vapor enter the condenser and are condensed into the liquid phase, after which the VOs are separated from water though the oil-water separator.Figure 2
Schematic diagram of volatile oil recycling.


## 2.2. Production Technology of the Drug Extraction Process

Generally, DEPP includes the following three procedures.(1) Preprocessing of Herb Materials. In this procedure, the herb materials are smashed and soaked in water for some time to inflate the herb organization. This preprocessing accelerates the dissolution and diffusion of EC during extraction.(2) Extraction. As the most important process of DEPP, this procedure involves various pieces of equipment including the extraction tank, condenser, gas-liquid separator, oil-water separator, and filter (see Figure 3). In this process, the preprocessed herb materials are placed into the extraction tank, and steam is added through both the bottom and side of the tank. As the temperature increases, the valuable components of the herb particles, such as EC and VO, will continually diffuse into the extraction solution and water vapor, respectively. For a batch of herb materials, it is extremely difficult to achieve acceptable yields of EC and VO with a single extraction process. Therefore, multiple extractions are required to prevent the wastage of raw materials.Figure 3
Diagram of equipment used in the extraction procedure.(3) Separation. In this procedure, the feed liquid containing EC and VO are separated from the herb residues and steam, respectively, using the filter and oil-water separator. The feed liquid and VO are then sent to the next phase for further processing.The extraction efficiencies of EC and VO are the main quality indicators of DEPP. There are numerous factors influencing these indicators, such as the radius of the herb material particles, extraction temperature, extraction time, concentration difference, and solid-liquid contact condition. For the purpose of DEPP optimization, the present study explores the impact on the extraction efficiency of the steam flow at both the bottom and side of the extraction tank and the extraction time.


## 3. Mechanistic Modeling of Drug Extraction Production Process

DEPP is a complex heat and mass transfer process, and its mechanistic model mainly consists of the following components: mathematical model of drug extraction tank, mass transfer model of EC, mechanistic modeling of VO recycling, and an efficiency model of the oil-water separator. The mechanistic modeling work for DEPP is implemented based on the following assumptions:(1)
The herb particle has a spherical shape after crushing.(2)
The EC of herb materials in the solvent is distributed uniformly under the condition of full stirring.(3)
The EC in the outer layer of the herb particles is first spread to the solvent, after which the EC in the inner layer spreads to the outer layer and then to the solvent.


### 3.1. Mathematical Modeling of Drug Extraction Tank

A mechanistic model of the extraction tank has been developed according to the principles of mass and energy conservation [17]. In this model, the liquid level H and feed liquid temperature T in the extraction tank can be calculated using the steam flow at the bottom and side of the tank, Q1, Q2, and the extraction time t. The variation of liquid level and temperature with extraction time t can be expressed as(1)dHdt=Q1-Q3P1A,(2)dTdt=1AS1HP2-S1TP1+S2T1-S2TQ1+S2Q2T1-T+S1TP1-P2Q3.The mixture flow of VO and steamQ3 is assumed to have a nonlinear relationship with T:(3)Q3=K1eK2T.The symbols used in this model are as follows:Q1, Q2: the steam flow at the bottom and side of the extraction tank, respectively; Q3: mixture flow of VO and steam; T1: steam temperature before entering the extraction tank; S1: specific heat capacity of feed liquid; S2: specific heat capacity of water; P1: volume ratio of water (liquefied from steam) and steam; P2: standard heat of liquefaction of vapor under standard atmospheric pressure; A: cross-sectional area of the extraction tank.


### 3.2. Mathematical Modeling of the Mass Transfer Process of Effective Constituent

The mass transfer process for EC was described in detail in Section2, where it was noted that the transfer could be divided into five steps. In the usual extraction process, the penetration of solvent and dissolution of solute are not the controlling factors and can thus be neglected. The diffusion processes undoubtedly have a decisive effect on the speed of mass transfer. Hence, external diffusion and internal diffusion are primarily considered in the modeling of the mass transfer process.External diffusion, also called liquid film diffusion, is the main resistance to mass transfer. The gas film will not hamper the mass transfer process, so it is neglected in the modeling process, as illustrated by the dashed line in Figure1. Internal diffusion is the shrinking core process of particles containing EC, as shown in Figure 1. In this study, using the unreacted shrinking core theory from the metal ore leaching process, the drug extraction process can be approximately regarded as the leaching of metallic minerals, albeit under different reactions. When the EC in the outer layer has diffused into the extraction solvent, the insoluble components are left on the surface of the solid particles. Thus, the solid particles are surrounded by a grey layer composed of insoluble components, as shown in Figure 1. The inner EC then diffuses into the surface of the solid particles through internal diffusion, after which this part of the EC in the solid particle surface diffuses into the solvent once again. This procedure is repeated, and the unextracted core will gradually shrink.The diffusion rate of the extraction process can be expressed as [3, 18–20](4)dGdt=JS,where G is the mass of EC extracted from solid herb particles, J is the mass of EC diffused from solid herb particles to solvent per unit time, S expresses the area of the interface between the solid and liquid phase, and t is the extraction time.It is assumed that internal diffusion and external diffusion occur in series, so the law of additive resistance can be applied as follows [3, 21, 22]:(5)J=C0-C1/β1+1/β2=C0-CR-r/Ds+r0/D,where C0 is the solubility of EC in the liquid film on the surface of solid particles; C is the instantaneous concentration of EC in extraction solvent; D and Ds express the diffusion coefficients of EC passing through the liquid film and the inside of solid particles, respectively; R and r denote the radius of the original solid particle and the solid particle as the core gradually shrinks, respectively; and r0 expresses the thickness of the liquid film (see Figure 1). In addition, β1 is the coefficient of internal diffusion (1/β1 is the internal diffusion resistance) and β2 is the coefficient of external diffusion (1/β2 is the external diffusion resistance). The parameters β1 and β2 are given by(6)β1=DsR-r,β2=Dr0.Combined with the model of the extraction tank, it can be concluded that(7)dGdt=dVCdt=dAHCdt=AHdCdt+ACdHdt.Based on (1), (4), (5), and (7), we have that(8)dCdt=1AHC0-CSR-r/Ds+r0/D-CP1Q1-Q3.The diffusion coefficients can then be determined as follows.(1) For the solution with macromolecules of EC, the external diffusion coefficient is obtained by(9)D=BTvAfA.The resistance of EC sustained in solutionfA can be calculated by Stokes’ equation:(10)fA=6πRμBvA.Combining (9) and (10), we obtain(11)D=BT6πRμB,where B is the Boltzmann constant, vA is the kinematic velocity of EC molecules, and μB is the viscosity of the solvent.(2) For the dilute solution with micromolecules of EC, the external diffusion coefficient is generally expressed by Wilke’s equation [38]:(12)D=7.4×10-12ψMB0.5TμBVA0.6,where ψ is the associating parameter of the solvent, MB is the molecular weight of the solvent, and VA is the molecular volume of EC. In this work, (12) is used to calculate the diffusion coefficient D.(3) The internal diffusion coefficient of EC inside the solid particleDs is calculated by [39](13)Ds=εDτ,where ε and τ are the porosity and sinuosity of holes inside the solid particles, respectively.Another equation connects the radius of solid particles containing EC with the internal diffusion coefficientDs, the concentration of EC in the liquid film C0, and the instantaneous concentration of EC in extraction solvent C [39]:(14)r=R-kDsCtC01/2.


### 3.3. Mechanistic Modeling of Volatile Oil Recycling

The recycling principle of VO was described in Section2. Because the internal diffusion occurs in the same phase, it can be neglected. However, the external diffusion process, in which VO diffuses into the gas phase (water vapor) from the surface of the solid phase (solid particle) across the gas-liquid film, is interphase diffusion. This external diffusion is the main factor controlling the diffusion velocity. Because the VO is insoluble in water, its explicit diffusion in the liquid phase can be ignored, as denoted by the dashed line in Figure 2. Consequently, the resistance to external diffusion mainly occurs in the gas film [40]. The diffusion velocity is expressed as [40](15)dqdt=KGSCl-Ci,where q is the concentration of VO in the solid herb particles, KG is the gas phase mass transfer film coefficient, Cl is the concentration of VO in the gas phase, and Ci is the concentration of VO in the gas film. The following assumptions are made:(1) Because the VO in the gas phase will constantly enter the condenser with water vapor,Cl≈0.(2) There is a linear counterbalance between the concentrations of VO in the solid phase and gas film; that is,Ci=Kq [23], where K is a constant coefficient.Equation (15) can then be expressed as (16)dqdt=-KGSKq=-ek0DSKd1q,where(17)KG=ek0Dd1,in which k0 is a constant coefficient and d1 is the thickness of the gas film.As for the liquid density, the density of VO will decrease as the feed liquid temperatureT increases. The VO density can be calculated as(18)ρ0=A1+A2T+A3T2+A4T3+A5T4,where ρ0 is the density of VO and A1–A5 are constant coefficients.


### 3.4. Mechanistic Modeling of the Efficiency of the Oil-Water Separator

Under the effect of gravity, the oil-water separator achieves the separation of oil and water in the static or flowing state by taking advantage of the density difference between oil and water. The kinetic state of a droplet in the disperse phase can be described by Stokes’ law [24]:(19)vow=ρw-ρ0gd2218μ0,where vow is the lifting velocity of the oil droplet, ρw is the density of water, g is acceleration due to gravity, d2 is the diameter of the oil droplet, and μ0 is the viscosity of water.The separation efficiency of oil droplets of a certain diameter can be determined according to shallow pool theory [41] as(20)η0=S0vowQ0=S0g18μ0Q0ρw-ρ0d22,where η0 is the lifting efficiency of oil droplets of diameter d2, S0 is the lifting area of the oil layer, and Q0 is the flow of the oil-water mixture.The separation efficiencyηs is a key performance indicator in any oil-water separator and can be expressed as follows:(21)ηs=1-CdCb,where Cd and Cb denote the oil content at the exit and entrance of the separator, respectively.


### 3.5. Processing the Mechanistic Model of the Drug Extraction Production Process

For the convenience of calculations, differential equations in the models are discretized to give a set of algebraic equations. Taking the model for the liquid level in the extraction tank, we have(22)Hk+1-HkTS=Q1k-Q3kP1A,where TS is the sampling period.Thus, the liquid level at sampling timek+1 is(23)Hk+1=Q1k-Q3kP1ATS+Hk,where Q3(k)=K1eK2T(k).Similarly, the discretized model for the feed liquid temperature is(24)Tk+1=TSAS1HkP2-S1TkP1+S2T1-S2TkQ1k+S2Q2kT1-Tk+S1TkP1-P2Q3k+Tk.The discretized model for the concentration of EC is(25)Ck+1=TSAHkC0-CkSR-rk/DSk+r0/Dk-CkP1Q1k-Q3k+Ck,where (26)Dk=7.4×10-12ΦMB0.5TkμBkVA0.6,DSk=εDkτ,rk=R-kDSkCktkC01/2,and the discretized model for the concentration of VO is(27)qk+1=1-ek0DkSKTSd1qk.It is assumed that the extraction time can be divided into six equal intervals, so the entire drug extraction process has 13 input variables: six steam flows at the bottom of the extraction tank (Q11,Q12,Q13,Q14,Q15,Q16), six steam flows at the side of the extraction tank (Q21,Q22,Q23,Q24,Q25,Q26), and the extraction time t. The output variables are the extraction yields of EC and VO (F1,F2, resp.), their extraction efficiencies (η1,η2), and the total consumption of steam F3.The extraction yield of ECF1 and its extraction efficiency η1 can be expressed as(28)F1=f1k=VkCk=AHkCk,η1=F1F1total,where F1total is the total mass of EC in a batch of herbs, which we consider to be 25 kg in this study.The decrement of VO in the extraction tank between adjacent sampling periods is(29)Δmk=mk-1-mk=qk-1-qkF2total.Thus, the recycle yield of VOF2 and its extraction efficiency η2 are computed by the following equations:(30)F2=f2k=f2k-1+Δmkηsk,η2=F2F2total,where F2total is the total mass of VO in a batch of herbs, assumed to be 36 kg, and (31)ηsk=1-CdkCbk=TSP1Q3k-Δmkη0kTSP1Q3k-Δmkη0k,η0k=S0g18μ0Q0kρw-ρ0d22=S0g18μ0P1Q3kρw-ρ0d22.The total consumption of steamF3 is given by (32)F3=∑i=16Q1i+Q2it6.In conclusion, the input and output variables of the mechanistic model for DEPP can be expressed as(33)u=Q11,Q12,Q13,Q14,Q15,Q16,Q21,Q22,Q23,Q24,Q25,Q26,t,y=F1,F2,F3,η1,η2.To verify the rationality and effectiveness of the established mechanistic model, a number of simulations were conducted. Figure4 shows the effect of steam flows on the model outputs. In this simulation, all the steam flows were identical and the other operating or state conditions remained unaltered. For example, t=3 h. The parameters used in the mechanistic model are listed in Table 1.Table 1
Parameters used in mechanistic model.
Parameter Description Value A Cross-sectional area of extraction tank (m2) 3 T 1 Steam temperature before entering extraction tank (°C) 125 P 1 Volume ratio of water and steam 1/80 P 2 Standard heat of liquefaction of vapor (kJ/mol) 40.68 S 1 Specific heat capacity of feed liquid (kJ/(kg  ×  °C)) 4 S 2 Specific heat capacity of water (kJ/(kg  ×  °C)) 4.2 K 1 Coefficient inQ3 4.4 K 2 Coefficient inQ3 0.001 S 0 Lifting area of oil layer (m2) 2.8 ρ w Density of water (g/cm3) 1 ρ 0 Density of volatile oil (g/cm3) 0.72 g Acceleration of gravity (m/s2) 9.8 d 2 Diameter of oil droplet (m) 0.3912 E - 5 q 0 Initial concentration of volatile oil in herbs 0.3 R Radius of solid herb particle (m) 0.8202 E - 3 r 0 Thickness of liquid film (m) 0.222 E - 3 d 1 Thickness of gas film (m) 0.6302 E - 3 τ Sinuosity of holes inside gray layer in solid particle 1.2 ε Porosity of gray layer in solid particle 0.98 C 0 Solubility of EC in liquid film 0.85 ψ Associating parameter of solvent 2.65 M B Molecular weight of solvent (D) 100 V A Molecular volume of EC (m3) 30.62 ∗ 10 ( - 8 ) K Linear equilibrium proportional constant 0.15 H 0 Initial liquid level in extraction tank (m) 3.5 T 0 Initial temperature of feed liquid in extraction tank (°C) 20 C i n Initial concentration of EC in solvent 0 T S Sampling period (s) 0.05Figure 4
Relationship between model outputs and steam flow in the extraction process.From Figure4, it is clear that the extraction yields of EC and VO increase with the steam flow until reaching their respective equilibrium states, and the consumption of steam exhibits a gradual, linear rise. First, with other parameters fixed, the increased steam flow causes the feed liquid temperature to rise, and this rising temperature results in an increment in the diffusion coefficients, which will accelerate the extraction of EC. However, when the temperature reaches a stable value, owing to the characteristics of the feed liquid, the extraction of EC will gradually slow down and eventually stop once the concentration of EC in the solvent is equal to its solubility at this temperature. The recycling of VO has the similar tendency to that of EC, but the reason for such an equilibrium state is that the VO has been fully extracted at this temperature.The effect of the extraction time on the model outputs is plotted in Figure5. In this simulation, it was assumed that all other operating or state conditions remained unaltered and the steam flows were set as Qij=2.5, i=1,2 and j=1,2,…,6. It can be seen that the extraction yields of EC and VO increase with the extraction time until they reach the equilibrium state. As the extraction time increases, the heat absorbed by the feed liquid will continue to rise, which leads to the increment in the feed liquid temperature. The analysis is then similar to that for the effect of the various steam flows.Figure 5
Relationship between model outputs and extraction time in the extraction process.


## 3.1. Mathematical Modeling of Drug Extraction Tank

A mechanistic model of the extraction tank has been developed according to the principles of mass and energy conservation [17]. In this model, the liquid level H and feed liquid temperature T in the extraction tank can be calculated using the steam flow at the bottom and side of the tank, Q1, Q2, and the extraction time t. The variation of liquid level and temperature with extraction time t can be expressed as(1)dHdt=Q1-Q3P1A,(2)dTdt=1AS1HP2-S1TP1+S2T1-S2TQ1+S2Q2T1-T+S1TP1-P2Q3.The mixture flow of VO and steamQ3 is assumed to have a nonlinear relationship with T:(3)Q3=K1eK2T.The symbols used in this model are as follows:Q1, Q2: the steam flow at the bottom and side of the extraction tank, respectively; Q3: mixture flow of VO and steam; T1: steam temperature before entering the extraction tank; S1: specific heat capacity of feed liquid; S2: specific heat capacity of water; P1: volume ratio of water (liquefied from steam) and steam; P2: standard heat of liquefaction of vapor under standard atmospheric pressure; A: cross-sectional area of the extraction tank.


## 3.2. Mathematical Modeling of the Mass Transfer Process of Effective Constituent

The mass transfer process for EC was described in detail in Section2, where it was noted that the transfer could be divided into five steps. In the usual extraction process, the penetration of solvent and dissolution of solute are not the controlling factors and can thus be neglected. The diffusion processes undoubtedly have a decisive effect on the speed of mass transfer. Hence, external diffusion and internal diffusion are primarily considered in the modeling of the mass transfer process.External diffusion, also called liquid film diffusion, is the main resistance to mass transfer. The gas film will not hamper the mass transfer process, so it is neglected in the modeling process, as illustrated by the dashed line in Figure1. Internal diffusion is the shrinking core process of particles containing EC, as shown in Figure 1. In this study, using the unreacted shrinking core theory from the metal ore leaching process, the drug extraction process can be approximately regarded as the leaching of metallic minerals, albeit under different reactions. When the EC in the outer layer has diffused into the extraction solvent, the insoluble components are left on the surface of the solid particles. Thus, the solid particles are surrounded by a grey layer composed of insoluble components, as shown in Figure 1. The inner EC then diffuses into the surface of the solid particles through internal diffusion, after which this part of the EC in the solid particle surface diffuses into the solvent once again. This procedure is repeated, and the unextracted core will gradually shrink.The diffusion rate of the extraction process can be expressed as [3, 18–20](4)dGdt=JS,where G is the mass of EC extracted from solid herb particles, J is the mass of EC diffused from solid herb particles to solvent per unit time, S expresses the area of the interface between the solid and liquid phase, and t is the extraction time.It is assumed that internal diffusion and external diffusion occur in series, so the law of additive resistance can be applied as follows [3, 21, 22]:(5)J=C0-C1/β1+1/β2=C0-CR-r/Ds+r0/D,where C0 is the solubility of EC in the liquid film on the surface of solid particles; C is the instantaneous concentration of EC in extraction solvent; D and Ds express the diffusion coefficients of EC passing through the liquid film and the inside of solid particles, respectively; R and r denote the radius of the original solid particle and the solid particle as the core gradually shrinks, respectively; and r0 expresses the thickness of the liquid film (see Figure 1). In addition, β1 is the coefficient of internal diffusion (1/β1 is the internal diffusion resistance) and β2 is the coefficient of external diffusion (1/β2 is the external diffusion resistance). The parameters β1 and β2 are given by(6)β1=DsR-r,β2=Dr0.Combined with the model of the extraction tank, it can be concluded that(7)dGdt=dVCdt=dAHCdt=AHdCdt+ACdHdt.Based on (1), (4), (5), and (7), we have that(8)dCdt=1AHC0-CSR-r/Ds+r0/D-CP1Q1-Q3.The diffusion coefficients can then be determined as follows.(1) For the solution with macromolecules of EC, the external diffusion coefficient is obtained by(9)D=BTvAfA.The resistance of EC sustained in solutionfA can be calculated by Stokes’ equation:(10)fA=6πRμBvA.Combining (9) and (10), we obtain(11)D=BT6πRμB,where B is the Boltzmann constant, vA is the kinematic velocity of EC molecules, and μB is the viscosity of the solvent.(2) For the dilute solution with micromolecules of EC, the external diffusion coefficient is generally expressed by Wilke’s equation [38]:(12)D=7.4×10-12ψMB0.5TμBVA0.6,where ψ is the associating parameter of the solvent, MB is the molecular weight of the solvent, and VA is the molecular volume of EC. In this work, (12) is used to calculate the diffusion coefficient D.(3) The internal diffusion coefficient of EC inside the solid particleDs is calculated by [39](13)Ds=εDτ,where ε and τ are the porosity and sinuosity of holes inside the solid particles, respectively.Another equation connects the radius of solid particles containing EC with the internal diffusion coefficientDs, the concentration of EC in the liquid film C0, and the instantaneous concentration of EC in extraction solvent C [39]:(14)r=R-kDsCtC01/2.


## 3.3. Mechanistic Modeling of Volatile Oil Recycling

The recycling principle of VO was described in Section2. Because the internal diffusion occurs in the same phase, it can be neglected. However, the external diffusion process, in which VO diffuses into the gas phase (water vapor) from the surface of the solid phase (solid particle) across the gas-liquid film, is interphase diffusion. This external diffusion is the main factor controlling the diffusion velocity. Because the VO is insoluble in water, its explicit diffusion in the liquid phase can be ignored, as denoted by the dashed line in Figure 2. Consequently, the resistance to external diffusion mainly occurs in the gas film [40]. The diffusion velocity is expressed as [40](15)dqdt=KGSCl-Ci,where q is the concentration of VO in the solid herb particles, KG is the gas phase mass transfer film coefficient, Cl is the concentration of VO in the gas phase, and Ci is the concentration of VO in the gas film. The following assumptions are made:(1) Because the VO in the gas phase will constantly enter the condenser with water vapor,Cl≈0.(2) There is a linear counterbalance between the concentrations of VO in the solid phase and gas film; that is,Ci=Kq [23], where K is a constant coefficient.Equation (15) can then be expressed as (16)dqdt=-KGSKq=-ek0DSKd1q,where(17)KG=ek0Dd1,in which k0 is a constant coefficient and d1 is the thickness of the gas film.As for the liquid density, the density of VO will decrease as the feed liquid temperatureT increases. The VO density can be calculated as(18)ρ0=A1+A2T+A3T2+A4T3+A5T4,where ρ0 is the density of VO and A1–A5 are constant coefficients.


## 3.4. Mechanistic Modeling of the Efficiency of the Oil-Water Separator

Under the effect of gravity, the oil-water separator achieves the separation of oil and water in the static or flowing state by taking advantage of the density difference between oil and water. The kinetic state of a droplet in the disperse phase can be described by Stokes’ law [24]:(19)vow=ρw-ρ0gd2218μ0,where vow is the lifting velocity of the oil droplet, ρw is the density of water, g is acceleration due to gravity, d2 is the diameter of the oil droplet, and μ0 is the viscosity of water.The separation efficiency of oil droplets of a certain diameter can be determined according to shallow pool theory [41] as(20)η0=S0vowQ0=S0g18μ0Q0ρw-ρ0d22,where η0 is the lifting efficiency of oil droplets of diameter d2, S0 is the lifting area of the oil layer, and Q0 is the flow of the oil-water mixture.The separation efficiencyηs is a key performance indicator in any oil-water separator and can be expressed as follows:(21)ηs=1-CdCb,where Cd and Cb denote the oil content at the exit and entrance of the separator, respectively.


## 3.5. Processing the Mechanistic Model of the Drug Extraction Production Process

For the convenience of calculations, differential equations in the models are discretized to give a set of algebraic equations. Taking the model for the liquid level in the extraction tank, we have(22)Hk+1-HkTS=Q1k-Q3kP1A,where TS is the sampling period.Thus, the liquid level at sampling timek+1 is(23)Hk+1=Q1k-Q3kP1ATS+Hk,where Q3(k)=K1eK2T(k).Similarly, the discretized model for the feed liquid temperature is(24)Tk+1=TSAS1HkP2-S1TkP1+S2T1-S2TkQ1k+S2Q2kT1-Tk+S1TkP1-P2Q3k+Tk.The discretized model for the concentration of EC is(25)Ck+1=TSAHkC0-CkSR-rk/DSk+r0/Dk-CkP1Q1k-Q3k+Ck,where (26)Dk=7.4×10-12ΦMB0.5TkμBkVA0.6,DSk=εDkτ,rk=R-kDSkCktkC01/2,and the discretized model for the concentration of VO is(27)qk+1=1-ek0DkSKTSd1qk.It is assumed that the extraction time can be divided into six equal intervals, so the entire drug extraction process has 13 input variables: six steam flows at the bottom of the extraction tank (Q11,Q12,Q13,Q14,Q15,Q16), six steam flows at the side of the extraction tank (Q21,Q22,Q23,Q24,Q25,Q26), and the extraction time t. The output variables are the extraction yields of EC and VO (F1,F2, resp.), their extraction efficiencies (η1,η2), and the total consumption of steam F3.The extraction yield of ECF1 and its extraction efficiency η1 can be expressed as(28)F1=f1k=VkCk=AHkCk,η1=F1F1total,where F1total is the total mass of EC in a batch of herbs, which we consider to be 25 kg in this study.The decrement of VO in the extraction tank between adjacent sampling periods is(29)Δmk=mk-1-mk=qk-1-qkF2total.Thus, the recycle yield of VOF2 and its extraction efficiency η2 are computed by the following equations:(30)F2=f2k=f2k-1+Δmkηsk,η2=F2F2total,where F2total is the total mass of VO in a batch of herbs, assumed to be 36 kg, and (31)ηsk=1-CdkCbk=TSP1Q3k-Δmkη0kTSP1Q3k-Δmkη0k,η0k=S0g18μ0Q0kρw-ρ0d22=S0g18μ0P1Q3kρw-ρ0d22.The total consumption of steamF3 is given by (32)F3=∑i=16Q1i+Q2it6.In conclusion, the input and output variables of the mechanistic model for DEPP can be expressed as(33)u=Q11,Q12,Q13,Q14,Q15,Q16,Q21,Q22,Q23,Q24,Q25,Q26,t,y=F1,F2,F3,η1,η2.To verify the rationality and effectiveness of the established mechanistic model, a number of simulations were conducted. Figure4 shows the effect of steam flows on the model outputs. In this simulation, all the steam flows were identical and the other operating or state conditions remained unaltered. For example, t=3 h. The parameters used in the mechanistic model are listed in Table 1.Table 1
Parameters used in mechanistic model.
Parameter Description Value A Cross-sectional area of extraction tank (m2) 3 T 1 Steam temperature before entering extraction tank (°C) 125 P 1 Volume ratio of water and steam 1/80 P 2 Standard heat of liquefaction of vapor (kJ/mol) 40.68 S 1 Specific heat capacity of feed liquid (kJ/(kg  ×  °C)) 4 S 2 Specific heat capacity of water (kJ/(kg  ×  °C)) 4.2 K 1 Coefficient inQ3 4.4 K 2 Coefficient inQ3 0.001 S 0 Lifting area of oil layer (m2) 2.8 ρ w Density of water (g/cm3) 1 ρ 0 Density of volatile oil (g/cm3) 0.72 g Acceleration of gravity (m/s2) 9.8 d 2 Diameter of oil droplet (m) 0.3912 E - 5 q 0 Initial concentration of volatile oil in herbs 0.3 R Radius of solid herb particle (m) 0.8202 E - 3 r 0 Thickness of liquid film (m) 0.222 E - 3 d 1 Thickness of gas film (m) 0.6302 E - 3 τ Sinuosity of holes inside gray layer in solid particle 1.2 ε Porosity of gray layer in solid particle 0.98 C 0 Solubility of EC in liquid film 0.85 ψ Associating parameter of solvent 2.65 M B Molecular weight of solvent (D) 100 V A Molecular volume of EC (m3) 30.62 ∗ 10 ( - 8 ) K Linear equilibrium proportional constant 0.15 H 0 Initial liquid level in extraction tank (m) 3.5 T 0 Initial temperature of feed liquid in extraction tank (°C) 20 C i n Initial concentration of EC in solvent 0 T S Sampling period (s) 0.05Figure 4
Relationship between model outputs and steam flow in the extraction process.From Figure4, it is clear that the extraction yields of EC and VO increase with the steam flow until reaching their respective equilibrium states, and the consumption of steam exhibits a gradual, linear rise. First, with other parameters fixed, the increased steam flow causes the feed liquid temperature to rise, and this rising temperature results in an increment in the diffusion coefficients, which will accelerate the extraction of EC. However, when the temperature reaches a stable value, owing to the characteristics of the feed liquid, the extraction of EC will gradually slow down and eventually stop once the concentration of EC in the solvent is equal to its solubility at this temperature. The recycling of VO has the similar tendency to that of EC, but the reason for such an equilibrium state is that the VO has been fully extracted at this temperature.The effect of the extraction time on the model outputs is plotted in Figure5. In this simulation, it was assumed that all other operating or state conditions remained unaltered and the steam flows were set as Qij=2.5, i=1,2 and j=1,2,…,6. It can be seen that the extraction yields of EC and VO increase with the extraction time until they reach the equilibrium state. As the extraction time increases, the heat absorbed by the feed liquid will continue to rise, which leads to the increment in the feed liquid temperature. The analysis is then similar to that for the effect of the various steam flows.Figure 5
Relationship between model outputs and extraction time in the extraction process.


## 4. Optimization of the Drug Extraction Production Process

### 4.1. Identification of Predictive Model Parameters

To carry out such optimization, a predictive model of DEPP has been developed. This model links the operating variables (steam flow at both the bottom and side of the extraction tank and the extraction time) with the extraction efficiencies of EC and VO. In the present work, the established mechanistic model was simplified to give a predictive model. The following simplifications were made.(1) In modeling the extraction tank, the nonlinear relationship between the mixed steam flowQ3 and temperature T was linearized; that is, Q3=k1T+k2, where k1, k2 are the parameters to be identified.(2) As internal diffusion has less effect on the mass transfer than external diffusion, the internal diffusion was neglected to simplify the mechanistic model.Hence, the differences between the predictive modelfm and mechanistic model fp can be described as(34)Q3=k1T+k2,(35)dCdt=1AHSDr0C0-C-CP1Q1-Q3,and the other parts of the mechanistic model were retained in the predictive model.To predict the extraction efficiencies under different operating conditions, the parametersk1,k2 must be identified. A best fit approach was adopted in which k1,k2 in (34) are the values that best predict the actual DEPP data [42]. The extraction efficiencies of EC and VO were used as criteria for the parameter identification. The identification algorithm used for the predictive model is as follows.Step 1.
n sets of process data (ui,ηi) are produced by mechanistic model fp, in which ui denotes the vector of operating variables and ηi is the vector of extraction efficiencies of EC and VO; that is, ηi=(η1i,η2i), i=1,2,…,n.Step 2.
Insertui into predictive model fm to obtain the predicted extraction efficiencies as follows:(36)η^i=η^1i,η^2i=fmui.Step 3.
Parametersk1,k2 are determined by minimizing the following objective function of the sum of square errors (SSE) of the extraction efficiencies through an optimization algorithm:(37)mink1,k2⁡SSE=∑i=1nη1i-η^1i2+∑i=1nη2i-η^2i2.We solved (37) using PSO, DE, and ABC and compared the performances of the algorithms with one another. The algorithms were executed w times and the results averaged. The optimization results are summarized in Table 2, from which we can see that PSO achieved the best performance in solving the optimization problem.Table 2
Parameter values and optimization results of each algorithm.
n w Algorithm k 1 k 2 SSE 30 10 PSO 0.0044 4.4223 4.646 E - 4 DE 0.0049 4.3734 4.971 E - 4 ABC 0.0023 4.6205 6.532 E - 4


### 4.2. Optimization of Single Extraction

The economic benefit per unit time is considered as the optimization objective, and the operating variables are treated as decision variables. Taking economic income and production consumption into consideration (including the economic income of EC and VO and the consumption cost of herb materials and steam), the following optimization model was established based on the predictive model:(38)maxJ=a×F1+b×F2-c×F3-d×F4ts.t.F1,F2,F3,η1,η2=fu;η1min≤η1≤η1max;η2min≤η2≤η2max;Qmin≤Qij≤Qmax;tmin≤t≤tmax;i=1,2;j=1,2,…,6,where a, b, c, and d are the prices of EC, VO, steam, and herb materials and F4 is the weight of a batch of herb materials. The parameters and constraints in this model are listed in Tables 3 and 4, respectively. The PSO, DE, and ABC algorithms were executed 10 times to determine the optimal solution to (38), and the results are presented in Table 5. The optimization results once again validate the superiority of PSO for the problem considered in this study.Table 3
Parameter values in optimization model.
Parameters a (USD/Kg) b (USD/Kg) c (USD/m3) d (USD/Kg) F 4 (Kg) Value 152.7 122.17 0.031 1.53 120Table 4
Constraints in optimization model.
Constrained variables Quality indexes Operating variables η 1 η 2 Qij (m3/h) t (h) Range [ 0.8,1 ] [ 0.8,1 ] [0,5] [1,4]Table 5
Optimal economic benefits obtained by each algorithm.
Algorithm PSO DE ABC Economic benefit (USD/h) 2293 2240 2252The optimal values obtained by PSO for the operating variables are listed in Table6. The optimal operating conditions were applied to the single extraction process, and the output indexes are given in Table 7. Additionally, the variation in the extraction yield of EC and VO and the consumption of steam are plotted in Figure 6.Table 6
Best settings of operating variables produced by PSO.
Steam flowQ1 (m3/h) Steam flowQ2 (m3/h) Extraction time (h) Q 11 4.9554 Q 21 4.9545 t 2.3 Q 12 4.7633 Q 22 4.3348 Q 13 4.5968 Q 23 4.8391 Q 14 3.6422 Q 24 4.3850 Optimal economic benefit (USD/h)  Q 15 3.5999 Q 25 2.3083 J 2293 Q 16 3.1419 Q 26 4.2665Table 7
Actual optimal output indexes and economic benefit in single extraction.
Single extraction F 1 (Kg) F 2 (Kg) F 3 (m3) η 1 η 2 J (USD/h) Actual value 8.82 32.24 19.51 35.28% 89.56% 2218Figure 6
Variation trend of various output indexes in single extraction.From this figure, we can see that the mass of EC increases with extraction time in the initial stage of the single extraction, but the rate of increase gradually slows as we reach the equilibrium state. The reason for this is that the concentration of EC in the extracted solution reaches its saturated solubility, and so no more EC will be extracted from the herb materials, even if we continue the extraction process.There is also a comparatively small recycle yield of VO in the initial 0.75 h, because the temperature in the extraction tank is too low to boil VO and little of it can be volatilized and brought out together with vapor in the initial stages of extraction. When the temperature reaches the boiling point of VO, its recycle yield grows exponentially. As the extraction progresses, there is less VO remaining in the herbs, and the increasing tendency of the recycle yield becomes slower until all VO has been extracted.The actual results in Table7, however, suggest that the extraction efficiency of EC is only 35.28%, and so most of the EC has not been extracted. Thus, the quality constraints cannot be satisfied, although there is a significant economic benefit. According to national production management regulations, such a huge wastage of herb materials is forbidden, and a multiextraction process is needed to avoid wasting raw materials.


### 4.3. Optimization of Multiextraction

As the extraction process progresses, the extraction temperature does not always rise with an increase in the operating variables. This is because of the self-regulating characteristics of the feed liquid. As described above, the concentration of EC in the feed liquid will reach a maximum, and only VO will be recycled along with the extraction. This causes the low extraction efficiency of EC in the single extraction case. Therefore, to avoid such a situation, the first extraction should be terminated and the feed liquid containing EC should be separated from the solid herb via a filter. After this, a certain amount of new solvent can be added to the extraction tank and a second extraction can be performed. Depending on the total content of EC in the herb and its solubility in the solvent, at least three extractions are needed to remove all of the EC. A schematic diagram of the multiextraction process is shown in Figure7, where each extraction represents a single extraction. Based on the principle of multiextraction, any surplus in the quality indexes after the (i-1)th extraction, such as the total residual mass of VO and radius of unextracted core of EC, is regarded as the initial input conditions of the ith extraction, where i=2,3,…,k. According to this principle, a predictive model for the multiextraction process can be developed.Figure 7
Schematic diagram of multiextraction.In developing a predictive model for the multiextraction scenario, the extraction frequencyk is treated as one of the operating variables (k=3,4,5). In this study, predictive models were established for three, four, and five extractions. We now describe the three-time extraction model; the modeling approach for four and five extractions is similar. The three-extraction case is composed of three single extractions, each of which has the 13 input variables described previously. Thus, there are 39 input variables in the three-extraction predictive model:(39)U=u1,u2,u3,where ui is the vector of operating variables in the ith single extraction and(40)ui=Q11,i,Q12,i,Q13,i,Q14,i,Q15,i,Q16,i,Q21,i,Q22,i,Q23,i,Q24,i,Q25,i,Q26,i,ti,i=1,2,3.The predictive outputs for the three extractions, including the total extraction yield of EC and VO, consumption of steam, and extraction efficiencies, can be calculated as(41)F1=∑i=13F1,i,F2=∑i=13F2,i,F3=∑i=13∑j=16Q1j,i+Q2j,iti6,η1=F1F1total,η2=F2F2total.Therefore, the predictive model of three-time extraction can be summarized as(42)F1,F2,F3,η1,η2=Fm,3U.After developing predictive models fork=3,4, and 5, the optimization model for multiextraction was derived by treating the extraction frequency as one of the decision variables:(43)maxJ=a×F1+b×F2-c×F3-d×F4∑i=1ktis.t.F1,F2,F3,η1,η2=Fm,kU;η1min≤η1≤η1max;η2min≤η2≤η2max;Qmin≤Q1j,k≤Qmax;Qmin≤Q2j,k≤Qmax;tmin≤ti≤tmax;k=3,4,5;j=1,2,…,6.In this optimization model, the extraction frequencyk is treated as one of the decision variables (k=3,4,5). The decision variables must be carefully handled in solving this optimization problem. For example, when k=3, the decision variable vector Ud can be expressed as(44)Ud=k,u1,u2,u3,u4,u5,where u4=u5=0. Similarly, u5=0 when k=4.The advantages of PSO in solving such optimization problems have been verified many times and are not covered here. The parameters used in the PSO algorithm are presented in Table8, and the optimal multiextraction solution obtained by the PSO method with 10 runs is given in Table 9.Table 8
Parameter settings of PSO.
Swarm size Iterations Inertia weight Learning factor 100 100 Linear decrease: 0.9~0.2 c 1: 2.5~1.0c2: 1.0~2.5Table 9
Best settings of operating variables.
1st extraction 2nd extraction 3rd extraction 4th extraction 5th extraction Steam flowQ1 (m3/h) Q 11 4.5538 3.6784 4.2887 0.0000 0.0000 Q 12 4.6789 2.7554 0.9895 0.0000 0.0000 Q 13 4.4342 3.2861 4.1627 0.0000 0.0000 Q 14 1.5664 4.9991 2.2495 0.0000 0.0000 Q 15 3.7135 4.9160 0.9995 0.0000 0.0000 Q 16 0.0477 1.6587 4.2214 0.0000 0.0000  Steam flowQ2 (m3/h) Q 21 4.9544 0.5090 3.6287 0.0000 0.0000 Q 22 4.3760 3.2264 3.4749 0.0000 0.0000 Q 23 3.7216 4.4979 3.2713 0.0000 0.0000 Q 24 0.2749 1.1098 3.9415 0.0000 0.0000 Q 25 4.0857 3.6746 4.5692 0.0000 0.0000 Q 26 1.0008 2.8459 4.1023 0.0000 0.0000  Extraction time (h) t 1.6628 1.0992 3.0475 0.0000 0.0000From Table9, it is clear that the optimal extraction frequency is 3, so the operating variables in the fourth and fifth extractions are all zero. These optimal operating variables were used in the mechanistic model of the multiextraction process to calculate the actual output indexes and economic benefit. The results, together with their predicted values, are given in Table 10. However, owing to the inherent errors of predictive models, it is difficult to achieve the optimized economic benefit in an actual process. The results in Table 10 indicate that a discrepancy of 6.4% exists between the predicted and actual economic benefit, which means that “optimal in the model” may not translate to “optimal for the process,” as mentioned before. This model uncertainty hampers the optimization of the multiextraction process. Hence, as discussed in Section 5, the ILC method was adopted to overcome the problem of model uncertainty.Table 10
Output indexes and economic benefit in multiextraction.
Multiextraction F 1 (Kg) F 2 (Kg) F 3 (m3) η 1 η 2 J (USD/h) Predicted value 24.39 34.46 37.59 97.57% 95.73% 1333 Actual value 21.09 34.40 37.59 84.36% 95.50% 1247.3


## 4.1. Identification of Predictive Model Parameters

To carry out such optimization, a predictive model of DEPP has been developed. This model links the operating variables (steam flow at both the bottom and side of the extraction tank and the extraction time) with the extraction efficiencies of EC and VO. In the present work, the established mechanistic model was simplified to give a predictive model. The following simplifications were made.(1) In modeling the extraction tank, the nonlinear relationship between the mixed steam flowQ3 and temperature T was linearized; that is, Q3=k1T+k2, where k1, k2 are the parameters to be identified.(2) As internal diffusion has less effect on the mass transfer than external diffusion, the internal diffusion was neglected to simplify the mechanistic model.Hence, the differences between the predictive modelfm and mechanistic model fp can be described as(34)Q3=k1T+k2,(35)dCdt=1AHSDr0C0-C-CP1Q1-Q3,and the other parts of the mechanistic model were retained in the predictive model.To predict the extraction efficiencies under different operating conditions, the parametersk1,k2 must be identified. A best fit approach was adopted in which k1,k2 in (34) are the values that best predict the actual DEPP data [42]. The extraction efficiencies of EC and VO were used as criteria for the parameter identification. The identification algorithm used for the predictive model is as follows.Step 1.
n sets of process data (ui,ηi) are produced by mechanistic model fp, in which ui denotes the vector of operating variables and ηi is the vector of extraction efficiencies of EC and VO; that is, ηi=(η1i,η2i), i=1,2,…,n.Step 2.
Insertui into predictive model fm to obtain the predicted extraction efficiencies as follows:(36)η^i=η^1i,η^2i=fmui.Step 3.
Parametersk1,k2 are determined by minimizing the following objective function of the sum of square errors (SSE) of the extraction efficiencies through an optimization algorithm:(37)mink1,k2⁡SSE=∑i=1nη1i-η^1i2+∑i=1nη2i-η^2i2.We solved (37) using PSO, DE, and ABC and compared the performances of the algorithms with one another. The algorithms were executed w times and the results averaged. The optimization results are summarized in Table 2, from which we can see that PSO achieved the best performance in solving the optimization problem.Table 2
Parameter values and optimization results of each algorithm.
n w Algorithm k 1 k 2 SSE 30 10 PSO 0.0044 4.4223 4.646 E - 4 DE 0.0049 4.3734 4.971 E - 4 ABC 0.0023 4.6205 6.532 E - 4


## 4.2. Optimization of Single Extraction

The economic benefit per unit time is considered as the optimization objective, and the operating variables are treated as decision variables. Taking economic income and production consumption into consideration (including the economic income of EC and VO and the consumption cost of herb materials and steam), the following optimization model was established based on the predictive model:(38)maxJ=a×F1+b×F2-c×F3-d×F4ts.t.F1,F2,F3,η1,η2=fu;η1min≤η1≤η1max;η2min≤η2≤η2max;Qmin≤Qij≤Qmax;tmin≤t≤tmax;i=1,2;j=1,2,…,6,where a, b, c, and d are the prices of EC, VO, steam, and herb materials and F4 is the weight of a batch of herb materials. The parameters and constraints in this model are listed in Tables 3 and 4, respectively. The PSO, DE, and ABC algorithms were executed 10 times to determine the optimal solution to (38), and the results are presented in Table 5. The optimization results once again validate the superiority of PSO for the problem considered in this study.Table 3
Parameter values in optimization model.
Parameters a (USD/Kg) b (USD/Kg) c (USD/m3) d (USD/Kg) F 4 (Kg) Value 152.7 122.17 0.031 1.53 120Table 4
Constraints in optimization model.
Constrained variables Quality indexes Operating variables η 1 η 2 Qij (m3/h) t (h) Range [ 0.8,1 ] [ 0.8,1 ] [0,5] [1,4]Table 5
Optimal economic benefits obtained by each algorithm.
Algorithm PSO DE ABC Economic benefit (USD/h) 2293 2240 2252The optimal values obtained by PSO for the operating variables are listed in Table6. The optimal operating conditions were applied to the single extraction process, and the output indexes are given in Table 7. Additionally, the variation in the extraction yield of EC and VO and the consumption of steam are plotted in Figure 6.Table 6
Best settings of operating variables produced by PSO.
Steam flowQ1 (m3/h) Steam flowQ2 (m3/h) Extraction time (h) Q 11 4.9554 Q 21 4.9545 t 2.3 Q 12 4.7633 Q 22 4.3348 Q 13 4.5968 Q 23 4.8391 Q 14 3.6422 Q 24 4.3850 Optimal economic benefit (USD/h)  Q 15 3.5999 Q 25 2.3083 J 2293 Q 16 3.1419 Q 26 4.2665Table 7
Actual optimal output indexes and economic benefit in single extraction.
Single extraction F 1 (Kg) F 2 (Kg) F 3 (m3) η 1 η 2 J (USD/h) Actual value 8.82 32.24 19.51 35.28% 89.56% 2218Figure 6
Variation trend of various output indexes in single extraction.From this figure, we can see that the mass of EC increases with extraction time in the initial stage of the single extraction, but the rate of increase gradually slows as we reach the equilibrium state. The reason for this is that the concentration of EC in the extracted solution reaches its saturated solubility, and so no more EC will be extracted from the herb materials, even if we continue the extraction process.There is also a comparatively small recycle yield of VO in the initial 0.75 h, because the temperature in the extraction tank is too low to boil VO and little of it can be volatilized and brought out together with vapor in the initial stages of extraction. When the temperature reaches the boiling point of VO, its recycle yield grows exponentially. As the extraction progresses, there is less VO remaining in the herbs, and the increasing tendency of the recycle yield becomes slower until all VO has been extracted.The actual results in Table7, however, suggest that the extraction efficiency of EC is only 35.28%, and so most of the EC has not been extracted. Thus, the quality constraints cannot be satisfied, although there is a significant economic benefit. According to national production management regulations, such a huge wastage of herb materials is forbidden, and a multiextraction process is needed to avoid wasting raw materials.


## 4.3. Optimization of Multiextraction

As the extraction process progresses, the extraction temperature does not always rise with an increase in the operating variables. This is because of the self-regulating characteristics of the feed liquid. As described above, the concentration of EC in the feed liquid will reach a maximum, and only VO will be recycled along with the extraction. This causes the low extraction efficiency of EC in the single extraction case. Therefore, to avoid such a situation, the first extraction should be terminated and the feed liquid containing EC should be separated from the solid herb via a filter. After this, a certain amount of new solvent can be added to the extraction tank and a second extraction can be performed. Depending on the total content of EC in the herb and its solubility in the solvent, at least three extractions are needed to remove all of the EC. A schematic diagram of the multiextraction process is shown in Figure7, where each extraction represents a single extraction. Based on the principle of multiextraction, any surplus in the quality indexes after the (i-1)th extraction, such as the total residual mass of VO and radius of unextracted core of EC, is regarded as the initial input conditions of the ith extraction, where i=2,3,…,k. According to this principle, a predictive model for the multiextraction process can be developed.Figure 7
Schematic diagram of multiextraction.In developing a predictive model for the multiextraction scenario, the extraction frequencyk is treated as one of the operating variables (k=3,4,5). In this study, predictive models were established for three, four, and five extractions. We now describe the three-time extraction model; the modeling approach for four and five extractions is similar. The three-extraction case is composed of three single extractions, each of which has the 13 input variables described previously. Thus, there are 39 input variables in the three-extraction predictive model:(39)U=u1,u2,u3,where ui is the vector of operating variables in the ith single extraction and(40)ui=Q11,i,Q12,i,Q13,i,Q14,i,Q15,i,Q16,i,Q21,i,Q22,i,Q23,i,Q24,i,Q25,i,Q26,i,ti,i=1,2,3.The predictive outputs for the three extractions, including the total extraction yield of EC and VO, consumption of steam, and extraction efficiencies, can be calculated as(41)F1=∑i=13F1,i,F2=∑i=13F2,i,F3=∑i=13∑j=16Q1j,i+Q2j,iti6,η1=F1F1total,η2=F2F2total.Therefore, the predictive model of three-time extraction can be summarized as(42)F1,F2,F3,η1,η2=Fm,3U.After developing predictive models fork=3,4, and 5, the optimization model for multiextraction was derived by treating the extraction frequency as one of the decision variables:(43)maxJ=a×F1+b×F2-c×F3-d×F4∑i=1ktis.t.F1,F2,F3,η1,η2=Fm,kU;η1min≤η1≤η1max;η2min≤η2≤η2max;Qmin≤Q1j,k≤Qmax;Qmin≤Q2j,k≤Qmax;tmin≤ti≤tmax;k=3,4,5;j=1,2,…,6.In this optimization model, the extraction frequencyk is treated as one of the decision variables (k=3,4,5). The decision variables must be carefully handled in solving this optimization problem. For example, when k=3, the decision variable vector Ud can be expressed as(44)Ud=k,u1,u2,u3,u4,u5,where u4=u5=0. Similarly, u5=0 when k=4.The advantages of PSO in solving such optimization problems have been verified many times and are not covered here. The parameters used in the PSO algorithm are presented in Table8, and the optimal multiextraction solution obtained by the PSO method with 10 runs is given in Table 9.Table 8
Parameter settings of PSO.
Swarm size Iterations Inertia weight Learning factor 100 100 Linear decrease: 0.9~0.2 c 1: 2.5~1.0c2: 1.0~2.5Table 9
Best settings of operating variables.
1st extraction 2nd extraction 3rd extraction 4th extraction 5th extraction Steam flowQ1 (m3/h) Q 11 4.5538 3.6784 4.2887 0.0000 0.0000 Q 12 4.6789 2.7554 0.9895 0.0000 0.0000 Q 13 4.4342 3.2861 4.1627 0.0000 0.0000 Q 14 1.5664 4.9991 2.2495 0.0000 0.0000 Q 15 3.7135 4.9160 0.9995 0.0000 0.0000 Q 16 0.0477 1.6587 4.2214 0.0000 0.0000  Steam flowQ2 (m3/h) Q 21 4.9544 0.5090 3.6287 0.0000 0.0000 Q 22 4.3760 3.2264 3.4749 0.0000 0.0000 Q 23 3.7216 4.4979 3.2713 0.0000 0.0000 Q 24 0.2749 1.1098 3.9415 0.0000 0.0000 Q 25 4.0857 3.6746 4.5692 0.0000 0.0000 Q 26 1.0008 2.8459 4.1023 0.0000 0.0000  Extraction time (h) t 1.6628 1.0992 3.0475 0.0000 0.0000From Table9, it is clear that the optimal extraction frequency is 3, so the operating variables in the fourth and fifth extractions are all zero. These optimal operating variables were used in the mechanistic model of the multiextraction process to calculate the actual output indexes and economic benefit. The results, together with their predicted values, are given in Table 10. However, owing to the inherent errors of predictive models, it is difficult to achieve the optimized economic benefit in an actual process. The results in Table 10 indicate that a discrepancy of 6.4% exists between the predicted and actual economic benefit, which means that “optimal in the model” may not translate to “optimal for the process,” as mentioned before. This model uncertainty hampers the optimization of the multiextraction process. Hence, as discussed in Section 5, the ILC method was adopted to overcome the problem of model uncertainty.Table 10
Output indexes and economic benefit in multiextraction.
Multiextraction F 1 (Kg) F 2 (Kg) F 3 (m3) η 1 η 2 J (USD/h) Predicted value 24.39 34.46 37.59 97.57% 95.73% 1333 Actual value 21.09 34.40 37.59 84.36% 95.50% 1247.3


## 5. Use of Iterative Learning Control to Overcome Model Uncertainty

To eliminate the impact of the model uncertainty, the iterative nature of numerical optimization and certain repetitive properties can be utilized. The idea of ILC is introduced to improve the economic benefit. In this study, we used DDOTILC with the control law (see [35] for details): (45)φ^k=φ^k-1+ξΔyk-1N-φ^k-1Δuk-1Δuk-1Tμ+Δuk-12uk=uk-1+ρφ^kTλ+φ^k2ek-1N,where ρ,λ,ξ, and μ are positive constants; k is the iteration number of the batch process and N is their terminal moment; φ^k is the estimated pseudo-partial-derivative of the kth batch process; and ek-1(N) is the terminal tracking error of the output.In the application of this approach, the economic benefit is treated as the terminal output and the operating variables are adjusted online to improve the economic benefit. The desired economic benefitJd is set as the predicted value obtained by solving (43). The parameters used in (45) are listed in Table 11. The blue curves in Figure 8 describe the evolution of the economic benefit under DDOTILC. The results indicate that the actual economic benefit achieves an increment of 1.5% after six batches, which partly improves the economic benefit, although this is still short of the desired economic benefit. In addition, the extraction efficiencies decrease with the increase in economic benefit, as shown in Figure 8. When the extraction efficiencies reach a threshold, the economic benefit will be inversely proportional to the extraction yields of EC and VO, because the costs of extracting the remaining EC and VO will be much greater than the additional income. Thus, the optimal economic benefit may not correspond to adjusting the operating variables to maximize the extraction of EC and VO.Table 11
Parameters of DDOTILC.
Parameter ρ μ ξ λ Value 0.003 1 0.1 0.01Figure 8
Comparison of economic benefit between original DDOTILC and DDOTILC with fuzzy adjustment.The parameter settings will affect the convergence rate of ILC, and the best parameter settings should have the ability to change adaptively with the tracking error and variations in system output. In this study, the parameterρ in (45) was varied though fuzzy adaptive adjustment over the range [0,α]. The convergence rate of economic benefit can be changed by adjusting ρ. When the absolute values of the tracking error of economic benefit and its variation are high, the value of ρ should also be high. Moreover, the value of ρ should decrease as the absolute values of tracking error and its variation decrease. According to this principle, the fuzzy adjustment rule was formulated as shown in Table 12, where EJ and ΔEJ represent the absolute values of the tracking error of economic benefit and its variation, respectively. The membership functions of EJ,ΔEJ, and ρ are shown in Figure 9. The first red curve in Figure 8 shows the trajectory of economic benefit based on the fuzzy adjustment of parameter ρ, with which the advantage of the fuzzy-adjusted DDOTILC method is validated. In this simulation, α=0.005.Table 12
Fuzzy adjustment rule.
ρ Δ E J E J NB NM NS Z PS PM PB NB Z Z Z PS PS PM PM NM Z Z Z PS PM PM PM NS Z PS PS PM PM PM PM Z Z PS PM PM PM PM PM PS PS PS PM PM PM PM PM PM PS PM PM PM PM PM PM PB PM PM PM PM PM PM PMFigure 9
Membership functions ofEJ,ΔEJ, and ρ.


## 6. Conclusion

This paper proposed a mechanistic modeling and optimization control strategy for DEPP. First, a mechanistic model of the drug extraction process was developed based on previous efforts to simulate the actual production process and produce process data. A simulation was conducted to verify the rationality and effectiveness of this mechanistic model. A predictive model was then developed by simplifying some of the processes in the mechanistic model. Simulation results demonstrated the effectiveness of this predictive model. Process optimization was first implemented for single extraction, and the results indicated an extremely low extraction yield of EC, which indicates serious wastage of herbs, although this gave a preferable economic benefit. Such wastage of raw materials is forbidden according to national production management regulations. A multiextraction DEPP is therefore necessary, and so process optimization for multiextraction was investigated. However, such optimization is hampered by model uncertainty. Therefore, the DDOTILC method was applied to partly overcome this model uncertainty. The simulation results indicate that the economic benefit can be improved by 1.5%. Finally, the idea of fuzzy adjustment was introduced to adaptively adjust the parameterρ in DDOTILC, which increases the convergence rate of economic benefit. The simulation results indicate that the proposed modeling and optimization control method can effectively solve the practical problems encountered in DEPP.The proposed modeling and optimization control strategy is easy to implement in practical applications because it requires lesser accuracy of predictive models. The research in this paper is based on a mechanistic model developed to simulate actual DEPP and produce process data. However, there is no empirical research from pharmaceutical enterprises to test the validity of the model and method. All parameters used for the mechanistic modeling, such as the device parameters for the extraction tank and state parameters of DEPP, correspond to the actual production situation, so the model proposed in this work has the ability to simulate the actual DEPP, and it is reasonable to test the validity of the proposed method through simulations. The second limitation of this study is that the fuzzy rules should be based on the actual situation. For example, the initial range ofρ must be set according to the actual DEPP scenario when applying DDOTILC.



---

*Source: 3279423-2016-12-01.xml*