## 5 Prediction Modeling and System Optimization
### Parametric Optimization Based on ANN Model  
It is explained in Section 3 that the capacity regulation system realizes the capacity regulation of the compressor by controlling the energizing time of the high-speed solenoid valve. The calculation formulas of the energizing time of solenoid valve are Equations (10) and (11). In order to facilitate the compensation optimization of control parameters, Equations (10) and (11) are converted into the following forms.  
\[\begin{array}{l}T_{control}=T_{c0}+f(\eta)\\ T_{c0}=\frac{60}{n}-t_{0}-t_{off}\end{array} \tag{19}\]  
where \(T_{control}\) represents the output control signal, that is, the solenoid valve total energizing time, \(T_{0}\), representing the shortest energized time of the solenoid valve, is determined by the initial response  
Figure 21: (**a**) Absolute prediction error of the ANN model with PSO; (**b**) relative prediction error of the ANN model with PSO.  
Figure 20: Comparison of modified ANN predictions and experimental data with PSO; (**a**) the first stage; (**b**) the second stage.  
characteristic of the solenoid valve and the designed stiffness of the actuator spring and the phase of the actuator to complete the ejection action. \(f\left(\eta\right)\) is the relationship between the load and the increase in energized time and can be expressed as:  
\[f(\eta)=\frac{1}{\omega}\Bigg{\{}\arccos\Bigg{(}\frac{1}{\lambda}-\sqrt{1+\frac{ 2}{\lambda}-\frac{4\eta}{\lambda}+\frac{1}{\lambda^{2}}}\Bigg{)}. \tag{20}\]  
In order to realize system regulation optimization, the optimization compensation item is introduced into Equation (19) to overcome system regulation degradation caused by spring stiffness degradation or (and) changes in the dynamic characteristics of the electro-hydraulic actuator.  
\[T_{control}=T_{c0}+f(\eta)+\Delta T_{c}. \tag{21}\]  
To obtain the system optimization compensation parameter \(\Delta T_{c}\) and to evaluate the degradation efficiency of the capacity regulation system, the deviation of the load was taken into account. To simplify the optimization objective, we computed the degradation rate of the SCRS as follows:  
\[E=\frac{100\sqrt{\sum\limits_{i=1}^{m}{(\overline{\eta}_{i}-\eta_{i})}^{2}}}{m}, \tag{22}\]  
where \(\overline{\eta}_{i}\) is the load feedback value which can be calculated by the ANN prediction model, \(\eta_{i}\) is the given load output to the actuator, and \(m\) is the number of compressor stages. The optimization objective is the minimized degradation rate \(E\) in (22). Since the optimization is a steady-state optimization, an adaptive optimization method based on the degradation rate of SCRS is proposed to reduce the over-optimization caused by the load prediction error. If the degradation rate is low, the compensation amount of the control signal is small, ensuring no over-optimization. On the contrary, when the degradation rate is high, a large amount of compensation is generated to accelerate the system performance recovery. Therefore, the following adaptive adjustment formula can be used to optimize control signal compensation.  
\[\Delta T_{ci}=\frac{2}{\pi}arctan(\alpha_{i}E)[f(\eta_{i})-f(\overline{\eta}_{ i})], \tag{23}\]  
where \(\alpha_{i}\) is a constant that influences the speed of parameter optimization, and \(E\) is the degradation rate. The parameter \(\alpha_{i}\) can be adjusted according to the performance of the system optimization.