An ANN Model for Predicting the Compressive Strength of Concrete

: An artiﬁcial neural network (ANN) model for predicting the compressive strength of concrete is established in this study. The Back Propagation (BP) network with one hidden layer is chosen as the structure of the ANN. The database of real concrete mix proportioning listed in earlier research by another author is used for training and testing the ANN. The proper number of neurons in the hidden layer is determined by checking the features of over-ﬁtting while the synaptic weights and the thresholds are ﬁnalized by checking the features of over-training. After that, we use experimental data from other papers to verify and validate our ANN model. The ﬁnal result of the synaptic weights and the thresholds in the ANN are all listed. Therefore, with them, and using the formulae expressed in this article, anyone can predict the compressive strength of concrete according to the mix proportioning on his/her own.


Introduction
Due to the high compressive strength and the capability of being casted into any shape and size, concrete is the most used construction material in the world. The compressive strength is related to the proportioning of its ingredients, such as water, cement, coarse aggregates, sand, and other admixtures. How to predict the compressive strength according to the proportioning design is a very practical topic. For example, with a prediction model one can estimate the compressive strengths of dozens of mix designs and just choose those that achieve the required strength for further physical tests. This can reduce the number of trials for a specific compressive strength requirement and can save a lot of money and time. Furthermore, one can determine the most inexpensive choice among those that required compressive strength for economical consideration.
Conventionally, statistics are a useful tool for evaluating the results of strength tests. For instance, one can obtain a regression equation using data of water-cement ratio versus the compressive strengths [1]. However, there are not just one or two factors that affect compressive strength. The predicted results by just using the water-cement ratio could be very poor in many cases.
In recent decades, the artificial neural networks (ANNs) have drawn more and more attention because of the capability of dealing with multivariable analysis. Several authors have used the ANNs to determine the compressive strength of concrete [2][3][4][5][6][7][8][9][10][11][12][13][14][15][16]. An ANN is like a black box. After training the ANN, one can input several numerical values and the ANN will prompt another numerical value which represents the predicted compressive strength of the concrete. The components for the input can be factors such as the proportioning of water, cement, sand, etc. Recently, more and more new types of ANN structures, such as the Support Vector Machines [17,18], Deep Learning Neural Network [19][20][21][22][23], Radial Basis Function Network [24][25][26][27][28][29] for various research areas have popped out, as well

The Concrete Mix Proportioning
According to [16], the 28-day compressive strength is related to seven factors. They are the mass of water, cement, fine aggregate (or sand), coarse aggregate, blast furnace slag, fly ash, and superplasticizer mixed in 1 m 3 concrete. Therefore, the compressive strength of concrete can be expressed as a mathematical function with seven variables: (1) in which; where x 1 to x 7 are those just mentioned proportioning factors while y is the compressive strength of concrete. For the input and output of the ANN, all the data have to be normalized into the range of 0 to 1. The linear transformation is applied. The ranges from x 1 to x 7 are listed in Table 1.
η = y − y min y max − y min (4) Table 1. The ranges of the inputs and the output in the raw data [12].
Inputs Output Printing out all the data might make this paper redundant. Those who need the digital file of the raw data of the database may contact the authors of [16]. Listed data can also be found in the tables of [12] which has been openly published and is downloadable from NCTU library website (https://ir.nctu.edu.tw/handle/11536/71533 (accessed on 12 March 2021)). For implementing this research, we downloaded [12], and copied the data from the tables in that thesis. The normalized data are listed in Appendix A. One can use them accompanied by those listed in Table 1 to retrieve their original values.

The Artificial Neural Network
The artificial neural network used in this study is the Back Propagation (BP) which was proposed in [31]. Following [16], we also use the single hidden layer network. According to the database of the real concrete mix proportioning, we have 7 neurons in the input layer and only 1 neuron in the output layer. The structure of the BP-ANN employed in this study is shown in Figure 1. Table 1. The ranges of the inputs and the output in the raw data [12]. Printing out all the data might make this paper redundant. Those who need the digital file of the raw data of the database may contact the authors of [16]. Listed data can also be found in the tables of [12] which has been openly published and is downloadable from NCTU library website (https://ir.nctu.edu.tw/handle/11536/71533 (accessed on 12 March 2021)). For implementing this research, we downloaded [12], and copied the data from the tables in that thesis. The normalized data are listed in Appendix A. One can use them accompanied by those listed in Table 1 to retrieve their original values.

The Artificial Neural Network
The artificial neural network used in this study is the Back Propagation (BP) which was proposed in [31]. Following [16], we also use the single hidden layer network. According to the database of the real concrete mix proportioning, we have 7 neurons in the input layer and only 1 neuron in the output layer. The structure of the BP-ANN employed in this study is shown in Figure 1. The formula for the normalized input-output relation can be expressed mathematically: (2) (2) 0 where, in Equations (5) and (6), (2) 0 w are so-called thresholds, (1) , ij w and (2) j w are the synaptic weights,  is the shape parameter of the activating function, i represents the index of a neuron in the input layer, j represents the index of a neuron in the hidden layer, and n represents the total number of neurons in the hidden layer.
The suitable number of neurons in the hidden layer is to be determined.  The formula for the normalized input-output relation can be expressed mathematically: where, in Equations (5) and (6), w 0,j and w (2) 0 are so-called thresholds, w i,j and w (2) j are the synaptic weights, α is the shape parameter of the activating function, i represents the index of a neuron in the input layer, j represents the index of a neuron in the hidden layer, and n represents the total number of neurons in the hidden layer. The suitable number of neurons in the hidden layer is to be determined.
From the database, N records are randomly chosen for training the ANN. The error residual is defined as: where η (d) k is the desired value which represents the normalized compressive strength in the data, η (o) k is the output of the ANN, and k is the sequential number. We use the underline for k to remind that the samples have been re-numbered because we randomly Appl. Sci. 2021, 11, 3798 4 of 13 picked them up from the database. The training process is to find a set of suitable values for the thresholds and the synaptic weights. In the beginning, all the values of the thresholds and the synaptic weights are set up with small random numbers. Now the error residual E is a function of the thresholds and the synaptic weights. We can use the steepest descendent method to update their guess values and make them move toward a better solution: where µ is the step parameter of the correction. The basic/standard backpropagation algorithm is employed for training. The detailed training procedure can be found in [32] (in Section 3.3 of this book) or traced back in [31]. We coded the programs by ourselves. The computer language is VBA which is embedded in Microsoft Excel ® . In this study, the value of α is chosen as 1. The constant step parameter is employed. The value of µ is chosen as 0.02. It should be kept in mind that in Equations (5) and (6) the beginning numbers of i and j are both 1, but in Equations (8) and (9) the beginning numbers of i and j are both 0. Random numbers in the range of −1 to 1 are chosen as the initial values of the thresholds and the synaptic weights. Accordingly, the results will not be exactly the same in each training process. Even so, the tendency of convergence will be very similar.

The Results
There are 482 data in the database. We separate the database into two sets, the training set and the testing set, respectively. The training set includes 85% of the data. Therefore, the training set comprises 410 samples and the testing set comprises 72 samples. Samples included in the testing set are marked in the Appendix A.
Artificial neural networks with 3-12 neurons in the hidden layer are tested. More neurons in the hidden layer mean the ANN is more complicated so it can memorize more detailed features. However, it also means the result of the ANN has a tendency towards over-fitting. Furthermore, too many repetitions of the training iteration will also make the ANN memorize too many detailed features and perform poorly when it is in practical use. A time of iteration indicates all the synaptic weights and the thresholds are updated according to the error residual in the training set.
To help us detect whether over-fitting or over-training happens, both the root-meansquare errors of the training set and the testing are calculated after finishing each iteration. The values of the thresholds and the synaptic weights are also temporarily saved so we can come back to use them when we have selected a suitable ANN structure and have determined the proper iteration times. The root-mean-square error is defined as: where the overbar represents the average in the data set. Note that the numbers of samples in the two data sets are different. Among all the training results, we chose the results of 3, 7, and 12 neurons in the hidden layer to demonstrate the features of over-fitting and over-training. They are shown in Figure 2. It can be observed that the root-mean-square error of the training set decreases as more iterations are processed, but it does not happen to the testing set. This demonstrates the effect of over-training. One can also find that setting more neurons in the ANN can help reduce the root-mean-square error of the training set. But the root-mean-square error of the testing set seems to not go the same way as more and more neurons in the hidden layer are comprised. This indicates that setting more neurons in the hidden layer tends to cause over-fitting. With the results shown in Figure 2, we suggest that setting 7 neurons in the hidden layer is sufficient for the ANN in this study. It is worth noting that the ANN in [16] has 14 neurons in the hidden layer.
hidden layer to demonstrate the features of over-fitting and over-training. They are shown in Figure 2. It can be observed that the root-mean-square error of the training set decreases as more iterations are processed, but it does not happen to the testing set. This demonstrates the effect of over-training. One can also find that setting more neurons in the ANN can help reduce the root-mean-square error of the training set. But the root-mean-square error of the testing set seems to not go the same way as more and more neurons in the hidden layer are comprised. This indicates that setting more neurons in the hidden layer tends to cause over-fitting. With the results shown in Figure 2, we suggest that setting 7 neurons in the hidden layer is sufficient for the ANN in this study. It is worth noting that the ANN in [16] has 14 neurons in the hidden layer. The thresholds and the synaptic weights of the 7-hidden-neuron ANN with 12,040 times of training iteration are used for further investigations. This is chosen for the reason that the root-mean-square errors of the training set and the testing set are equivalent to each other. The synaptic weights from the input layer to the hidden layer and the thresholds of the hidden neurons are listed in Table 2. The synaptic weights from the hidden layer to the output neuron and the threshold of the output neuron are shown in Table 3. With these thresholds and synaptic weights, the predicted outputs are calculated and compared with their desired values. The comparison is shown in Figure 3. It can be found that the results of the two data sets have similar divergence. That is because the root-mean-square errors of the two sets are very close. It is also worth noting that in [16] the result of such comparison looks very close to a central inclined line which represents the predicted are exact to their targets. The thresholds and the synaptic weights of the 7-hidden-neuron ANN with 12,040 times of training iteration are used for further investigations. This is chosen for the reason that the root-mean-square errors of the training set and the testing set are equivalent to each other. The synaptic weights from the input layer to the hidden layer and the thresholds of the hidden neurons are listed in Table 2. The synaptic weights from the hidden layer to the output neuron and the threshold of the output neuron are shown in Table 3. With these thresholds and synaptic weights, the predicted outputs are calculated and compared with their desired values. The comparison is shown in Figure 3. It can be found that the results of the two data sets have similar divergence. That is because the root-mean-square errors of the two sets are very close. It is also worth noting that in [16] the result of such comparison looks very close to a central inclined line which represents the predicted are exact to their targets.   After the number of neurons in the hidden layer and all the thresholds and synaptic weights are determined, we use our ANN to predict the compressive strengths of the 12 mix designs in [16] and compare the results with the data observed in their laboratory. The results are listed in Table 4. The predicted compressive strengths in [16] are also listed in the same table. The comparisons of the predicted and the actual compressive strengths are plotted in Figure 4. Note that the range shown in this figure is from 0 to 100 due to the range of the compressive strength in the database is from 5.66 to 95.3 MPa. It is found in Figure 4 that the circular dots are more focused to the central inclined line. This implies that our ANN model outperforms the ANN model of [16] in the verification. Now the results are no longer in the range of 0 to 1. We use the coefficient of efficiency ( .. CE ) to evaluate performance:  After the number of neurons in the hidden layer and all the thresholds and synaptic weights are determined, we use our ANN to predict the compressive strengths of the 12 mix designs in [16] and compare the results with the data observed in their laboratory. The results are listed in Table 4. The predicted compressive strengths in [16] are also listed in the same table. The comparisons of the predicted and the actual compressive strengths are plotted in Figure 4. Note that the range shown in this figure is from 0 to 100 due to the range of the compressive strength in the database is from 5.66 to 95.3 MPa. It is found in Figure 4 that the circular dots are more focused to the central inclined line. This implies that our ANN model outperforms the ANN model of [16] in the verification.   Now the results are no longer in the range of 0 to 1. We use the coefficient of efficiency (C.E.) to evaluate performance: in which where y (a) is the actual compressive strength, y (p) is the predicted compressive strength, and E r.r.m.s. is the relative root-mean-square error. The C.E. of the predicted results in [16] is 0.955. The high C.E. means the predicted results in [2] are quite acceptable indeed. However, the C.E. of the results predicted by the present model is 0.991. The improvement is significant for the relative root-mean-square error is reduced by 21.2% to 9.49%.
In [15], the artificial neural network and genetic programming were employed to predict the 28-day, 56-day, and 91-day compressive strengths of concrete admixing with fly ash or without fly ash. The proportions of 76 concrete mixes were listed as well as their compressive strengths. Forty-nine of them are admixed without fly ash while the other 27 are admixed with fly ash. Blast furnace slag and superplasticizer are not admixed in all of them. These data are good for further validation of our prediction model. The predicted results of [15] were not listed in their paper so a further comparison is unavailable.
With our model, the predicted compressive strengths of concrete are calculated and listed in Table 5. The comparisons of the predicted and the actual compressive strengths are plotted in Figure 5. In this figure, it can be found that the predicted compressive strengths of those without fly ash are rather close to the actual values. The C.E. is 0.975. The relative root-mean-square error is 15.8%. Those mixes with fly ash are all slightly overpredicted. The C.E. is 0.940. The relative root-mean-square error is 24.5%. The high C.E. in both sets indicates that our prediction model really works at a good level. The predictions of non-fly ash mixes are more credible. We could expand the database for further improvement in the future.

Conclusions
In this study, the database of real concrete mix proportioning listed in [12] is used to establish an ANN prediction model for the concrete compressive strength. The ANN structure chosen in this study is the Back Propagation network with 1 hidden layer. The same database was also used in [16], and the number of hidden layers in the ANN is also the same. The database is divided into two sets, the training set and the testing set, respectively. In comparison with [16], we use fewer data for testing and more data for testing. The testing set comprises 15% of the data while in [16] it was just 4%. Considering the possible effect of over-fitting, the number of neurons in the hidden layer is finally chosen as 7, which is half the number used in [16]. The present ANN model outperforms the model in [16] in the verification in which we compare the predicted results with the experimental data. For corroborating that our model performs well in further practical use, we use experimental data from [15] for validation. A good agreement has also been found.

Conclusions
In this study, the database of real concrete mix proportioning listed in [12] is used to establish an ANN prediction model for the concrete compressive strength. The ANN structure chosen in this study is the Back Propagation network with 1 hidden layer. The same database was also used in [16], and the number of hidden layers in the ANN is also the same. The database is divided into two sets, the training set and the testing set, respectively. In comparison with [16], we use fewer data for testing and more data for testing. The testing set comprises 15% of the data while in [16] it was just 4%. Considering the possible effect of over-fitting, the number of neurons in the hidden layer is finally chosen as 7, which is half the number used in [16]. The present ANN model outperforms the model in [16] in the verification in which we compare the predicted results with the experimental data. For corroborating that our model performs well in further practical use, we use experimental data from [15] for validation. A good agreement has also been found.
The synaptic weights and the thresholds are all listed in this article. With these numbers and using Equations (1)-(6), anyone can predict the compressive strength of concrete according to the concrete mix proportioning on his/her own.  Data Availability Statement: All the data are available in the tables and can be traced back to references cited in this paper.

Conflicts of Interest:
The authors declare no conflict of interest.