# Model Predictive Control of the Grain Drying Process

Authors: Feng Han; Chuncheng Zuo; Wenfu Wu; Junxing Li; Zhe Liu
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

Drying plays an important role in the postharvesting process of grain. To ensure the quality of the dried grain and improve the intelligent level in drying process, a digital simulation of corn drying machine system based on a virtual instrument was established for 5HSZ dryer, automatically control the air temperature, and predict the discharging speed of grain and so forth. Finally, an online measurement and automated control software of grain parameters were developed to provide the changes of moisture, temperature, humidity, and germination rate in the process of drying. The study carried out in the actual processing showed that it can meet the requirements of the actual drying operation, effectively control the stability of the grain moisture, and keep the dry food quality.


---

## Body

## 1. Introduction

The final purpose of grain drying is to keep grains quality and to make them reach safe moisture content so that they can storage safely and process further. In the drying process, grain moisture content and grain quality are related to the selection of parameters such as initial moisture content, hot air temperature and grain discharge rate. In grain storage of China, especially some small grain storage, grain drying still adopts manual control method; that is, the grain moisture is obtained through the oven-drying method, and then depends on the measurement values to adjust the speed of the discharge grain manually. The control process has long-time delay and poor stability, so the quality of the grain cannot be ensured. The research of the mathematical model of drying process has become an important means of studying grain drying process control at home and abroad [1–3]. In this paper, a simulation and control system, using LabVIEW, a graphical programming language, was built for a small modular crossflow dryer to predict the parameter changes in drying process and to control the parameters. The system adjusts control parameters by predicted results. Its objective is to achieve automatic control during the drying process, ensure the accuracy and uniformity of the grain moisture content, improve the relative germination rate after drying, and improve the poor stability of corn moisture and low quality during the manual control process in grain storage.


## 2. Drying Processing Technology

Drying experiment was carried out on two small 5HSZ-30-type crossflow grains dryers, which is the base of the predictive model. Figure1 is 5HSZ-30-type dryer process flow diagram. It is very important to establish an accurate mathematical model for predicting the grain germination rate and moisture content in the grain-drying process.Figure 1
5HSZ-30-type dryer.The structure of drying section composed of eight mountain-shaped mesh plates, which is shown in Figure2. Corn can flow top-down between the mesh plates. Hot air passes through the grain layer vertically and takes the water away.Figure 2
Schematic diagram of drying section.The controller of the dryer includes the temperature sensor (T1~T4), online grain moisture content sensor (M0~M4), the data acquisition system, and a industrial control computer, the sensors location shown in Figure 1. The drying system uses distributed control system which is made up of the control unit (computer), temperature measurement and control instruments, moisture measuring instruments, control actuators, and other components. Data exchanges between control unit and the temperature measurement and control instruments (T01,T02), moisture measuring instruments and control actuators (C1~C4) to achieve via RS485 data bus. The control unit can obtain the data from the temperature measurement and control instruments and moisture measuring instruments and send the data to the PLC. The achievement is using real-time measured data from sensors to provide a large number of measured data for the simulation system, and adjusting the prediction for the further production process.


## 3. Drying Simulation System

### 3.1. Drying Mathematical Model

In the paper, in the partial differential equation model which is designed by Professor Bakker-Arkema as the drying process model, this model can be used in crossflow, downstream, and upstream dryer simulation. According to the characteristics of corn, the equation of drying rate adopts Li Huizhen equations [4, 5]. Model is as follows:(
1
) the equation of drying rate
(3.1)M-MeM0-Me=exp⁡(-ktN),(
2
) the equation of mass balance
(3.2)∂H∂x=-ρgGa⋅∂M∂t,(
3
) the equation of heat balance
(3.3)∂θ∂t=ha(T-θ)ρgcg+ρgcwM+hfg+cv(T-θ)ρgcg+ρgcwMGa∂H∂x,(
4
) the equation of heat transfer
(3.4)∂T∂x=-ha(T-θ)Ga(ca+cvH),
where k is drying constant (k=1.091×102+2.767×10-6T2+7.286×10-6TM0); N is drying constant (N=0.5357+1.141×10-5M02+5.183×10-5T2); M is the average moisture content of grain (decimal, dry basis); Me is equilibrium moisture content (decimal, dry basis); t is drying time (min); T is air temperature (°C); H is air moisture content (kg/kg); h is convective heat transfer coefficient [J/(m2·h·°C)]; Ca is specific heat of dry air [J/(kg·°C)]; Cg is specific heat of dry grain [J/(kg·°C), Cg = 1.47 + 0.036M]; Cw is specific heat of water [J/(kg·°C)]; Cv is specific heat of steam heat [J/(kg·°C)]; Ga is air flow [kg/(m2/h)]; a is valley-bed unit volume of grain surface area (m2, a = 784 m2/m3); ρg is Grain density (kg/m3, ρg = a1−a2M + a3M2, a1 = 1086.3; a2=2971; a3=4810); hfg is vaporization enthalpy variable of grain moisture (KJ/kg); hfg=(1094-0.57θ)(1+4.35e-28.25M)  θ is grain temperature (°C).


### 3.2. Mathematical Models for the Prediction of Grain Germination Rate

The artificial neural network (ANN) is a well-known tool for solving complex, nonlinear biological systems, and it can give reasonable solutions even in extreme cases or in the event of technological faults. In 2003, Wenfu et al. presented a optimizing the neural network topology for predicting the seed vigor [6]. The model form is as follows:(3.5)Q=1-1[1+exp⁡(-z)],
when z=A+BTα+Ctβ+DMγ, Q is germination rate, t is drying time min, T is drying temperature °C, M is moisture content of grain %, z is variable, A,B,C,D,α,β,γ is content through the experiment parameters estimation methods to determine [7], respectively, A=80.5,B=-8.8,C=-1.3,D=-6.48,α=0.5,β=0.5,γ=1.


### 3.3. Design Structural of Simulation System

A deep bed drying model is made up of equations from (3.1) to (3.5), which has five parameters needed to be solved, namely, the average grain moisture content M, corn temperature θ, hot air temperature T after grain layer, moisture content of hot air H, and germination rate Q. The grain moisture content M can be obtained from (3.1). If we get ∂M/∂t, corn temperature θ, hot air temperature T after grain layer, moisture content of hot air H, and germination rate Q can be solved accordingly. In this paper, finite difference method was used to solve these five equations. In order to reduce the prediction error, the parameters can be collected from the sensor real-time to correct the prediction model.


## 3.1. Drying Mathematical Model

In the paper, in the partial differential equation model which is designed by Professor Bakker-Arkema as the drying process model, this model can be used in crossflow, downstream, and upstream dryer simulation. According to the characteristics of corn, the equation of drying rate adopts Li Huizhen equations [4, 5]. Model is as follows:(
1
) the equation of drying rate
(3.1)M-MeM0-Me=exp⁡(-ktN),(
2
) the equation of mass balance
(3.2)∂H∂x=-ρgGa⋅∂M∂t,(
3
) the equation of heat balance
(3.3)∂θ∂t=ha(T-θ)ρgcg+ρgcwM+hfg+cv(T-θ)ρgcg+ρgcwMGa∂H∂x,(
4
) the equation of heat transfer
(3.4)∂T∂x=-ha(T-θ)Ga(ca+cvH),
where k is drying constant (k=1.091×102+2.767×10-6T2+7.286×10-6TM0); N is drying constant (N=0.5357+1.141×10-5M02+5.183×10-5T2); M is the average moisture content of grain (decimal, dry basis); Me is equilibrium moisture content (decimal, dry basis); t is drying time (min); T is air temperature (°C); H is air moisture content (kg/kg); h is convective heat transfer coefficient [J/(m2·h·°C)]; Ca is specific heat of dry air [J/(kg·°C)]; Cg is specific heat of dry grain [J/(kg·°C), Cg = 1.47 + 0.036M]; Cw is specific heat of water [J/(kg·°C)]; Cv is specific heat of steam heat [J/(kg·°C)]; Ga is air flow [kg/(m2/h)]; a is valley-bed unit volume of grain surface area (m2, a = 784 m2/m3); ρg is Grain density (kg/m3, ρg = a1−a2M + a3M2, a1 = 1086.3; a2=2971; a3=4810); hfg is vaporization enthalpy variable of grain moisture (KJ/kg); hfg=(1094-0.57θ)(1+4.35e-28.25M)  θ is grain temperature (°C).


## 3.2. Mathematical Models for the Prediction of Grain Germination Rate

The artificial neural network (ANN) is a well-known tool for solving complex, nonlinear biological systems, and it can give reasonable solutions even in extreme cases or in the event of technological faults. In 2003, Wenfu et al. presented a optimizing the neural network topology for predicting the seed vigor [6]. The model form is as follows:(3.5)Q=1-1[1+exp⁡(-z)],
when z=A+BTα+Ctβ+DMγ, Q is germination rate, t is drying time min, T is drying temperature °C, M is moisture content of grain %, z is variable, A,B,C,D,α,β,γ is content through the experiment parameters estimation methods to determine [7], respectively, A=80.5,B=-8.8,C=-1.3,D=-6.48,α=0.5,β=0.5,γ=1.


## 3.3. Design Structural of Simulation System

A deep bed drying model is made up of equations from (3.1) to (3.5), which has five parameters needed to be solved, namely, the average grain moisture content M, corn temperature θ, hot air temperature T after grain layer, moisture content of hot air H, and germination rate Q. The grain moisture content M can be obtained from (3.1). If we get ∂M/∂t, corn temperature θ, hot air temperature T after grain layer, moisture content of hot air H, and germination rate Q can be solved accordingly. In this paper, finite difference method was used to solve these five equations. In order to reduce the prediction error, the parameters can be collected from the sensor real-time to correct the prediction model.


## 4. Control of the Controlled Parameters

### 4.1. Design Neural Network Controller

This paper combines the traditional PID controller with neural network technology to build neural network PID controller for controlling technological parameters. Neural network adopts three-layer feed-forward network structure; the forward numeration of network is used for the control law of PID controller, while adaptive adjustment of parameters PID controller is achieved by back propagation network algorithm [7, 8]. This neural network PID controller not only has the advantages of the traditional one, but also has parallel structure of the neural network and memory of nature learning, the ability of multilevel network to approximate any function. Control structure is shown in Figure 3.Figure 3
Neural network controller structure.Allowing for the control rule of incremental PID, the difference equation is that(4.1)Δu(k)=KP(e(k)-e(k-1))+KIe(k)+KD(e(k)-2e(k-1)+e(k-2)),e(k)=r(k)-y(k),
where, r(k) is the set value, y(k) is the output value, Δu(k) is the control increase output, and KP,KI,KD are proportional, integral, and differential factors, respectively.Therefore, we can build a neural network model for the system of single variable, the input of the network is(4.2)I(k)=[v1(k),v2(k),v3(k)]T,v1(k)=Δe(k)=e(k)-e(k-1),v2(k)=e(k),v3(k)=Δ2e(k)=e(k)-2e(k-1)+e(k-2),e(k)=r(k)-y(k),
where, r(k) is the expectation of the system output, y(k) is the actual system output, the output of neural network is the control element u(k), and Ki is the weight matrix of neural network, that is, the network model is
(4.3)u(k)=gNN[e(k),Δe(k),Δ2e(k),Ki].The network can be regarded as a nonlinear PID controller, which realizes adaptive control through automatically adjusting parameters of the PID controller by real-time correction of weighting factorKi when parameters of the controlled object change. If the neural network is two-layer structure, and the output layer activation function is a linear, namely, h(x)=x, then this network can degenerate into a conventional linear PID controller. For n variables controlled system, using the n subnetworks in parallel, each subnetwork structure is aforementioned nonlinear PID network. In this system, to ensure the quality characteristics of the dried grain, predictive control over the grain discharge rate and air temperature is necessary, so a two-variable system was established; that is, two nonlinear PID networks in parallel, mutual coupling between the two variables constitute a biobjective controller. Controller structure is shown in Figure 4.Figure 4
Biobjective control system.


### 4.2. Multistep Predictive Control Algorithm for Drying Process

The system controller is a decoupling controller which is composed by the two previous nonlinear PID controllers, with control elements of air temperature and grain discharge rate, respectively [9]. Provided the i-th network input Ii(k)=[ei(k),Δei(k),Δ2ei(k)]T, where ei(k)=ri(k)-yi(k), variable definitions are the same as the earlier. Network output is corresponding to the i-th control element ui(k). The objective function used to modify the network weights is
(4.4)Ji=12∑j=0N[Yr(k+j)-Y(k+j)]T[Yr(k+j)-Y(k+j)]+λi2∑j=0N[Δui(k+j)]2,
where Yr(k+j) is the settings soften array, and Yr(k+j)=[yr1(k+j),…,yri(k+j)]T, N is the prediction horizon, and λi is control weighting factor. Block diagram of predictive control system is shown as Figure 5.Figure 5
Neural network control system.Here, we use iterative methods to evaluate the predicted system output, provided weight matrix maintained unchanged in iterative process. The detailed calculation steps are as follows.Step 1.
At present timek, let S=1.Step 2.
Calculate the step forward predictive value, obtain the error signalE(k)+[e1(k),…,en(k)]T, and apply it in the decoupling controller, generating the control element U(k)=[u1(k),…,un(k)]T:Step 3.
Update the following variables:(4.5)U(k-nu-1)=U(k-nu),…,U(k-1),…,U(k),Y(k-ny-1)=Y(k-n),…,Y(k-1)=Y(k).
Apply the above variables to the prediction model to calculate the predicted output. As the above step, obtain the corresponding error signal, and apply it in the decoupling controller, to calculate the control element U(k+1) at the next moment.Step 4.
By this rule, repeat Step2, and in turn get Y′(k+1),…,Y′(k+j), computing multistep forward predicted output and the future time control signal.Step 5.
Correct weighting value of each control network according to objective function (4.4). Consider the following:
(4.6)ΔVi(k)=Vi(k+1)-Vi(k)=-ηi∂Ji∂Vi(k).
From (4.4) it shows that
(4.7)∂Ji∂Vi(k)=∑j=0N{∂[Yr(k+j)-Y(k+j)]T∂Vi(k)⋅∂Ji∂[Yr(k+j)-Y(k+j)]+∂Ji∂ui(k+j)∂ui(k+j)∂Vi(k)},
while
(4.8)∂[Yr(k+j)-Y(k+j)]T∂Vi(k)=∂[Yr(k+j)-Y(k+j)]T∂ui(k+j)∂ui(k+j)∂Vi(k),
so
(4.9)∂Ji∂Vi(k)=∑j=0N{-∂YT(k+j)∂ui(k+j)[Yr(k+j)-Y(k+j)]+λi⋅Δui(k+j-1)}∂ui(k+j)∂Vi(k),
taking it into (4.6), we get
(4.10)ΔVi(k)=-ηi⋅∑j=0N{-∂YT(k+j)∂ui(k+j)[Yr(k+j)-Y(k+j)]+λi⋅Δui(k+j-1)}∂ui(k+j)∂Vi(k).


### 4.3. Control System Establishment

Figure6 shown is the main interface of control system; this interface mainly includes information such as the drying process online collection of digital information, digital and graphical display, control process parameters display, file save path, communication ports choice, and moisture sensor calibration parameters.Figure 6
The main interface of control system.


## 4.1. Design Neural Network Controller

This paper combines the traditional PID controller with neural network technology to build neural network PID controller for controlling technological parameters. Neural network adopts three-layer feed-forward network structure; the forward numeration of network is used for the control law of PID controller, while adaptive adjustment of parameters PID controller is achieved by back propagation network algorithm [7, 8]. This neural network PID controller not only has the advantages of the traditional one, but also has parallel structure of the neural network and memory of nature learning, the ability of multilevel network to approximate any function. Control structure is shown in Figure 3.Figure 3
Neural network controller structure.Allowing for the control rule of incremental PID, the difference equation is that(4.1)Δu(k)=KP(e(k)-e(k-1))+KIe(k)+KD(e(k)-2e(k-1)+e(k-2)),e(k)=r(k)-y(k),
where, r(k) is the set value, y(k) is the output value, Δu(k) is the control increase output, and KP,KI,KD are proportional, integral, and differential factors, respectively.Therefore, we can build a neural network model for the system of single variable, the input of the network is(4.2)I(k)=[v1(k),v2(k),v3(k)]T,v1(k)=Δe(k)=e(k)-e(k-1),v2(k)=e(k),v3(k)=Δ2e(k)=e(k)-2e(k-1)+e(k-2),e(k)=r(k)-y(k),
where, r(k) is the expectation of the system output, y(k) is the actual system output, the output of neural network is the control element u(k), and Ki is the weight matrix of neural network, that is, the network model is
(4.3)u(k)=gNN[e(k),Δe(k),Δ2e(k),Ki].The network can be regarded as a nonlinear PID controller, which realizes adaptive control through automatically adjusting parameters of the PID controller by real-time correction of weighting factorKi when parameters of the controlled object change. If the neural network is two-layer structure, and the output layer activation function is a linear, namely, h(x)=x, then this network can degenerate into a conventional linear PID controller. For n variables controlled system, using the n subnetworks in parallel, each subnetwork structure is aforementioned nonlinear PID network. In this system, to ensure the quality characteristics of the dried grain, predictive control over the grain discharge rate and air temperature is necessary, so a two-variable system was established; that is, two nonlinear PID networks in parallel, mutual coupling between the two variables constitute a biobjective controller. Controller structure is shown in Figure 4.Figure 4
Biobjective control system.


## 4.2. Multistep Predictive Control Algorithm for Drying Process

The system controller is a decoupling controller which is composed by the two previous nonlinear PID controllers, with control elements of air temperature and grain discharge rate, respectively [9]. Provided the i-th network input Ii(k)=[ei(k),Δei(k),Δ2ei(k)]T, where ei(k)=ri(k)-yi(k), variable definitions are the same as the earlier. Network output is corresponding to the i-th control element ui(k). The objective function used to modify the network weights is
(4.4)Ji=12∑j=0N[Yr(k+j)-Y(k+j)]T[Yr(k+j)-Y(k+j)]+λi2∑j=0N[Δui(k+j)]2,
where Yr(k+j) is the settings soften array, and Yr(k+j)=[yr1(k+j),…,yri(k+j)]T, N is the prediction horizon, and λi is control weighting factor. Block diagram of predictive control system is shown as Figure 5.Figure 5
Neural network control system.Here, we use iterative methods to evaluate the predicted system output, provided weight matrix maintained unchanged in iterative process. The detailed calculation steps are as follows.Step 1.
At present timek, let S=1.Step 2.
Calculate the step forward predictive value, obtain the error signalE(k)+[e1(k),…,en(k)]T, and apply it in the decoupling controller, generating the control element U(k)=[u1(k),…,un(k)]T:Step 3.
Update the following variables:(4.5)U(k-nu-1)=U(k-nu),…,U(k-1),…,U(k),Y(k-ny-1)=Y(k-n),…,Y(k-1)=Y(k).
Apply the above variables to the prediction model to calculate the predicted output. As the above step, obtain the corresponding error signal, and apply it in the decoupling controller, to calculate the control element U(k+1) at the next moment.Step 4.
By this rule, repeat Step2, and in turn get Y′(k+1),…,Y′(k+j), computing multistep forward predicted output and the future time control signal.Step 5.
Correct weighting value of each control network according to objective function (4.4). Consider the following:
(4.6)ΔVi(k)=Vi(k+1)-Vi(k)=-ηi∂Ji∂Vi(k).
From (4.4) it shows that
(4.7)∂Ji∂Vi(k)=∑j=0N{∂[Yr(k+j)-Y(k+j)]T∂Vi(k)⋅∂Ji∂[Yr(k+j)-Y(k+j)]+∂Ji∂ui(k+j)∂ui(k+j)∂Vi(k)},
while
(4.8)∂[Yr(k+j)-Y(k+j)]T∂Vi(k)=∂[Yr(k+j)-Y(k+j)]T∂ui(k+j)∂ui(k+j)∂Vi(k),
so
(4.9)∂Ji∂Vi(k)=∑j=0N{-∂YT(k+j)∂ui(k+j)[Yr(k+j)-Y(k+j)]+λi⋅Δui(k+j-1)}∂ui(k+j)∂Vi(k),
taking it into (4.6), we get
(4.10)ΔVi(k)=-ηi⋅∑j=0N{-∂YT(k+j)∂ui(k+j)[Yr(k+j)-Y(k+j)]+λi⋅Δui(k+j-1)}∂ui(k+j)∂Vi(k).


## 4.3. Control System Establishment

Figure6 shown is the main interface of control system; this interface mainly includes information such as the drying process online collection of digital information, digital and graphical display, control process parameters display, file save path, communication ports choice, and moisture sensor calibration parameters.Figure 6
The main interface of control system.


## 5. System Application and Testing

To verify the actual operation effect of the controller, it was tested on two drying machines in series connection, the drying machine is model 5HSZ-30 small crossflow continuous dryer, and the test site is in Gongzhuling Jilin Grain trading company depots. Test material is the horse tooth corn provided by the company grain depots. During the test, corn moisture content, grain discharge rate, hot air temperature and humidity at intake and exit, ambient air temperature, and humidity, sampling, and so forth are recorded. Data at a relative stable test phases was selected as the actual measured results and compared these results with data in manual control process to verify whether the control system meets with application requirements. Table1 shows the test condition parameters.Table 1
Test conditions and measurement results (average value).
Test conditions
Dryer I
Dryer II
Capacity/kg
10000
10000
Initial moisture content (wet basis)/%
27.31
18.26
Unprocessed grain temperature/°C
−0.7
32
Ambient temperature/°C
−1.0
−1.0
Relative humidity of ambient/%
45
45
Fan flow/m3/min
150
150
Hot air temperature/°C
85.8
109.4
Relative humidity of exhaust gas/%
65
58
Feed rate/kg/h
1773
1716The requirements of the control system are as follows.(1)
The corn moisture content after drying remains stable and uniform (±0.5%) and close to the requirements of the moisture (14%).(2)
Improve the relative germination rate of the corn after drying.The production test was made in January 2008. The test site is shown in Figures7, 8, and 9 which are the temperature change curves of each measurement point under the manual control and the automatic control condition. Figures 10 and 11 are the change curves of the corn moisture and the relative germination rate after drying under the manual control and the automatic control condition. In manual and automatic control processes, corn initial moisture fluctuations were 23.5%–27.4% and 23.7%–27.6%, mean square error was 0.84 and 0.96, respectively, which shows that they were basically in the same initial conditions. Exit moisture (oven method) fluctuations were 13.5%–14.6% and 13.6%–14.3%, variances were 0.98 and 0.58, which can be seen in the automatic control process, the exit dried grain has a smaller moisture fluctuation, and the control accuracy was higher than manual control. For the relative germination rate, as model prediction was adopted in the automatic process, air temperature and discharge rates were adjusted timely, which had a relative germination rate of 80.16%, higher than 70.05% in manual control process, and significantly improved the quality of dried corn. Relative germination rate fluctuations for manual and automatic controls were 61.3%–78.4% and 75.9%–83.1%, deviations were 13.67 and 1.98, respectively, and stabilities of dried grain after automatic control were higher than that of manual control. From the above analysis it can be seen, the system greatly enhanced the accuracy and stability of exit corn moisture content and quality, and suitable for production application.Figure 7
Test site.Figure 8
Air temperature and food temperature curve of manual control process.Figure 9
Air temperature and food temperature curve of Automatic control process.Figure 10
The water content of grain in manual and automatic mode.Figure 11
The relative germination rate of grain in manual and automatic mode.


## 6. Conclusions

A model predictive control system based on neural network was designed and tested on two 5HSZ-30 model corn dryers. The test showed that the control method of the system can be used in drying process control and intelligent control, and it can provide a considerable reference for the precise control of drying process. The stability and robust of the system are better than before. The specific conclusions are as follows.(1)
In the automatic control system, the fluctuation of corn moisture and relative germination rate after drying is small, and the system improves the uniformity of moisture content and relative germination rate.(2)
In the automatic control system, it increased the control of the temperature, so the thermal denaturation of corn and the influence of temperature to the quality of corn are decreased, and relative germination rate of drying machine export corn is increased.(3)
In the automatic control process, the interferences of human are reduced, the quality of the corn is ensured, so the labor costs can be reduced, and the economic value of the corn can be increased.



---

*Source: 584376-2012-08-08.xml*