Purity Control Based on a Type-II Fuzzy Controller for a Simulated Moving Bed

: The control of a simulated moving bed (SMB) is always a challenging chemical control topic due to its complexity and nonlinearity. Its mathematical model must undergo an afﬁne transformation and digitization before it can be controlled. Basically, there are three aspects that need to be considered in the nonlinear control of an SMB. First, the nonlinear characteristics are more complicated due to the switching time parameters of discrete events. Second, the control objective is not to minimize the control output error, but to make the separated concentrations between the components of the substance reach a certain ratio. Finally, the control variables are highly coupled. So far, the vast majority of the industry still uses relatively simple PLC controls; a few use speciﬁc controllers based on materials to be separated such as model predictive controls and PID controllers. Therefore, there is no uniﬁed intelligent processing mode. In this paper, a type-II fuzzy controller is presented and used as an SMB control. The interference of the related parameters was tested to observe the stability and robustness of the controller. The type-II fuzzy control was based on type-II fuzzy sets, which resulted in the type-II fuzzy controller having more ﬂexible attribution function values. The results showed that the type-II fuzzy controller was not only more accurate in the control, but also better for robustness and adaptability than an ordinary fuzzy controller and PID controller.


Introduction
Chromatography is a technique that uses the distribution differences of a compound in the stationary and mobile phases to achieve the separation of a mixture.SMBs have been widely used in the manufacturing process of chemical and biomedical products and identified as a technology that can greatly improve the efficiency of chromatographic separation.However, due to the many complex parameters involved in the SMB control process, the cost of obtaining optimized parameters through actual experiments to control the separation process of an SMB is huge.Technicians often set a few initial control parameters of an SMB according to their experience or by experiments, but such a method often makes the control of an SMB unable to achieve its best state [1][2][3].
Many researchers hope to conduct quantitative analyses by studying the mathematical models of SMBs.Generally, there are two mathematical models adopted in an SMB; namely, the general rate model and the equilibrium diffusion model.The general rate model is a comprehensive mechanism model, which is more consistent with the actual process but more complicated.The equilibrium diffusion model is a simplified mechanism model that can reflect the actual process well when the concentration of the separated components is low [4].However, no matter which model is used, they are a set of partial differential equations and the analytical solutions are difficult to obtain.It might even be said that the real solutions are impossible to obtain.
Traditional nonlinear theory and control methods can handle nonlinear autonomous systems, affine control systems, continuous dynamic differential equations, or difference equations but cannot cope with the complexity of an SMB [5,6].An SMB is different from the above systems.It is a nonaffine and nonautonomous system; the most difficult part of an SMB control is that the discrete switching time variable needs to be considered for the actual system.Due to the existence of this variable, the continuous dynamic behavior of the system is destroyed and the SMB becomes a new type of hybrid system.In the current methods, there is no effective solution for controlling such a hybrid system; thus, how to control an SMB efficiently and precisely is still a challenging research topic [7,8].
In past research, Nogueira et al. proposed a work about the control of an SMB process in the enantio-separation of binaphthol [9].A switching system-based strategy and a proper transfer function were used in the stable model predictive controller (MPC) to overcome the problems related to the dynamic behavior of the process.Yan et al. applied two subspace system identification algorithms-a multivariable output error state-space (MOESP) identification algorithm and a numerical algorithm-to obtain the third-order and fourth-order state-space yield models of an SMB, respectively.The MPC method based on the established state-space model was then used in an SMB chromatographic separation process [10].Other related SMB control studies include a self-tuning control and an adaptive nonlinear model predictive control [11,12].Marı'a-Sonia et al. considered the general dynamic optimization (open loop optimal control) of an SMB chromatographic separation process.This allowed the calculation of an optimal feed concentration and/or feed flow rate over each switching period with maximum flexibility [13].In a practical application, Coelho et al. used the mathematical optimization method to predict the performance of a real SMB system and achieved a 97% separation purity control of tartronic acid (TTA) and glycemic acid (GCA) materials [14].To optimize the performance of the control system, Li et al. proposed a predictive control method of the SMB chromatographic separation process based on a piecewise affine model [15].A bypass-simulated moving bed (BP-SMB) chromatographic process characterized by the possibility of over-purifying the raffinate and/or the extract product followed by blending with the feed; this was studied by Maruyama et al. [16].
Other studies using mixed multiple models are described below.Suvarov et al. used a self-adjusting control to adjust the spatial position of adsorption and desorption waves and then adjusted the purity and productivity of the raffinate and extraction flow.Such a predictive control technology has been widely used in program controls [17].Song et al. put forward a new operation strategy called Simcon.This method improved the separation performance of SMB chromatography by simultaneously controlling the outlet and inlet.This control operation was simple, but the accuracy was not too high [18].Carols et al. proposed a new approach that was based on the combination of wave theory and a multimodel predictive control (MMPC).The wave theory provided the theoretical framework [19].Based on the mathematical model, a numerical solution process was proposed to simulate the transient and steady state of a moving bed by Leao et al.It was also a theoretical architecture and computing model [20].In a simulation study, Ju WenLee proposed a simplified process model with linear isotherms to estimate the process state of SMB chromatography.It obtained optimal operating parameter conditions through a "switch by switch" switching operation within the moderate nonlinear range of the Langmuir isotherm [21].Yang et al. proposed an optimization strategy based on an improved moving asymptote algorithm.Research has shown that an optimal controller based on an improved moving asymptote method can dynamically control and optimize the process of a simulated moving bed [22].
Generally, these studies were for specific equipment and separation materials and not a general solution.For example, sugar separation in the food industry may not be applicable to the chemical industry.In terms of the calculation model, most are based on the finite element calculation method.Although the precision of a finite element calculation is high, the calculation efficiency is not high enough; therefore, it is not suitable for the application of a real-time online control.In this paper, the authors attempted to use a finite difference method to enhance the calculation efficiency.The robustness and adaptability of the controller used had a lack of corresponding research.With a change in the environmental parameters, the results could easily to lead to the failure of the separation effect.In the practical application of an SMB, it is often necessary to adjust it according to changes to the equipment and in the environment; thus, a more intelligent automatic control technology is needed.Compared with traditional nonlinear control methods such as feedback linearization, synovium, and pole placement, a fuzzy control based on fuzzy mathematics does not need extensive mechanism model knowledge; thus, the use of fuzzy control technology is extremely convenient and effective in mathematical processing, especially for nonlinear systems with complex structures.
In the face of highly sensitive SMB nonlinear systems, the simple use of fuzzy control technology cannot guarantee the robustness and adaptability of its control.The fuzzy controller depends on fuzzy application rules as well as the force size and other parameters.Similarly, if the controller parameters are not properly selected, it is easy to cause it to cross the feasible separation area of the SMB system in the control, resulting in pathological characteristics.In this paper, the authors propose a more effective type-II fuzzy controller.A type-II fuzzy control is based on type-II fuzzy sets, which provides the type-II fuzzy controller with more flexible attribution function values because the value of the type-II fuzzy function is also a fuzzy set.Thus, it makes the design of the type-II fuzzy inference more flexible; the error tolerance of the system also increases.Furthermore, the robustness and adaptability of the system control are also enhanced.The rest of the paper is organized as follows.Section 2 presents the mathematical model of the SMB.In Section 3, the Crank-Nicolson method used to numerate the PDEs is presented.Section 4 describes the setting of the simulation parameters.In Section 5, the type-II fuzzy controllers are designed to apply to the SMB system.Section 6 shows the experimental results.Section 7 is the conclusion.

SMB Mathematical Model
For an SMB, the balance between the mobile and solid phase is given by: The meaning of the variables is shown in Table 1.
Table 1.Meanings of the variables of the SMB system.
Parameter Nomenclature Comprehensive mass transfer constant of A k B (gL −1 ) Comprehensive mass transfer constant of B H Henry constant v * (cm min −1 ) Effect velocity of body u s (cm min −1)  Solid flow rate C(gL −1 ) Mobile phase concentration q(gL −1 ) Solid phase concentration q * (gL −1 ) Solid phase concentration at the equilibrium between the solid phase and mobile phase Q(cm From Equations ( 1) and (2), we obtained: The adsorption equilibrium of the two materials could be expressed by a linear isotherm: The purity formulas could be defined by: − C E,B represents the purity of material B from the extraction outlet, − C R,A represents the purity of material A from the raffinate outlet, represents the concentration of material B from the extraction outlet, and C E,B represents the concentration of material A from the raffinate outlet [23,24].
The fixed-value conditions of the SMB model were as follows: (a) (b) Endofcolumn : (c) Headofcolumn : D i x = L end and x = L 0 represented the boundaries of the fixed-value condition; that is, the conditions that needed to be met at the end and initial position of the column.

−
C ij sec t (t) was related to the zone where it was located.

Using the Crank-Nicolson Method to Numerate the PDEs
The Crank-Nicolson method was then used to establish the discrete dynamic system of the simulated moving bed so that the controller could be used as a real-time control.
We set t k = t 0 + ks, x l = x 0 + lh, F = 1−ε ε .It can get the equations as follow: C i,j (x l , t k ), denoted as C i,j (l, k) and substituted into the SMB system, could simplify the formula symbols as follows: (1 The initial conditions and boundary conditions also needed to be discretized as follows: Section 1 , first column : Section 3 , first column : Any other column : − C i,j sec t was the column inlet concentration with superscript sec t = I, I I, I I I, IV where C f was the feed stream concentration, C 0,i,j was the initial concentration, and l was the column length.From Equation ( 8), we obtained: From Equation (9), we could then obtain: We simplified it as: We then set M = v * s h , N = Ds h 2 to obtain the next two boundary equations: (1 (1 (1 This denoted the matrix: T Finally, we obtained the iterative equation:

Simulation Settings
In order to observe the operation of the SMB system, a 2-2-2-2 SMB model with 4 zones, as shown in Figure 1, was implemented.Each zone had two columns.The initial settings of all SMB parameters are shown in Table 2.In the simulation, the relationship between the flow rate, the velocity of the body v * j , and the volume flow rate Q j was expressed as Equation (15), where r was the radius of the column and ε was the bulk void fraction.The operational time step was set to be 0.1 s and the length of the string in the space was divided into 100 parts.

Simulation Settings
In order to observe the operation of the SMB system, a 2-2-2-2 SMB model with 4 zones, as shown in Figure 1, was implemented.Each zone had two columns.The initial settings of all SMB parameters are shown in Table 2.In the simulation, the relationship between the flow rate, the velocity of the body , and the volume flow rate was expressed as Equation (15), where was the radius of the column and was the bulk void fraction.The operational time step was set to be 0.1 s and the length of the string in the space was divided into 100 parts.
All calculations were conducted in MATLAB R2016a on a PC equipped with an Intel core i7-3770K with 3.53 GHz, 16 GB RAM, and running Windows 10.

Type-II Fuzzy Controller Design
In this research, a type-II fuzzy controller was designed to control the SMB system.A traditional fuzzy controller was also used as a comparison.In the fuzzy mechanism, the purity error (e(k)) and error change (∆e(k)) of materials B and A were used as the fuzzy inputs and defined as follows (C E,B and C R,A were the immediate concentrations of B and A sensed at the extraction and raffinate outlets, respectively): Processes 2022, 10, 2437 where e 1 (k) and ∆e 1 (k) were the inputs of the zone I controller, e 2 (k) and ∆e 2 (k) were the inputs of the zone II controller, and e 3 (k) and ∆e 3 (k) were the inputs of the zone III controller.
In the control process of the SMB, the flow rates of zone I (Q 1 ), zone II (Q 2 ), and zone III (Q 3 ) were controlled by three independent fuzzy controllers.The common structure of the fuzzy control process is shown in Figure 2.
e k e k e k     (30) In the control process of the SMB, the flow rates of zone I ( ), and zone III ( 3 Q ) were controlled by three independent fuzzy controllers.The common structure of the fuzzy control process is shown in Figure 2.For the traditional fuzzy controller, five linguistic variables-namely, NB, NS, ZE, PS, and PB-were defined for both e i (k) and ∆e i (k).NB represented a large negative force, NS represented a medium negative force, ZE represented no force, PS represented a medium positive force, and PB represented a large positive force.The triangular membership function and singleton membership function shown in Figures 3 and 4 were used as the fuzzifier and defuzzifier, respectively.The rule table for the three controllers is listed in Table 3.The singleton values [a 1 , a 2 , a 3 , a 4 , a 5 ] set for ∆Q i were ∆Q 1 = [−0.12,−0.08, 0, 0.08, 0.12], ∆Q  3 and 4 were used as the fuzzifier and defuzzifier, respectively.The rule table for the three controllers is listed in Table 3.The singleton values      3 and 4 were used as the fuzzifier and defuzzifier, respectively.The rule table for the three controllers is listed in Table 3.The singleton values      In the type-II fuzzy system, three linguistic variables-namely, NS, ZE, and PS-were defined for both e i (k) and ∆e i (k) (i = 1, 2, 3).The Gaussian membership function and singleton membership function shown in Figures 5 and 6 were used for the fuzzifier and defuzzifier, respectively.The rule table for the type-II controller is listed in Table 4 m ij represented the center value of the first-order membership function, σ1 ij represented the standard deviation value of the first-order membership function, and σ2 ij represented the standard deviation value of the second-order membership function where i was the ith rule and j was the jth input dimension.The center value of the second-order membership function was the output value of the first-order membership function; the formula was as follows: To obtain the firing strength of the type-II fuzzy rule, the α cut was used for cutting the first type of fuzzy set.The α cut formula was expressed as: where u 1 is the first-order membership function value.We set five α cut values-α= {1, 0.8, 0.6, 0.4, 0.2}-and defined Ã ij as the second type of fuzzy set, which was expressed as: where l ijα i , r ijα i was the cut set interval of the second-order membership function, l ijα i was the lower bound, and r ijα i was the upper bound.Different from a traditional fuzzy, a type-II fuzzy inference engine deals with the interval input.The firing strength of the j th rule could be obtained from the following equation: where vl jα i and vu jα i were the pure quantities that represented the lower and upper limits of the firing strength of the jth fuzzy rule in the α cut set.
In the next step, the type reducer function was used to reduce the output strength of the inference engine.The Karnik-Mendel (KM) algorithm was used to reduce the order of interval of the second type of fuzzy inference [25,26].The calculated formula was: where o o α i represented the output of the lower and upper limits of the KM algorithm, which could be calculated by using Equations ( 22) and (23).
where L and R were the values obtained from the KM algorithm iterations and o − kα and o − kα were the results sorted from small to large of vl jα i and vu jα i , which were based on c k .This was then one part of the fuzzy rules.The output of the defuzzifier was:

Experimental Results
The four experiments of the purity control of the SMB system using the type-II controller are presented in this section.In the first experiment, the switching time of the SMB was set to be 180 s.The desired control purity of material A was 94% and the purity of material B was 92%. Figure 7a,b present the control results of the type-II fuzzy controller.The actual control purity of A was 94.04% and the purity of B was 91.89%.In the second experiment, the switching time of the SMB was still 180 s, but the desired control purity of material A was 96% and the purity of material B was 94%. Figure 8a,b present the control results; the actual control purity of A was 96% and that of material B was 93.9%.In the third experiment, the switching time of the SMB was still 180 s, but the desired control purity of material A was 94% and the purity of material B was 96%.The control results are shown in Figure 9a,b.The actual control purity of A was 94%; that of material B was 95.97%.In the fourth experiment, the switching time of the SMB was set to be 178 s; the desired control purities of material A and material B were 93% and 95%, respectively.The control results are shown in Figure 10a,b.The actual control purity of A was 93%; that of material B was 94.95%.
In this study, a traditional fuzzy controller and PID controller were also implemented for the SMB control as a comparison.Figure 11 shows the performances from the traditional fuzzy controller, the PID controller, and the type-II fuzzy controller.In this implementation, the switch time was 180 s; the desired control purity of material A was 93% and the purity of material B was 95%. Figure 12 shows the control results of the three controllers for another implementation.In this implementation, the switch time was 178 s; the desired control purity of material A was 96% and the purity of material B was 94%.In this implementation, the switch time was 178 s; the desired control purity of material A was 94% and the purity of material B was 96%.From the results shown in Figures 11-13, it is clearly shown that there were steadystate errors and fluctuations in the purity of the extraction and raffinate materials controlled by the traditional fuzzy controller.However, the type-II controller had no steady-state errors and could maintain a steady state.For the PID controller, the control of the extraction outlet was relatively stable, but the purity of the raffinate outlet fluctuated too much.We then explored the stability of the three controllers.The control effects of the three controllers on the changes in the adsorbent parameters, feed concentration, and switching time were implemented and observed.Figures 14-19 show the separation results controlled by the three controllers.Each figure presents the results of five purity control experiments.The desired purity control of material A was 93%, 94%, 95%, 96%, and 97%; the desired purity control of material B was 92%, 93%, 94%, 95%, and 96%.
In the case of changing the adsorbent parameters (HA), it can be seen from Figure 14 that the traditional fuzzy controller not only had the problem of steady-state errors in the purity control of material B, but also had an oscillation phenomenon.However, the control effect of the type-II controller remained stable.For the purity of material A, the fluctuation of the traditional fuzzy controller was obviously larger than that of the type-II fuzzy controller.
In the case of changing the feed port concentration (Cf), the experimental results in Figure 15 show that the control performance of two controllers was similar to that in Figure 13.
In Figure 16, it can be observed that, under the change of switching time, the traditional fuzzy controller had ill-conditioned characteristics, but the type-II fuzzy controller was still very stable.
From the experimental results shown above, the type-II controller was very accurate in controlling the purity of the two outlets, with almost no steady-state errors.For the changes in the system parameters such as the adsorbent parameters, feed port concentration, and switching time, the type-II controller had excellent robustness and adaptability.In Figure 13, when the switching time parameter was 178 s, it can be seen that the traditional fuzzy controller had ill-conditioned characteristics whereas the control effect of the type-II controller was still robust.Surprisingly, the PID controller was also relatively stable.
We then explored the stability of the three controllers.The control effects of the three controllers on the changes in the adsorbent parameters, feed concentration, and switching time were implemented and observed.Figures 14-19 show the separation results controlled by the three controllers.Each figure presents the results of five purity control experiments.The desired purity control of material A was 93%, 94%, 95%, 96%, and 97%; the desired purity control of material B was 92%, 93%, 94%, 95%, and 96%.

Conclusions
In this paper, a type-II fuzzy controller in an SMB system control was presented.As mentioned above, the SMB is a chromatographic separation technique that is widely used in the manufacture of chemical and biopharmaceutical products.The SMB is a very complex system and there are too many parameters involved in its control process.If the optimized parameters are obtained through trial-and-error methods to control the SMB separation process, the cost is certainly very high and unfeasible.Even if the initial control parameters of the SMB are set based on a technician with full experience, the SMB control still cannot reach the best condition.
In our study, the type-II controller was very accurate in controlling the purity of the In the case of changing the adsorbent parameters (H A ), it can be seen from Figure 14 that the traditional fuzzy controller not only had the problem of steady-state errors in the purity control of material B, but also had an oscillation phenomenon.However, the control effect of the type-II controller remained stable.For the purity of material A, the fluctuation of the traditional fuzzy controller was obviously larger than that of the type-II fuzzy controller.
In the case of changing the feed port concentration (C f ), the experimental results in Figure 15 show that the control performance of two controllers was similar to that in Figure 13.
In Figure 16, it can be observed that, under the change of switching time, the traditional fuzzy controller had ill-conditioned characteristics, but the type-II fuzzy controller was still very stable.
From the experimental results shown above, the type-II controller was very accurate in controlling the purity of the two outlets, with almost no steady-state errors.For the changes in the system parameters such as the adsorbent parameters, feed port concentration, and switching time, the type-II controller had excellent robustness and adaptability.
Finally, we compared the disturbance of the PID and type-II controllers.Figures 17-19 show the separation results.Although the PID controller did not show any pathological characteristics under the disturbance of the adsorbent, feed inlet, and switching time parameters, the purity of the extraction port and raffinate port fluctuated too much and there was a relatively large amplitude of flutter, especially when the concentration of the feed inlet and switching time changed and the purity of the extraction port significantly vibrated.Type-II obviously showed good robustness and adaptability, which were the biggest advantages that the PID controller did not have.

Conclusions
In this paper, a type-II fuzzy controller in an SMB system control was presented.As mentioned above, the SMB is a chromatographic separation technique that is widely used in the manufacture of chemical and biopharmaceutical products.The SMB is a very complex system and there are too many parameters involved in its control process.If the optimized parameters are obtained through trial-and-error methods to control the SMB separation process, the cost is certainly very high and unfeasible.Even if the initial control parameters of the SMB are set based on a technician with full experience, the SMB control still cannot reach the best condition.
In our study, the type-II controller was very accurate in controlling the purity of the two outlets, with almost no steady-state errors.The system was robust and adaptable to changes in parameters such as the adsorbent, feed port concentration, and switching time parameters.Compared with the traditional fuzzy controller and PID controller, the type-II fuzzy controller was not only more accurate in the control, but also could reach a steady state in a shorter control time.Its robustness and adaptability to various parameter changes and disturbances were much superior to the traditional fuzzy controller.
Although the type-II fuzzy controller had a stronger fault tolerance, the model also had force parameters and mean and variance parameter matrices, which were bound to affect the final application effect.Therefore, if the learning ability could be improved on the basis of this to make it more adaptive and robust, it is undoubtedly of great significance for the control of SMB systems.The neural network has a super nonlinear learning ability.Building a type-II fuzzy neural network control method with an adaptive learning ability has great theoretical significance in promoting nontraditional affine nonlinear control systems and has a great application value in chemical process controls.
conducted in MATLAB R2016a on a PC equipped with an Intel core i7-3770K with 3.53 GHz, 16 GB RAM, and running Windows 10.
of the zone III controller.

Figure 2 .
Figure 2. The structure of the SMB control process.

Figure 2 .
Figure 2. The structure of the SMB control process.

Figure 3 .
Figure 3.The fuzzifier membership function of the traditional fuzzy controller ( ()

Figure 4 .
Figure 4.The defuzzifier membership function of the traditional fuzzy controller.

Figure 3 .
Figure 3.The fuzzifier membership function of the traditional fuzzy controller (e i (k) and ∆e i (k)).

Figure 3 .
Figure 3.The fuzzifier membership function of the traditional fuzzy controller ( ()

Figure 4 .
Figure 4.The defuzzifier membership function of the traditional fuzzy controller.

Figure 4 .
Figure 4.The defuzzifier membership function of the traditional fuzzy controller.

Figure 6 .
Figure 6.The defuzzifier membership function of the type-II controller.

Figure 5 . 19 Figure 5 .
Figure 5.The fuzzifier membership function of the type-II controller (e i (k) and ∆e i (k) ).

Figure 6 .
Figure 6.The defuzzifier membership function of the type-II controller.

Figure 6 .
Figure 6.The defuzzifier membership function of the type-II controller.

Table 2 .
The initial parameters for the separation.

Table 3 .
The rule table for the traditional fuzzy controller for (i = 1, 2, 3).i Q 

Table 3 .
The rule table for the traditional fuzzy controller for (i = 1, 2, 3).i Q 

Table 3 .
The rule table for the traditional fuzzy controller for ∆Q i (i = 1, 2, 3).

Table 4 .
Type-II fuzzy rule table for (i = 1, 2, 3).II fuzzy membership function, the center values and standard deviations were as follows: