Prediction and fusion algorithm for meat moisture content measurement based on loss-on-drying method

The loss-on-drying method has been widely used as a standard approach for measuring the moisture content of high-moisture materials such as solid and semi-solid foods. Loss-on-drying method provides reliable results, whilst usually labor-intensive and time-consuming. This paper presents a novel algorithm for predicting the moisture content of meats based on the loss-on drying method. The proposed approach developed a drying kinetics model of meats based on Fick’s Second Law and designed a prediction algorithm for meat moisture content using the least-squares method. The predicted results were compared with the official method recommended by the Association of Official Analytical Chemists (AOAC). When the moisture content of meat samples (beef and pork) was varied from 69.46% to 74.21%, the relative error of the meat moisture content (MMC) calculated by the proposed algorithm was 0.0017-0.0117, the absolute errors were less than 1%. The testing time was about 40.18%-56.87% less than the standard detection procedure.


Introduction
Food quality issues related to meat products, such as the illegal production of water-injected meat, are attracting a growing public awareness from consumers, industries, and governmental regulators [1] . Due to the temptation of high profits as well as technical difficulties in identifying the water-injected meat, the scandal conditions as mentioned above remain serious [2] . Meat moisture content (MMC) plays an important effect on the quality of meat products, such as color, flavor, and tenderness [3,4] . In recent years, near-infrared spectroscopy [5] , ultra-high-performance liquid chromatography-tandem mass spectrometry [6] , and multispectral imaging analysis [7] have been developed and applied to identify the water-injected porcine meats.
However, these technologists mentioned above are high costs in testing and difficult for commercialization [8] . In this case, an effective and low-cost technique for meat moisture detection is highly needed.
For meat and poultry products, the Loss-on-drying (LOD) method has been approved for official detection purposes according to the international standards recommended by the Association of Official Analytical Chemists (AOAC) 985.14-2005 [9] and International Organization for Standardization (ISO) 1442-1997 [10] . LOD method permits the simultaneous analyses of large numbers of samples and does not require equipment calibration [11] .
The LOD method provides reliable results, however, complaints about the labor-and time-intensive procedures have been described [12] . Generally, there are two ways to improve the detection efficiency of the traditional LOD method. One is enhancing the heating efficiency during drying, and the other one is using intelligent information processing technology to forecast the measurement results [12,13] . Enhancement of heating efficiency can be achieved via other drying techniques, such as infrared and microwave drying. Compared with the conventional drying methods, infrared drying has a higher drying rate, which is able to reduce the length of drying time with a lower energy cost. The higher drying rate of infrared drying over conventional methods contributes significant time and energy savings [14] .
For microwave drying, the major disadvantages lie in the difficulty in temperature control of the final products and the poor temperature uniformity during drying [15] . Moreover, carbonization along the sample corner or edges during microwave drying will result in an inaccuracy of moisture content detection [15] .
Recent developments in information fusion algorithm have brought an innovative approach for moisture content measurement of vegetables and fruits [16] . The artificial neural network (ANN) algorithm widely used in the estimation of the moisture content during the drying process is a backpropagation (BP) neural network learning algorithm [17,18] . The BP algorithm has been used to predict the moisture content of potato [19] , microwave-dried durian [20] , and tomato [21] . This algorithm is easy to fall into the local optimal value and affects the convergence speed of the algorithm, which improves the real-time performance and measurement accuracy [22] . The selection of the hidden layer number, the number of hidden layer nodes, the incentive function and the training algorithm are all based on experimental design, and can only be obtained by experimental calculation, resulting in redundancy to the network and invisibly adding the amount of research work and programming calculation [23] .
To simulate an infrared drying process, several empirical or semi-empirical models have been developed to simulate the drying kinetics of various vegetables and fruits [24][25][26] . However, little information is available regarding the use of the drying model for the detection of meat moisture content based on the LOD method. Therefore, the objectives of this study were: (1) to establish a mathematical model for describing the infrared drying process of meat samples (pork and beef) based on Fick's Second Law and to verify its adaptability, (2) to develop a prediction and fusion algorithm for meat moisture content detection during infrared drying using the least-squares method (LSM) algorithm, (3) to evaluate the feasibility of the fusion algorithm for meat moisture content detection.

Preparation of meat samples
Fresh sirloin (pork and beef) were purchased from the local Walmart supermarket (Changsha, China), with a reference moisture content of the samples varying from 69.46% to 74.21% (wet basis), as determined by the LOD method (AOAC Official Method 2005) [9] . Three replicates were analyzed by the reference method to achieve an analytical variance no more than ±2%. In this study, a moisture analyzer (SARTORIUS, MA100, Germany) was used as the drying apparatus ( Figure 1).

Experimental procedure
For sample treatment, all subcutaneous fat, external fascia, and adhesive tissues were removed from the muscles (pork and beef). The deboned meat chunks were ground by a meat grinder with a blade of 4.0 mm in diameter [27] (Model LM 10K, Koneteollisuus Oy, Finland). As recommended by the AOAC official method 2005, the average weight of the meat samples was 5-6 g [9] . The moisture content of the meat samples (pork and beef) is based on a wet basis (M wb ) in percentage, as expressed by Equation (1) [24,26] . where, m t is the mass (g) of the sample at time t (min); m 0 and m e are the initial and final mass (g) of the sample. Aluminum drying trays (2 mm in thickness and 90 mm in diameter) were used to hold the meat sample. The tray was pre-dried for a minimum of 1 h at 105°C, cooled in desiccators and weighed [27] . The above procedure was repeated until the difference in weight before and after drying was less than 0.005 g [27] . The moisture content determination was carried out by three independent replicates.
The sample mass was measured every 6 s by the moisture analyzer and uploaded to the computer through the RS-232 interface. The information was then saved in a database and retrieved by the prediction algorithm. All the calculations were processed and programmed by Matlab 2018 (The Mathworks, Inc., Natick, MA, USA).

Development of the predictive model
Moisture migration in biological products can be driven by a concentration gradient for liquids and by a partial vapor pressure gradient for vapor.
The governing equations for moisture transport are Fick's second law [28,29] as shown in Equations (2) and (3): where, MR is the moisture ratio; t is the drying time (s); M t is the moisture content at moment t (s); M ∞ and M 0 is the final and initial moisture content; D eff is the effective moisture diffusivity (m 2 /s). All the moisture content values are on the wet basis. Based on the form and characters of samples, the following assumptions are made [30] : (1) The shrinkage of the product during drying is negligible, and the assumption of one-dimensional heat diffusion is satisfied.
(2) The water diffusion coefficient is constant during drying.
(3) External resistance, such as mass transfer resistance, is neglected.
Then, Equations (2) and (3) can be merged into Equation (4), where, z is the thickness of the sample (0 ≤ z ≤ δ) (m). Solutions for Equation (4) with various geometrical and boundary conditions have been compiled by Crank [31] . The solution for an infinite slab is given by: With sufficient drying time, Equation (5) can be simplified by taking the first term of the series solution and assuming that n = 0, which gives [32] 2 (6) can be rewritten as follows, Drying is characterized by the simultaneous transfer of heat and mass. A characteristic drying curve of the infrared drying is shown in Figure 2.
This graph clearly shows that the drying rate, which is the slope of the drying curve, decreases with the drying time. During the first period of the drying process, all the heat absorbed from the air is used to evaporate water from the sample surface [33] . As shown in Figure 2, the water loss accelerates during the heating-up period (AB), whereas the second derivative of the drying curve is less than 0 and this period is characterized by the maximum drying rate related to the heat transfer rate of the sample. The constant drying rate period (BC) is relatively short, and the second derivative of the drying curve is equal to 0. Gradually, the drying rate of the sample slows progressively during the falling rate period (CD), which lasts for a long time, and the second derivative of the drying curve is greater than 0 [11,33] . This can be explained by the fact that when the moisture content at the surface decreases and the internal resistance to water transport increases, the evaporated water needs more time to make its way through the dry materials to the evaporation zone [34] .  Figure 2, it is clear to notice that the moisture content of the meat sample changes dramatically during the heating-up period [29] . In this case, the model developed in this study is not suitable to predict the final moisture content of the sample at this nonstatic stage.
On the other hand, it has been proved that the drying curve during the falling rate period can be described by an exponential model [35] . So, we set the starting point, t c , as the beginning of the prediction algorithm to increase the reliability of our model. This starting point can also be defined as the inflection point. It can be determined by calculating the second derivative of the drying curve. Based on Equation (7), the mathematical drying model of MMC prediction for LOD method can be modified as

Adaptive recognition for the starting point
The first derivative of the mass and moisture content can be denoted as v m and v M , respectively. The second derivative of mass and moisture content are denoted as a m and a M , and regulated by the following equations, where, m i and m i-1 are the mass of the sample (g) at i and i-1; t i is the drying time in min; Δm and ΔM are the difference in sample mass and moisture content, respectively. Δt is the time interval. From Equations (9) and (10), it can be deduced that the variation trend of the second derivative of the sample mass is the same with that of the second derivative of the sample moisture content. The inflection point of the drying curve is the same as the inflection point of the sample mass loss.
In this study, pork samples were randomly selected for analysis, with an initial moisture content M wb =72.76% (wet basis) and initial mass m 0 =4.991 g. When T=105°C, the infrared drying curve was measured and recorded every 6 s. The derivative of the sample mass and moisture content was then calculated to determine the inflection point, as shown in Figure 3.  The change of meat sample moisture content with drying time is similar to that of the sample mass, as shown in Figure 3a. It can be seen from Figure 3c that the point where the second derivative of two variables equals zero is the same with t c , as defined in Figure 2. Therefore, the starting point of the predictive fusion algorithm can be determined by calculating the second derivative of the sample mass. Based on the experimental data, the starting point of the falling rate period of 15 pork samples (as shown in Table 2) was at 3-5 min started from the beginning of the drying process, which was t c in the model. Through the above analysis and calculation, we can determine that t c is the starting point of the falling rate drying period as well as the starting point of our prediction model.
To adjust the experimental data for a better fit, we proposed criteria for the starting point. We set S as a flag to judge the starting point of the estimation algorithm. Upon the above analysis, the starting point of prediction can be determined by judging whether a is positive or negative: where, a i represents the second derivative of sample mass at i. If S=1, then i+1 is the starting point. However, due to experimental noise, the recorded drying curve is not smooth, so Equation (11) needs to be modified as follows: 1 1 1, 0 and 0 and 0, 1,2,..., ; 0, others.
where, K is preset constant, which can be determined from the experiment. If a i+1 meets the requirement of S=1 and the subsequent K points all meet the requirement of a ≥0, then i+1 is determined as the starting point of the prediction algorithm.

Design prediction algorithm based on LSM
According to the multiple regression model, the dependent variable is related to two or more independent variables. The general model is of the form where, t 1 , t 2 , … t m are independent variables (drying time); β 1 , β 2 , … β k are the parameters in the predictive drying model [37] . ˆ( ) M t is the calculated value of moisture content. Let the observed data points be denoted by where, n is the size of the sliding window (n=20). The problem is to compute those estimates of the parameters which will minimize the error between predictive value and measured value.
The sum of squares of the deviation is where, M ∞ is the final moisture content (wet basis) and τ is the coefficient of drying characteristics. According to the principle of the least-squares method [38] , Q is the partial derivatives concerning M ∞ and τ, and the derivatives are set to zero. To minimize Q, the two parameters M ∞ and τ can be solved by Equation (17 The goal of our investigation is to find an effective method that will be suitable for embedded systems. Furthermore, the algorithm can be run by either a small handheld device or an online instrument. To reduce the calculation amount of the algorithm and improve the execution efficiency in the embedded system, we performed the logarithmic operation of Equation (8). By doing this, we can get a linearized fusion expression. then: Equation (19) is the information fusion arithmetic expression of meat moisture measurement. These transformations can simplify the data as linear regression for model prediction. After determining α 1 and α 2 , the final dry-basis moisture content M ∞ can be calculated.

Solution of the model parameters
Based on the principle of the least-squares method, the sum of squares of the deviation, ψ , can be defined as: where, α 1 and α 2 , which minimize ψ , can be obtained by the LSM.
In the same way, partial derivatives ψ are taken with respect to α 1 and α 2 , and the following equations are obtained: From Equation (19), the relationship between the predicted moisture content M ∞ and τ (the coefficient of drying characteristics), α 1 and α 2 can be obtained: The iterative algorithm has been applied to calculate the parameters α 1 and α 2 can be obtained by, and then the prediction of M ∞ (the final moisture content) can be obtained. α 1 (j) and α 2 (j), the jth approximations of α 1 and α 2 , can be found by inputting sampled data and substituted into Equation (25); that is: When Δ (j) =0, the prediction of final moisture content (dry basis) can be obtained. Actually, the above process is equivalent to solving the transcendental equation In order to reduce the influence of the initial value on the convergence of the prediction algorithm, this paper adopts the Newton downhill method [39] . The request to initial value is high in Newton iteration, but the Newton downhill method can extend the range of the initial value.

Adaptive recognition for the end point
The permitted levels of meat moisture content according to Chinese standard GB 18394-2001 [40] are shown in Table 1.

Table 1 Permitted levels of moisture content in livestock and poultry
Category of meat Moisture content/% Pork ≤77 Beef ≤77 Chicken ≤77

Mutton ≤78
Since these data can be regarded as a priori knowledge of the meat moisture content, we set the first-level threshold value to ɛ 1 =70% (wet basis). where L is the length of the array. Combining engineering experience and test data, we set L=20.
If the maximal and minimal values meet the following criterion at the same time: We set the parameter ɛ 2 as the second level threshold. Through a large number of experiments, we set ɛ 2 =0.002 as the second-level threshold value to control the accuracy of the prediction and fusion algorithm. Then ( ) j M ∞ is the final predicted value of the algorithm. The flowchart of the prediction algorithm is shown in Figure 4.
Step 1: The rate of water loss and the first-order derivative during the drying process are calculated; Step 2: As illustrated in Equation (12), if the next 6 points all meet the requirement of a<0.00001, then i+1 is determined as the starting point of prediction, and then recorded.
Step 3: The sliding window sampling method is applied to the prediction algorithm, and the length of the sliding window array is 20. The predicted value of the final moisture content (wet basis) can be calculated based on the experimental data.
Step 4: The calculated value of the final moisture content (wet basis) is saved. When the online sampling data are updated, they are sent into the data stack and the predicted value of the final moisture content (wet basis) will be updated.
Step 5: ε 1 is set as the first-level threshold value to determine whether the predicted value is close to the actual value. At the same time, ε 2 is set as the second-level threshold value to control the accuracy of the prediction and fusion algorithm.

Validation of the predictive model
After the model was built, thirty randomly selected test data from the experiment were used model evaluation. As shown in Table 2, the coefficient of determination (R 2 ) was the primary criterion used to select the most fitted equation for the drying curve, with a reduced chi-square (χ 2 ) and root mean square error (RMSE) [32] . Model evaluation was necessary to estimate the accuracy and robustness of the predictive ability. According to the statistical results shown in Table 2, the R 2 of the prediction model is (0.8769-0.9996), χ 2 is (1.246×10 −5 -1.728×10 −3) , and RMSE is (0.0073-0.1399), which are regarded as reasonable results.

Validation of the prediction algorithm
The detection procedure was performed at a drying temperature of 105°C by using the official method. The predicted results were compared with the experimental results.
The measurement deviation is presented in Table 3 and Figure 5, and some conclusions can be found as follows: (1) When the moisture contents of the meat sample (beef and pork) are varied from 69.46% to 74.21%, the relative error of MMC measured by the proposed algorithm is 0.0017-0.0117, the absolute error is less than 1% compared with the official method.
(2) The prediction and fusion algorithm can effectively reduce the detection time while ensuring the detection accuracy. There is about 40.18%-56.87% time reduction in percentage compared with the official method recommend by AOAC.
To visualize the feasibility of the proposed algorithm for the prediction of the detection results, we randomly selected two sets of samples with an average initial moisture content M beef =72.71% for beef or M pork =70.88% for pork respectively.   Figure 5 Estimated goodness analysis of the proposed algorithm The measured curve and prediction curve based on the proposed algorithm of meat samples (beef and pork) are described in Figures 5a and 5b, the verification of predictive error is represented in Figures 5c and 5d. In Figure 5a, the prediction curve is in line with the measured curve for the beef sample, indicating the suitability of the prediction algorithm. While in Figure 5c, the trend of absolute error is asymptotically stable. When the drying time is after 40 min, the absolute error between the estimated value and the measured value is less than ±1%. A similar conclusion can be drawn from the estimated results of the moisture determination process in pork (shown as Figures 5b and  5d).

Conclusions
In this study, a method for rapid determination of moisture content of meat samples based on information fusion technique is proposed. When MMC is varied from 69.46% to 74.21%, the relative error of MMC measured by the proposed algorithm is 0.0017-0.0117, the absolute error is less than 1% compared with AOAC. The time-saving is about 40.18%-56.87% less than the official method. The proposed method could provide a fast and reliable prediction of meat moisture content during the infrared drying process. Also, this algorithm should be useful for developing a new moisture analyzer with a predictive function.