## 3 Application of the Process Method
### Soft Sensor for Response Error Estimation
Furthermore, the input parameters for the RTACA are the hyperparameters of the built polynomial regression models for each phase of the sheet metal bending cycle, i.e., bending \(\beta_{B}\), leveling \(\beta_{L}\), and movement \(\beta_{M}\). The real-time adaptive control function determines the hydraulic cylinder velocity in the \(i\)-th event, as described in Equation (2). The integrated observer in the decision-making function interrogates the hydraulic press and determines the phase in which a hydraulic press operates at i-th event. Considering the phase and the conditions under which a  
Figure 7: Polynomial regression model predictive control mechanism. hydraulic press operates, a proper polynomial regression model is selected to predict the estimated response error \(\Delta X_{i}\) produced by a hydraulic press in the \(i\)-th time event due to the intensity of the external disturbances monitored by variables \(X_{C,i}\) and \(F_{C,i}\). For the sake of clarity, it is important to point out that the data-driven models are individually tailored to the three phases of sheet metal bending cycle, i.e., bending, leveling, and movement. The presented approach is mandatory as the effects of the input parameters \(F_{C}\) and \(v_{C}\) on the response error \(\Delta X_{i}\) vary significantly. As explained in Section 3.2, the significance of the input parameters therefore requires correct polynomial fit with the appropriate degree and dimension. This approach minimizes computational power and ensures a fast response time for the RTACA. The accuracy of the estimated response error \(\Delta X_{i}\) depends on the repeatability of the sheet metal bending process, the repeatability of the operating conditions of the hydraulic press, the response time of the controller, and the accuracy of the polynomial regression models. Nevertheless, the data-driven models were built with historical data from experiments where white noise was present. Lastly, the output of the real-time adaptive control function generates an adapted control signal \(X_{C,adapt}\), which is determined as the sum of an estimated response error \(\Delta X_{i}\) and the expected hydraulic cylinder displacement \(X_{C,rot}\). The adapted control signal \(X_{C,adapt}\) serves as a control signal that is meant for the hydraulic press condition improvement loop in the oncoming \((i+1)\)-th event. ```
Online adaptive control algorithm  Input: Desired displacement \(X_{C,ref}=[X_{1},\,X_{2},\,X_{3},\,X_{4},\,X_{5},\,X_{6}]\), Cycle time interval \(t_{C}=[t_{1},\,t_{2},\,t_{3},\,t_{4},\,t_{5}]\), Polynomial regression model parameters for phases: bending \(\beta_{B}=[\beta_{0},\,\beta_{1},\,\beta_{2},\,\beta_{3},\,\beta_{4},\,\beta_{5},\,\beta_{6}]\), leveling \(\beta_{L}=[\beta_{0},\,\beta_{1},\,\beta_{2}]\), movement \(\beta_{M}=[\beta_{0},\,\beta_{1},\,\beta_{2},\,\beta_{3},\,\beta_{4},\,\beta_{5 },\,\beta_{6}]\)  Monitored variables at \(i\)-th event: Cylinder displacement \(X_{C,i}\), Cylinder force \(F_{C,i}\) Output: Control signal \(X_{C,adapt}\)
1 FUNCTION OnlineAdaptiveControl \((t_{i},\,X_{C,i},F_{C,i})\)
2\(v_{C,i}=\frac{X_{C,i}-X_{C,i-1}}{t_{i}-t_{i}}\)
3 IF\(t_{1}<t_{i}>t_{2}\)OR\(t_{4}<t_{i}>t_{5}\)THEN\(\beta=\beta_{M}\)%Movement phase
4\(\Delta X_{i}=\beta_{0}+\beta_{1}\,\,v_{C,i}+\beta_{2}\,\,F_{C,i}+\beta_{3}\,\,v _{C,i}^{2}+\beta_{4}\,\,v_{C,i}\,\,F_{C,i}+\beta_{5}\,\,v_{C,i}^{2}+\beta_{6}\, \,v_{C,i}^{2}\,\,F_{C,i}\)
5 ELSEIF\(t_{2}<t_{i}>t_{3}\)THEN\(\beta=\beta_{B}\)%Bending phase
6\(\Delta X_{i}=\beta_{0}+\beta_{1}\,\,v_{C,i}+\beta_{2}\,\,F_{C,i}+\beta_{3}\,\,v _{C,i}^{2}+\beta_{4}\,\,v_{C,i}\,\,F_{C,i}+\beta_{5}\,\,v_{C,i}^{3}+\beta_{6}\, \,v_{C,i}^{2}\,\,F_{C,i}\)
7 ELSEIF\(t_{3}<t_{i}>t_{4}\)THEN\(\beta=\beta_{L}\)%Leveling phase
8\(\Delta X_{i}=\beta_{0}\,\,v_{C,i}^{2}+\beta_{1}\,\,v_{C,i}+\beta_{2}\)
9 ENDIF
10 RETURN\(X_{C,adapt}=X_{C,ref}+\Delta X_{i}\)
```  
**Algorithm 1** Real-time adaptive control algorithm