Applicant hierarchical fuzzy controller for concentration control of simulated moving bed

Simulated moving bed (SMB) is a kind of continuous process which can increase the efficiency of adsorbents in the adsorbent bed. It contains several sectors of flow rate, the switching time of valves and many other possible influencing variables, moreover, these parameters are highly sensitive, so it is very difficult to achieve precise prediction and control. Model predictive control and PID controller are often used in industrial system. Model predictive control needs a lot of accurate industry experience data, and PID controller depends on the selection of control parameters. Therefore, SMB needs an intelligent controller to bypass those complex mechanisms and parameter adjustment processes. This paper we propose the hierarchical fuzzy controller fuzzy controller which is applied to the SMB system to observe the final concentration. Compared with the PID and MPC controller, it is found that the hierarchical fuzzy controller can control good without knowing the system parameters too accurately.

www.nature.com/scientificreports/ require a long time of training to converge, and the parameter changes may not be a slow process. An optimization strategy based on the improved moving asymptote algorithm is proposed by Yonghui Yang etc. 14 . The research shows that the optimized controller based on the improved moving asymptote method can dynamically control and optimize the process of the simulated moving bed, which is conducive to the design and operation of the simulated moving bed. In the practical application of SMB, Lucas et al. 15 predict the performance of the actual SMB unit by mathematical optimization method, and the separation purity of TIA and GCA reached 97%. In reference 16 , Wei et al. not only studied the separation purity, but also studied the separation efficiency, and proposed a two-step separation method of feeding, purification and recovery. Combined with crystallization operation, the purity was further improved to 97.8%, and the yield reached 95%. In 17 , Maruyama et al. proposed a new method called bypass simulation moving bed. It provides additional freedom and opportunities to improve productivity. All the application research is carried out for real substances, so it is not a common method. Kloppenburg et al. used a simple P controller and used the difference of UV spectrum waveform as the adjustment of real-time online SMB control parameters 18 . Bijan et al. proposed the design and optimal control of single column chromatographic process. The real-time online monitoring system detects the UV signal value, sends the signal value back to the system state estimator, generates the chromatographic separation process, sends out the best control signal, and controls the single column chromatographic tube, so as to achieve the best chromate-graphic control 19 . Based on the concept of optimal control, Toumi et al. designed a nonlinear model predictive controller 20 . Suvarov et al. applied self-adjusting control, which can adjust the spatial position of adsorption and desorption wave by adjusting the flow rate and switching period, and then adjust the purity and productivity of extraction liquid and extraction flow. This kind of model predictive control technology has been widely used in chemical engineering control 21 . In the simulation study, Juweon Lee proposed a new method. The controller can estimate the current process state under the competitive Langmuir isotherm, and find the best operation condition of "switch by switch" 22 . Based on the state space model, zheng yan etc. 23 find an effect method which is applied to SMB chromatographic separation process. It uses two space identification method including output error state space and subspace state space (N4SID) numerical algorithm to model the SMB separation process, and obtains the third-order and fourth-order state space production efficiency models of SMB separation process. Xie et al. 24 proposed an adjusted fuzzy controller to control the concentration of separation at the outlet. Compared with the traditional fuzzy controller, its fluctuation range is small, but the improvement is not obvious from the perspective of cost performance, but it increases the computational overhead. Other research can be found in [25][26][27][28][29][30][31][32][33][34][35][36] .
The operation of SMB is difficult to achieve "steady state", steady state of SMB refers to whether the average purity in a switching cycle is stable at a certain value. Here we study concentration control. The average concentration in a cycle cannot reach a steady state which is described in detail in Sect. 4.2. The goal of concentration control is to reduce the amplitude of oscillation. The main reasons are the combination of system components, mechanical control disturbances and adsorbents. Factors such as leveling and so on, the stability of separation of SMB system will be affected, and in serious cases, it will lead to bad production products, therefore, traditional SMB operations usually need to do some disposal to ensure the yield of products, such as reducing  www.nature.com/scientificreports/ some production capacity and increasing solvent consumption. Also, in SMB operation process, it is needed to predict the accurate physical parameters (for example like linear adsorption relationship) of the substances, so that the theory can be applied to delimit the separable area and carry out the separation work. However, SMB cannot guarantee the smooth implementation of accurate separation when the analysis of physical parameters of separated substances is not accurate enough.
Due to these problems of SMB system, we will encounter more troubles when we use the traditional PID controller. Column packing non-uniformity can cause pressure/flow-rate oscillations. Regardless of the tuning, traditional PID controller may either respond too aggressively and hence aggravate the oscillation, or too slowly to provide the best performance. Because of the switch time, step asymmetry can be problematic for modelbased controller. In Xylene purification process, such as the PAREX process, there are 24 columns, each is packed slightly different, and the 24 columns are arranged into two towers, two long transfer lines are used to connect the two towers, traditional model-based predictive controller often fail to deal with step asymmetry. Model predictive controller is always based on a fixed set of parameters, however, over time, resin degradation will kick in. Model predative controller needs to be tuned often to accommodate the decline of the stationary phase performance. Moreover, air bubbles can cause PID instruments to malfunction. For example, a lot of processes that uses Coriolis meters. Degassing of the liquid and cause the mass flow controller to generate unrealistic data. This problem is very hard to solve for traditional model-based controller or PID controller. Therefore, when the parameters of SMB system change, the fuzzy controller does not need to modify the corresponding parameters, which can maintain strong robustness. Moreover, SMB system needs a controller that does not pay so much attention to accurate control algorithm, but can make a good response to the system especially for the changes of switch time. For example, we don't need to know Newton's law of motion. Acrobats can still control the inverted bars accurately without falling down. Thirdly, in a particularly complex nonlinear system, the control of fuzzy controller can be smoother, so as to reduce the amplitude of oscillation. The fuzzy controller based on fuzzy mathematics has these advantages; this is the starting point of using fuzzy controller to study SMB. So, in this paper, a hierarchical fuzzy controller is proposed to control the separation concentration in the production process. Figure 2 shows the overall architecture of the paper. Firstly, through the digitized SMB process, we can observe whether the results obtained by using the finite element method are consistent. Then we can dynamically adjust the parameters in the process and observe the influence of the change of parameters on the final separation results. Third, it can control the parameter adjustment through the fuzzy rule multilevel hierarchy controller. Lastly, it compares with the PD and PID controller to observing whether the control effect is more advantageous.

Related mathematical model and method
An overview of SMB dynamic model is given, which is mentioned in literature and the relevant symbols are described in Table 1. For TMB, the mass balance of bulk phase is: So, TMB and SMB can be transformed to each other as follows:  (3), it gets as follows: The adsorption equilibrium of the two enantiomers is expressed by linear isotherms.
The flow velocity in each region must satisfy the following conditions: Q d , Q x , Q r and Q f are respectively the solvent, extract , raffinate and feed stream flow rates, also they can be selected as controllable variables.
Using centered difference method to numerate PDEs. Since the mathematical model of SMB system are essentially diffusion equations, for this type, we use the centralized difference method because of its better stability and convergence, then using it to generate the iterative calculation formula of SMB discrete dynamic system.
M, N represent respectively number of material and zones, here, M = 2, N = 8, t is time, x is coordinate of the column, s is time step, h is space step. Substituted into SMB system, C ij (x l , t k ) denote as C ij (l, k) we can get:

Boundary numerate condition. With boundary condition is:
C 0ij represents the initial concentration distribution inside the columns at t = 0.In formula (14) and (15), l s and 0 represent respectively of end and initial position of column. In a simulated moving bed arrangement, the where C f the feed stream concentration and Q is the flow rate in each section, use formula (8-10), can get the boundary numerate condition: w is the end of column. From formula (11), set m = vs h , n = Ds h 2 ,substitute the Eq. (17) and (18) into formula (12), we get the next two boundary equation: denote the matric So the Iterative equation is: www.nature.com/scientificreports/ For the discretization of linear isotherm, it can be proved that its discretization truncation error is O(�x 2 ) + O(�t 2 ) . Similarly, for the linear isotherm, it can be proved that as long as the iterative step is small enough, its spectral radius is less than 1, it means ρ(A −1 B) < 1 , that is, the iteration is stable.

Simulation
The initial parameter setting and simulation process. The simulated digitization system contains 8 packed columns which was 2-2-2-2 model, that is, each zone has two columns. Using finite difference method to solve the PDEs, setting the time step is 0.1 s, and the length of the string in space is divided into 100 parts. The initial parameters was shown in Table 2.
All the digitization calculations were conducted in MATLAB (Version R2016a 9.0.0.341360, 64bit Win 64, and available from https:// www. mathw orks. com) on a PC equipped with Intel core i7-3770 K 3.53 GHz and 16 GB RAM running Windows 10. The simulation result show in Fig. 3.
From the Fig. 3, the results show that the forward difference method is used to digitize the SMB process; the data graph obtained is similar to that simulated by traditional SMB software. Now SMB simulation software is based on finite method, which shows that the digitalization process is effective, and the digitalization result is controllable for the intermediate process, which is different from the traditional finite difference method. For www.nature.com/scientificreports/ the SMB software mentioned in this paper, it is just to explain that different separated substances use different software in the market, there is no unified available software, and their software is not used in this paper.

Sensitivity analysis of the parameters of the SMB process.
The following figure shows that changes in SMB parameters affect the final equilibrium concentration, and were drawled in MATLAB (Version R2016a 9.0.0.341360, 64bit Win 64, and available from https:// www. mathw orks. com). Now we consider the parameter how to affect the system's concentration and sensibility. In the Fig. 4, switch time change from 186 to 195. Then the switching time has severe effect on SMB process, it affects not only the success of the final separation process, but also affects the final concentration of separation and the time when the separation reaches steady state. When the switching time is short, two substances could not be successfully separated, the separation concentration is not large enough, but it can reach steady state time quickly. With the increase of switching time, the separation gradually succeeds, and the concentration of separation is large enough, but the steady-state time to be achieved also increases.
In the Fig. 5, Q I change from 6.8 to 7.7, when the concentration of extract about material B is decreases with the increase of the zone1 flow rate, but The concentration of raffinate about material A is almost unchanged. www.nature.com/scientificreports/ Q II change from 6.36 to 6.76, when Q I = 6.8, Q III = 8.4, Q IV = 2. The concentration of extract about material B is almost unchanged ,but material A is increases with the increase of zone2 flow rate. In the Fig. 6 of left, Q II change from 7 to 7.9, when Q I = 6.8, Q II = 6.7, Q IV = 2. The concentration of extract about material B is decreases with the increase of the zone3 flow rate, and the concentration of raffinate about material A is also increased. In the Fig. 6 of right, Q III change from 8 to 8.8, when Q I = 6.8, Q II = 6.7, Q IV = 2. The concentration of extract about material B is slight increases with the increase of the Zone3 flow rate, and the concentration of raffinate about material A is also slight increased.
In the Fig. 7, Q IV change from 2 to 4, when Q I = 6.8, Q II = 6.7, Q III = 8.4. The concentration of extract about material B is almost unchanged, and the concentration of raffinate about material A is also almost unchanged.

Hierarchical Fuzzy controls
Fuzzy rule and controller structure. In the hierarchical fuzzy control, the input variables contain error, first-order error difference, the formula is as follows:   www.nature.com/scientificreports/ C E,B represents extract material B of concentration, and C R,A represents raffinate material A of concentration. Desired B represents the control goal of concentration of B at the extract port, and Desired A represents the control goal of concentration of A at the raffinate port. Next, the input variables need to be fuzzier. The fuzzy system defines five linguistic variable values on errors: NB, NS, ZE, PS, PB and five linguistic for the first order difference of errors: NB, NS, ZE, PS, PB. All membership functions are triangular function, because it belongs to linearity, unlike the long tail of Gauss function, the membership function shown in Fig. 8.
Then defines the output control parameter flow rate Q I , Q II , Q III during the SMB operation process, three independent fuzzy controllers act on three regions, for the input of the third region, we use the weighted average of the input errors of the first region and the second region, taking the single pole fuzzification value where the center value is ( Next, we draw on the principle of kinematics to formulate the corresponding fuzzy rule as Table 3. For the force direction of Q , according to the sensitivity analysis of regional velocity, the increase of regional velocity plays the role of negative force, that is, pulling force, and the decrease of regional velocity plays the role of pushing force. Of course, these analyses are effective in a local analysis interval.
Mamdani operator, basic complementary operation and Mamdani fuzzy reasoning rule are used in the preceding part of reasoning 37 .
The last step is to defuzzifier, here, we choose the central weighted average method to defuzzifier. From the fuzzy rule base and the membership function of the input variables, we can see that each input will start four rules, and the strength of these four rules, that is, the weight is calculated by the T-norm of the if part. The formulas are shown in (27)  www.nature.com/scientificreports/ u 1 , u 2 are the error values after fuzzification, u 3 , u 4 are the first-order differences after fuzzification, and y 1 . . . y 4 corresponds to the unipolar values of the four starting rules, that is the unipolar values of the Then part. T is the product type T-norm, and the final output is U.
The control structure is shown in Fig. 9. Then we use the controller to control the concentration of material.
In the control process, we need to set an observer. If the output force according to the error input of each order violates the restriction of formula (7), the force adjustment will be cancelled.

Concentration control result.
The following figures show the control results of extract and raffinate port.
As can be seen from Fig. 10, the two materials oscillate back and forth periodically in the center of the target concentration, because the switch time itself is outside the control system. Even if it is included in the system, oscillation cannot be eliminated, because the concentration will change periodically when the SMB reaches a stable state.
In order to better understand the change trend, the data are processed by periodic average: is the concentration of material A at the raffinate port at time t, the simulation result is shown below. It can be seen from Figs. 11 and 12 that the hierarchical fuzzy control can achieve good effect under different concentrations and switching times, but it cannot remove the fluctuation near the target value. Because the change of material concentration will re-enter a cycle every time, and volatility cannot be eliminated within the system. However, it is necessary to compare the hierarchical fuzzy controller with other controllers to determine whether the fuzzy controller has better performance. www.nature.com/scientificreports/ Controller comparison. In this part, we compare the hierarchical fuzzy controller with PD and PID controller, the results shown in the follow figures: From Fig. 13, it can be seen that the parameter adjustment of PD and PID controllers can't achieve the perfect control of two outlets at the same time. Either the E outlet effect is good or the R outlet effect is good. When compared with the hierarchical fuzzy controller, the study chooses two parameters with moderate effect as comparison.
From Figs. 14, 15, 16 and 17, it can be seen that in some cases, PD or PID may be better, but overall, PD and PID can't adapt to the control of different concentrations, in practice, it is impossible to control a concentration to readjust a parameter, and PD and PID can't achieve very good control of the concentration of both substances. On the contrary, the performance of the hierarchical fuzzy controller is very stable. Regardless of the concentration of the control, the control of both substances achieves good results at the same time, and the time for the hierarchical fuzzy controller to reach steady state is a little shorter.
As can be seen from Fig. 18, the change of feed inlet concentration has no impact on the concentration control of extract outlet material B, but the concentration fluctuation of raffinate outlet material A becomes larger. Compared with PD and PID controllers, the fluctuation of hierarchical fuzzy controller is smaller and more robust.
It can be seen from Fig. 19 that the change of switching time has a great impact on the hierarchical fuzzy controller, PD and PID controller. Although the fuzzy controller enters a stable state faster, the oscillation amplitude www.nature.com/scientificreports/ becomes large, which has no advantage over Pd and PID controllers. For the parameter of switching time, the controller needs to be further improved to obtain better performance.

Conclusion
In this paper, the SMB process is digitalized by using centered difference method, in this way, the concentration data of materials changing with time and space can be generated, and the data trend charts with different parameters can be obtained. Through observation, it is found that different parameters do affect the concentration of separation, which brings great value to practical application. Using hierarchical fuzzy controller, research found that in the case of successful separation, controlling the concentration of material can achieve good results, but the switching time is outside the control system, it can't fundamentally eliminate the fluctuation of concentration around the target value, no matter how to adjust the switching time can't be achieved, because the existence of switching time is to ensure the material content condition for separation. Finally, through the comparison of three kinds of controllers, it is found that the hierarchical fuzzy controller can control good without knowing the system parameters too accurately and full understanding of the mechanism model of the system. In addition, the performance of the fuzzy controller is more stable when the feed inlet concentration changes, but for the change of switching time, the fuzzy controller has no advantage, and there is a disadvantage of using fuzzy controller in SMB system; we need to find a monotone interval of the change of control parameters to the change of target solubility. Unfortunately, the control region used in the study is a local region, and the control analysis of control variables in the global feasible region can't be realized. The future research direction is to use artificial intelligence reinforcement learning to predict the global feasible region. www.nature.com/scientificreports/