## 5 Detection of Refrigerant Charge Amount  
_Detection Results of Refrigerant Charge Amount_  
The refrigerant charge is one of the predictors that define the dynamic characteristics of response variables. When the refrigerant charge amount has not been specified, it can be estimated by measuring whether the response values of the dynamic model can reflect the experimental data well. The refrigerant charge amounts can be obtained by minimizing the RMSEs of the response values and test data for each response variable (Figure 10 and Table 5). For the four response variables in Table 5 and Figure 10, the refrigerant charge amount cannot be predicted with the compressor discharge temperature model. As shown in Figure 8, the dynamic characteristics at refrigerant charges of 750 g or more are not greatly different. Thus, the compressor discharge temperature was excluded because of the poor prediction, and a new combination including the condensation temperature and degree of subcooling variables was added. When each of the four models is used for the test data, the prediction results of the refrigerant charge amount are displayed with prediction errors, which are defined as the relative error percentages with respect to the deviation regarding the actual measured value and the predicted value.  
Figure 9: Prediction results of dynamic characteristic for each parameter using test data: (**a**) condensation temperature; (**b**) degree of subcooling; (**c**) compressor discharge temperature; (**d**) power sonsumption.  
When the condensation temperature model was used, the prediction error of the refrigerant charge amount was 3.3%; when the refrigerant charge amount was small, its predicted value tended to be higher. In addition, the prediction error increased with increasing refrigerant charge amount. When the degree of subcooling model was used, the prediction error was 2.8%.  
When the power consumption model was used, the prediction result for the refrigerant charge amount was very poor. Its prediction was difficult at 800 and 900 g near the rated refrigerant charge amounts because the dynamic characteristics of the power consumption were similar at different charge levels.  
Figure 10: Detection results of refrigerant charge amount for each model using test data: (**a**) condensation temperature; (**b**) degree of subcooling; (**c**) power consumption; (**d**) combination of condensation temperature and degree of subcooling models.  
Moreover, the prediction errors of the condensation temperature and degree of subcooling with respect to the refrigerant charge showed opposite trends. Thus, the condensation temperature and degree of subcooling models were combined to estimate the refrigerant charge. By using the RMSE in Equation (5), the refrigerant charge amount that minimizes the RMSEs of the two response variables (i.e., the condensation temperature and degree of subcooling) can be obtained (Figure 10d and Table 5):  
\[\text{RMSE}=\sqrt{\sum_{i=1}^{n}\frac{\left(y_{pred,T_{c},sat}-y_{meas}\right) ^{2}+\left(y_{pred,AT_{\text{sc}}}-y_{meas}\right)^{2}}{2n}}. \tag{5}\]  
When the condensation temperature and degree of subcooling models were combined, the prediction error was 2.54%; thus, the prediction performance was improved compared to when the condensation temperature and subcooling models were used alone. In particular, the prediction error was reduced in the case of 600 g, which resulted in the lowest prediction performance.  
When developing a data-driven model using machine learning technique, a new model should be developed depending on the target system or if the regulation parameters of the system change in principle. However, it is expected that the SVM technique, variables selection, and diagnosis methodology presented in this paper can be applied to similar air conditioner systems.