Design of an intelligent controller for a grain dryer: A support vector machines for regression inverse model proportional–integral–derivative controller

Abstract Grain drying control is a challenging task owing to the complex heat and mass exchange process. To precisely control the outlet grain moisture content (MC) of a continuous mixed‐flow grain dryer, in this paper, we proposed a genetically optimized inverse model proportional–integral–derivative (PID) controller based on support vector machines for regression algorithm which is named the GO‐SVR‐IMCPID controller. The structure of the GO‐SVR‐IMCPID controller consists of a genetic optimization algorithm, an indirect inverse model predictive controller, and a PID controller. In addition, to verify the control performances of the proposed controller in the simulation study, we have established a nonlinear mathematical model for the mixed‐flow grain dryer to represent the nonlinear grain drying process. Finally, the control performance and the robustness of the GO‐SVR‐IMCPID controller were simulated and compared with the other controllers. By the simulation results, it is shown that this proposed algorithm can track the target value precisely and has fewer steady errors and strong ability of anti‐interference. Furthermore, it has further confirmed the superiority of the proposed grain drying controller by comparing it with the other controllers.


| INTRODUC TI ON
Studying the grain drying control is significant Dai, Zhou, Liu, Liu, & Zhang, 2017, 2018Liu & Bakker-Arkema, 2001;Mujumdar, 1995).Grain drying control is a challenging task owing to the complex heat and mass exchange process. It is such a long-delay nonlinear process subjected to various affection factors that an accurate mathematical model is difficult to make. Hence, the classical traditional controllers have some limitations in the control of grain drying and effective control strategies need to be further researched on.
Traditional control methods mainly include feedback control, forward control, forward feedback control, and other classical traditional control methods. These methods are usually designed based on linear transfer function and cannot deal with the changes of complex nonlinear system. Some scholars have studied the limitations of traditional control algorithms in the grain drying control Liu & Bakker-Arkema, 2001). Proportional-integral-derivative (PID) controller is successfully applied in the classic automatic control, but the control effect of which in the grain drying is not satisfactory because the controlled drying object and the environment are uncertain, and it cannot satisfy the control requirement of grain drying with stricter restriction on drying control performance (Lutfy, Selamat, & Noor, 2015). Model predictive control (MPC) is effective for the long-delay nonlinear control system. Liu et al. have presented a MPC which was especially designed to control a cross-flow dryer. Field testing and simulation both showed the MPC performed excellence in accuracy, stability, and robustness Liu & Bakker-Arkema, 2001). However, the traditional MPC still depends on the system model, which is usually simplified on the basis of some assumptions. When using these models for control purposes, these simplifications will affect the control accuracy to a certain extent. The partial differential equations (PDE) of grain drying have good universality and wide application, but they are too complex to be used to carry out the real control because it will take more computing time to solve the complex equations and boundary conditions (Lutfy et al., 2015). Aiming at the difficulty of modeling the complex grain drying process, intelligent identification methods such as Fuzzy logic (FL) algorithms methods or artificial neural network (ANN) are best adopted to approximate the nonlinear relationship, which can be used to construct controllers by combining MPC control, adaptive control, sliding mode control, backstepping control, and evolutionary algorithms (EA) or their combinations (Wang, Sun, & Liu, 2017).
Artificial neural network has a wide range of applications in drying control, which is an excellent tool to model complex, dynamic, highly nonlinear, unclear scientific and engineering problems (Aghbashlo, Hosseinpour, & Mujumdar, 2015;Çakmak & Yıldız, 2011;Dai et al., , 2018Farkas, Remenyi, & Biro, 2000;Li & Chen, 2019;Li, Xiong, Wang, & Shi, 2016;Movagharnejad & Nikzad, 2007;Tsai & Luo, 2017). Besides ANN, support vector machines (SVM) for regression is also a promising approach to model the grain drying, which is superior to ANN, including generalization ability, ease of training, a mechanism to model structured data, and, most importantly, the generation of a unique solution (Hou & Zou, 2016), However, ANNs are confronted with the problems of trapping local minima, slow learning, and metaparameter adjustment (Patil & Deka, 2016). Furthermore, compared with the traditional learning method based on large samples, SVM is more suitable for learning based on small samples (Colman, Waegeman, & Baets, 2015), so modeling the complex system with its excellent approximation ability would be a better way. Now, there are some relevant control literatures that use support vectors in control approximation (Chakrabarty, Buzzard, & Zak, 2017;Chakrabarty et al., 2017;Wei et al., 2017). However, there is not much research on SVM control of grain dryer in the literature.
The support vector machines for regression (SVR) control methods mainly include the inverse model control of SVR, the internal model control of SVR, and the SVR optimal control. In another study Dai et al., , 2018, we have designed a genetically optimized internal model PID predictive controller (GO-SVR-IMPC) which has proved to be effective in controlling the grain drying process. To further study the SVR controller for the grain dryer, in this paper, we proposed a SVR indirect inverse model controller and compared it with different controllers including the previously designed GO-SVR-IMPC controller.
The inverse model controller of SVR (SVR-IMC) is an effective open-loop control method, which is based on the inverse dynamic theory. A pseudolinear system is formed by connecting the indirect inverse model and the controlled object in series, and thus, a nonlinear controller can be further designed using the linear control theory.
Because the open-loop control structure of SVR-IMC cannot handle the effect of the external disturbances, it is often improved by combining the other methods to form a closed-loop control structure in actual control, of which the most effective improvement method is to introduce feedback control to form a closed-loop system. In this paper, a genetically optimized PID feedback controller based on a support vector inverse model algorithm (GO-SVR-IMCPID) for a field mixed-flow grain dryer is investigated to improve the control deficiency of direct inverse model controller.
This paper's contributions are as follows: In view of the modeling advantage of SVR that would be better on dealing with the highly nonlinear process of engineering based on small samples, a SVR-IMC is designed, which is a simple and an effective open-loop control method; and then, a genetically optimized PID feedback control algorithm is introduced to the SVR-IMC to form a closed-loop controller, and the controller performance is optimized by establishing a performance objective function of the grain drying control from decreasing the energy consumption and improving the dried grain quality; finally, the effectiveness of the GO-SVR-IMCPID has been verified in the control simulations by using a nonlinear mathematical drying model to represent the practical mixed-flow drying process.
The simulations and comparisons of the control performance have proved the superiority of the controller designed in this paper. It is a better choice to control the complex grain drying process.
The rest of this article is arranged as follows: A novel grain drying system and the proposed mathematical model for the mixed-flow grain drying process are given in Section 2. In the third section, a genetic optimization inverse model PID controller based on SVR is proposed to control our designed grain drying system. Section 4 introduces and analyses the results of the control simulations and control performance comparison. Finally, the work has been concluded in Section 5. Figure 1a shows the designed combined multifunctional grain drying system. It mainly consists of a wet grain bin for storing wet grains, a 5HSHF10 dryer for heating and drying grains, and a dried bin for storing dried grains. The other part is composed of five belt conveyors, three bucket elevators, etc. The 5HSHF10-type grain dryer is shown in Figure 2, and its specific parameters can refer to Table 1. Figure 1b shows the 5HSHF10-type dryer whose shape is rectangular and shape size is 4.75 m high, 2.06 m long (thick), and 1.3 m deep Dai et al., , 2018. The convection section of the grain dryer is a combination design, and there are three kinds of drying technique to choose by replacing the drying section. In this paper, we mainly discuss the control of the continuous mixed-flow grain drying process. The process of the continuous mixed-flow drying technology is as follows: the wet grains flow into the dryer from the top of the dryer and then pass through the mixed-flow drying section with hot air angle box, the radiation section, and the discharging grain section in sequence. Finally, according to the set grain flow rate, the final grain moisture content (MC) value is determined by the outlet grain MC of the dryer, which is evacuated from the bottom of the mixed-flow drying section at discrete variable time intervals. As shown in Figure 2, hot air angle box can be input and output flow arrangement alternately and the drying hot air is blown into the dryer from the inlet angle box and blown out from the outlet angle box. Because the wind in the dryer has the direction of concurrent-flow, counter-current, and cross-flow, it is named mixed-flow drying technology. Because of its continuous mixed-flow effect, it will produce a good dried grain quality.

| Experimental system
In the grain drying engineering, the discharging grain speed is usually manually operated by a technical worker with a long-term drying experience, which is a time-consuming and energy-consuming job. To effectively control the dryer, an intelligent control algorithm is designed and simulated to automatically control the discharging grain speed in this paper. The controlled variable is the average outlet grain MC which is on-line measured by a capacitive sensor, the control variable is the grain flow rate between two sampling intervals, and other affection factors are assumed as the disturbance signals. In addition, energy consumptions and dried grain quality have been also considered in this controller design.

| The mathematical model of the dryer
A mathematical model for the mixed-flow drying process has been designed and introduced in detail in our previously published research paper Dai et al., , 2018. As shown in Figure 3, in the continuous mixed-flow grain dryer model, the grain column is divided into a series of thin layers and the drying time is divided into a series of intervals, wherein the drying section is divided into n beds, the cooling section is divided into k beds, and the height ∆Y shown in Figure 2 is very small, so the variation of air temperature and humidity in the Y direction of the element can be neglected. The ∆Y is equal to 0.1 m; according to the size of the novel dryer, n and k are equal to 20 and 30, respectively. The mixedflow dryer model is the collection of n-column thin bed element models of the drying section in the grain dryer.
The calculation steps of the dryer model are as follows: step 1: In the drying section with n thin layers, the drying airflows through each layer in turn, we can use the existing thin bed element equation to calculate the next thin bed element equation; thus, at the ∆t time interval, F I G U R E 1 (a) The structure diagram: the mechanical system of the grain drying system. (1, 4, and 8: bucket elevators; 2: wet grain bin; 3, 5, 6, 9, and 11: belt conveyors; 7: dried grain bin; 10: dryer; 12: storage section; 13: convection section; 14: radiation section; 16: the inlet wind angle box; 17: the outlet wind angle box; 18: combustion chamber; 19: grain discharging wheel; 20: the waste gas room.) (b) The structure diagram: the 5HSHF10-type grain dryer In (1), assuming that the heating of grain can be neglected, the drying process is regarded as an iso-enthalpy process, and the initial drying parameters are shown in Table 1. M j−1 : MC of the (j − 1)th thin bed element, M j : the MC of the jth thin bed element.
where The grain flow rate V g 4,300 kg (wet matter) hr −1 m −2 TA B L E 1 Parameters and expression of grain in the simulation experiment

F I G U R E 4 The calculation model at the next ∆t time interval
By taking the outlet MC of the (j − 1)th thin bed element M j−1 as the initial MC of the jth thin bed element, the MC change of the j th element can be calculated according to the above Equation (1). By using the Equation (1) n times, the whole grain moisture distribution of the drying section can be obtained.
The above continuous drying model of the grain dryer was simulated in MATLAB. Figure 5a shows that different grain flow rates affect the MC distribution of grain, and the faster the grain flow rate is, the higher the grain MC of the same bed element at the drying section is. Figure 5b shows that the lower the hot air temperature is, the higher the grain MC of the same bed element at the drying section is. In real grain drying control, the hot air temperature is usually set to a constant, the target value of the outlet grain MC will be obtained by controlling the discharging grain flow rate of the dryer.
As shown in Figure 6, the comparison with the field batch circulating drying experiment results depicts that the model has achieved a better modeling accuracy and more information about this model can refer to the literature Dai et al., , 2018. Hence, the designed dryer model can be used to verify the feasibility of the designed controller of this paper.

| DE S I G N OF THE G O -S VR-IM CPID CONTROLLER FOR THE G R AIN DRYING S YS TEM
This part mainly introduces the inverse model control theory based on SVR. The basic idea of IMC-SVR is to design an inverse model of the controlled drying process, and the feasibility of this method depends on the accuracy of the inverse model to a great extent.
Compared with the ANN methods, SVR shows obvious superiority in this respect. So the SVR modeling method is introduced to design an inverse model for the controlled system to implement the identity map between the desired output of the system and the actual output.  Schölkopf, 2004). It can map the input space to a high-dimensional feature space by using a kernel function and performs well for regression problems. The complexity of computation depends on the number of support vectors rather than the dimension of the sample space, which avoids the curse of dimensionality in some sense.

| Principle of SVR
Suppose a set of training data is given as where x i is the input and y i is the target output, the purpose of regression with SVR is to find a function f(x) to fit all the sampling data, as shown in (2), which is close to the target value y i . The optimal hyperplane that SVR seeks is not to divide the two classes to the most extent, but to minimize the total variance of the sample point from the hyperplane.
Among them, ϕ(x) is the mapping form of vector x, which maps vector x to the high-dimensional Euclidean space of X = ϕ(x). w ∈  n and b ∈  are the model parameters to be determined.
The ε-SVR method uses an insensitive loss function which has at most ε deviation from the actually obtained targets y i for all training data. This is equivalent to build a width zone of 2ε of the interval by taking f(x) as the center. It is considered that the prediction values that fall into the interval band are correct. Thus, the SVR primal problem can be formalized as (3): where is the penalty factor on samples out of error-ε, and the function of ε-insensitive loss is shown in (4): The kernel function technology is adopted in the SVR model shown in (5).
where j = α * j −α j 0 ≤ α j ,α * j ≤ , j is the weight coefficient of the support vector, x j is the support vector, and n is the number of support vectors.
The result is equivalent that the kernel function K(x, x j ) enable operations to be performed in the input space rather than in the high-dimensional feature space.
In this paper, the radial basis function (RBF) is adopted as the kernel function which has fewer required parameters and can handle the nonlinear relationship well shown in (6).
From the above analysis, it can be seen that three parameters: , , and need to be first determined in the SVR model.

| Design of the inverse model controller based on SVR (IMC-SVR)
The inverse model controller can be realized by combining the trained SVR inverse model with the controlled object. The inverse model controller structure based on SVR is shown in Figure 7 (when α = 1), where y is the output of the controlled object, u 1 is the predicted output of the SVR inverse model g svr , and r is the target signal.
The output expression of the SVR inverse model is shown in (7): The actual output of the controlled drying system is as follows: As seen from Figure 7, the SVR inverse model is directly con- The open-loop control system cannot handle the effect of the external disturbances; therefore, the dynamic performance and robustness of the direct inverse model controller need to be further improved. In actual control, the most effectively improvement The sampling event (k) The output of the field drying experiment The simulation output after adding a noise signal method is to design a closed-loop system by introducing the feedback control.

| Design and optimization of the GO-SVR-IMCPID controller
Aiming at the shortage of the direct inverse model controller, in this section, the PID control is added to the SVR inverse model controller is called for short GO-SVR-IMCPID in this paper, of which the structure is shown in Figure 8, where u 1 is the output of the SVR inverse model g svr , u PID is the output of the PID controller, u is the superposition of u 1 and u PID , and e is the error between y and r.
When k ≥ m + 1, the output of the PID controller is shown in (9): where The control input of the controlled object is shown in (12): The output of the controlled object is shown in (13):

| Parameter optimization of the GO-SVR-IMCPID controller based on genetic algorithm
Genetic algorithm (GA) is an efficient stochastic search algorithm for solving optimization problems in artificial intelligence. It mimics the process of biological evolution by the processes of selection, crossover, and mutation, and is used to search the optimal solutions with the minimum fitness function value in the population of each iteration.
In this design, the PID parameters kp, ki, and kd are optimized to improve the control process by using the GA, of which the ranges are within [−10 10]. The performance objective function of grain drying is the minimum of the function J, which is established from the two Genetic optimization algorithm Energy loss function aspects of decreasing the efficient energy consumption and improving the dried grain quality shown in (14): where e means the input error; N is the total sampling event number; t r means the rising time; w 1 , w 2 , w 3 , w 4 , and w 5 are the weights; u means the output of the controller; y(k) is the output of the controlled system and the output error erry(k)= y (k) − y(k − 1); E is the total energy consumption of all sampling events shown in (15); the penalty function is used to avoid overshoot (w 5 » w 1 ); and is the size of the overshoot to be controlled.
In (15), M k is the average outlet grain MC of the kth sampling event of the drying section, decimal (wet basis, wb); M i is the average inlet grain MC of the drying section, decimal (wb).
In addition, the initial optimal parameter values by the GA are as follows: the generations of evolution: 60; the population size: 10; the individual number: 3; and the probability of selection, crossover, and mutation are respectively 0.9, 0.6, and 0.01. Figure 9 shows the fitness curve of simulation. After 60 generations of iteration, the optimal value of J is equal to 47.6, and the optimal parameters are equal to −5.0769, −9.9255, and −0.7240, respectively.

| Simulation experiment initialization
In simulation, assuming the model errors are zero, the continuous mixed-flow drying model based on the Equation (1) is used to verify the effectiveness of the designed controller. The discharging grain flow rate of the dryer is taken as the control variable, and the outlet grain moisture of the drying section is taken as the controlled variable. In a certain time and drying condition, the hot air temperature, the airflow, and the initial grain temperature and moisture are not changed basically, so the variations of which can be regarded as the interferences in the control of grain dryer.
In this paper, we adopted the ε-SVR type as the inverse model of which the parameter values δ and ε are respectively 1,200 and 0.001, the width parameter γ of the adopted RBF function is equal to 2, and the simulation time is 200 sampling events. The ε-SVR inverse model is trained with the training sample D 2 which is obtained by the identification experiment. The constructed sampling data structure is as follows:

| Modeling and generalization experiment of the inverse model based on SVR
In the identification experiment, the random noise input signal order of magnitude, which shows that the SVR inverse model has a higher accuracy (RMSE: 0.038; R: 99.5%).

| The simulation results of the tracking control
In the tracking control simulation, the sample number is 600, the initial grain moisture is 23% (wb), the temperature of the hot air is equal to 100°C, and the tracked input signals are respectively the step signal with a magnitude of 15% imitating the final controlled outlet MC value, the sinusoidal signal, the sawtooth signal, and the square wave signal.
In addition, the initial grain flow rate is set to 3,000 kg hr −1 m 2 , and the grain flow rate is controlled by the proposed controller at the sampling event which is equal to the dwell time in a bed element. The controlled object is the outlet grain MC of the drying section. According to the drying model simulation experiment based on the Equation (1), the drying section is supposed to be equal to 20 bed elements. By connecting the established inverse model with the original controlled system in series and combining with the genetically optimized PID output feedback The fitness curve of simulation in every generation controller, the simulations of tracking control in the various input signal have been tested shown in Figure 11.
As seen from Figure

| The anti-interference test results
To access the anti-interference control performance of the proposed controller, we adopted two-step disturbance signals imitating sudden changes in the outlet grain MC caused by the effect of the in-

| The robustness test results
To evaluate the robustness of the proposed controller when the system parameters were changed, two robustness tests were carried out, one of which was to study the response ability of the  The first robustness test analysis is as follows: It can be seen from Figure 13b that the GO-SVR-IMCPID controller can make an immediate response to the change of the hot air temperature to counteract the disturbance effect by increasing the grain flow rate after the 200th sampling event and by decreasing the grain flow rate after the 400th sampling event. As shown in Figure 13c, the outlet grain MC can be rapidly adjusted to the steady target value again when the hot air temperature changes. As seen from Figure 13d, the GO-SVR-IMCPID controller performs best with a rapid response speed, smaller overshoot, and good robustness performance among the compared three controllers; however, for the same robustness test, the GO-SVR-IMC controller cannot respond to adjust the system output to the target value when the hot air temperature is changed; although the PID controller manages to handle the first variation of the hot drying air after the 200th sampling event, it cannot resist the effect of the second change of hot drying air, showing an undesirable oscillatory behavior after the 400th sampling event. Figure 13e compares the output of the grain flow rate generated by the three controllers, which shows that the control signal of the GO-SVR-IMCPID can be adjusted to realize the tracking control of the target value with the change of the hot air temperature; however, the control signal of the GO-SVR-IMC controller has no response to the variation of the hot air temperature, and the control signal of the PID controller shows an oscillatory behavior in the second variation of the hot air temperature.
The second robustness test is as follows: As seen in Figure 14a In addition, from the simulation results of Figures 12-14, it can also be seen that the PID controller has a larger overshoot in tracking the target value than the GO-SVR-IMCPID controller at the beginning of the target signal.

| Comparison with the previously designed GO-SVR-IMPC controller
The tracking control and the robustness test performances with GO-SVR-IMPC previously designed in another paper (Dai et al.,  GO-SVR-IIMCPID controller is equal to 46.7, which is 18.8% smaller than that of GO-SVR-IMPC controller, which is equal to 57.5.
In all, in this study, the effectiveness of the GO-SVR-IMC controller in controlling the complex grain drying process has been demonstrated by the tracking control, the antidisturbance test, two robustness tests, and the control performance comparison with the other compared controllers.

| CON CLUS ION
In this paper, an intelligent controller (GO-SVR-IMCPID) based on SVM modeling method for a grain dryer is proposed. It combines in- China, and the kindly work of the respected reviewers and editors on the paper.

CO N FLI C T O F I NTE R E S T
The authors declare that there is no conflict of interest in this paper.

E TH I C A L A PPROVA L
All authors have made equally substantial contributions to the writing of the paper and will be jointly and severally liable for the contents of the manuscript. The authors declare that there is no conflict of interest in this paper. Human and animal study is unnecessary to our study; thus, no ethical approval and patient consent are required.

DATA AVA I L A B I L I T Y S TAT E M E N T
The mathematical model identification data are collected from the practical drying experiment, and the control experimental result dataset was analyzed in the study based on the drying model (1)