**4. Camera System**

As mentioned above, accurate measurement of the initial billet shape is important to achieve reliable results in the straightening process. At the beginning of the straightening process, a profile of the billet is scanned by the camera system for a given side of the billet. The sensory system is composed of eight 2D monochrome cameras. Each camera is paired with a projector that projects a strip pattern on the scanned billet (Figure 9). The projectors are involved into the scanning process to eliminate poor contrast between the billet and the straightening machine and improve the overall quality of received data that directly influence the quality of the curve representing the billet shape.

**Figure 9.** The case for a camera-projector subsystem (**a**), and scanned sector of the straightening machine with the billet (**b**).

The cameras are equally distributed above the straightening machine to capture the whole area of the press technology (14 m × 1 m). Each camera captures a sector of technology with a length of 2.2 m. Pictures from neighbour cameras are overlapping, so we can get a picture of the whole billet by continuous junction of pictures from individual sections. By processing the picture of the whole billet, we can detect one of the upper edges of the billet. This is crucial for obtaining the curve representing the profile of the billet. An example of a screen visible for operators with subsequently proposed two strokes is shown in the Figure 10.

**Figure 10.** Visualization of initial billet shape and proposed strokes in the technology.

#### **5. Straightening Algorithm**

The straightness of the billet is defined by two criteria that determine the type of the billet based on its shape. Both parameters direct the straightening regime subsequently applied in the algorithm.

The first parameter is the sum of the maximum and minimum deviation from the linear regression line (Figure 11) considering the whole curve of the billet. It is marked as *p*<sup>1</sup> in the algorithm. The critical value of parameter *p*<sup>1</sup> is marked as *p*1*crit* and should be appropriately chosen according to the current billet length.

**Figure 11.** Scheme of gathering parameter *p*1.

The second parameter called *p*<sup>2</sup> contains the value of maximum deviation on a 1 m segment. This is obtained when the 1 m segment is virtually moved along the whole length of the curve. The deviation on the 1 m segment is determined by the maximum deviation of the curve point from the line connecting the two ending points of the segment. The critical value of the parameter *p*<sup>2</sup> will be marked as *p*2*crit* and influences the output accuracy of the straightening process.

The objective of the straightening algorithm is to straighten the billet i.e., to reduce both billet parameters below their critical values. The definition of a straight billet depends on subsequent technological processes and customer requirements. The most commonly applied technological process is grinding. Currently acceptable values by customers are *p*1*crit* = 15 mm (12 m billet length) and *p*2*crit* = 2 mm.

Four different straightening regimes of the algorithm are currently applied. The regime of the straightening algorithm is chosen based on the parameters mentioned above, supplemented by *p*<sup>0</sup> and *pmax*, which help to distinguish slightly curved billets and strongly

crooked ones, respectively. The values of *p*<sup>0</sup> and *pmax* are constant for a given material. The regime of the algorithm is chosen based on the billet shape according to schema of the algorithm; see Figure 12.

**Figure 12.** Flowchart of the straightening algorithm part proposing strokes (PLC—Programmable Logic Controller).

The first regime is applied in the case of valid conditions *p*<sup>1</sup> > *p*<sup>0</sup> and *p*<sup>2</sup> > *p*2*crit*. This variant is usually the most effective one for "snake-like" billets. The billet is divided into particular sections with a length of 1 m. In each section, a regression line is determined and the value of *w* is calculated by Equation (3) based on the value of *wpl*, which is given from the measured shape within the 1 m segment. If *w* > *wignor* then an intervention is performed in the given position. This variant of straightening is usually quite time-consuming for a large number of interventions, thus the value of *wignor* should be optimized to achieve an acceptable speed of straightening without compromising accuracy. The parameter *wignor* has the meaning of the minimal applied stroke in the first regime.

The second regime of the algorithm is chosen for *p*<sup>1</sup> < *p*<sup>0</sup> and *p*<sup>2</sup> < *p*2*crit*. The billet can be categorized as slightly curved "S-shaped" billet or "single-arc" type billet. Therefore, it is straightened either by two strokes or just one.

The third regime of straightening is used in the interval *p*<sup>1</sup> > *pmax*. The condition corresponds to a strongly crooked billet. The straightening is boosted according to the given material. An empirically determined multiplier is used for all strokes calculated by Equation (3).

The last regime is when *p*<sup>1</sup> < *p*1*crit* and *p*<sup>2</sup> > *p*2*crit*. It is evident from the condition that it usually corresponds to the case where the billet is curved in just one place. The largest deviation on the 1 m segment is found and the stroke is proposed using Equation (3).

The detailed flowchart of the complete straightening algorithm is shown in Figure 12. The part of the algorithm determining the positions and stroke proposals was written in NI LabView 2014 interface.

#### **6. Operational Experiments and Their Numerical Simulations**

To show the efficiency of the straightening algorithm in the second regime of the algorithm, two exemplar billets made from 100Cr6 material with a cross-section of 150 mm × 150 mm corresponding to "single-arc" and "S-shaped" type were selected for reporting as operational experiments.

Input parameters of the first billet shape were *p*<sup>1</sup> = 29.8 mm and *p*<sup>2</sup> = 2.4 mm. After one stroke application (*w* = 7.76 mm, in the position *x* = −3889 mm), the output parameters evaluated by the sensory system were 11.9 and 1.3 mm. The initial and final shape of the first exemplar billet is shown in Figure 13a. The input parameters of the second billet shape were *p*<sup>1</sup> = 20.8 mm and *p*<sup>2</sup> = 2.4 mm. After two strokes application (*w* = 8.37 mm, in the position *x* = −4350 mm and *w* = −8.1 mm, in the position *x* = −1580 mm), the output parameters evaluated by the sensory system were 14.4 and 1.8 mm. The initial and final shape of the second exemplar billet is shown in Figure 13b.

**Figure 13.** Initial and final shapes of two exemplary billets from operational experiments: "single-arc" type (**a**) and "S-shaped" type (**b**).

Finite element simulations were performed using the same strategy as in Section 3. Each billet was modelled using a spline curve created from points with an increment of 10 mm in the *x*-axis based on data obtained from the camera system. All nodes of the FE model are fixed in rotations around the *x*-axis. In the simulation of the "S-shaped" billet, two load steps were used. First, the boundary conditions of load step one will be described. Displacement boundary conditions were applied according to Figure 14. The force applied in the middle of the support distance (*L* = 1 m) was applied as a linear function of time. The maximal size of force is reached for 1 s with the corresponding value calculated from Equation (4). Then, a linear decrease of force to 10 N (because of convergency) is applied during the unloading phase, which ends after 2 s. In the second load step of the simulation, the maximal force is applied for 3 s considering Equation (4), and displacements were fixed similarly as shown in Figure 14 (supports moved to the new positions). The unloading phase is finished at 4 s with 10 N of force in the computation. The boundary conditions for the "single-arc" billet straightening simulation were analogous to those described for load step one of the "S-shaped" billet straightening simulation.

The Chaboche material model was calibrated to give an acceptable response of force for a given total deflection and to give a similar curve of total deflection versus plastic deflection; see Figure 15. Poisson's ratio ν = 0.3 was considered in both simulations. All other material parameters of the Chaboche model are stated in Table 3.

**Figure 14.** Boundary conditions for the first step of "S-shaped" billet simulation.

**Figure 15.** Prediction by the Chaboche model: force vs. total deflection including approximation by Equation (4) (**a**) and total deflection vs. plastic deflection (**b**).

**Table 3.** Material parameters of the Chaboche model for 100Cr6 material.


A comparison of experimental and predicted final billet shapes is provided in Figure 16. It is clearly shown that the strategy for numerical prediction gives acceptable results.

**Figure 16.** Comparison of experimental and predicted final shapes of two exemplary billets: "single-arc" type (**a**) and "S-shaped" type (**b**).

An exemplary result of regime 3 application on a very curved billet is shown in Figure 17. The input parameters of the third considered billet were *p*<sup>1</sup> = 95.4 mm and *p*<sup>2</sup> = 2.7 mm. After straightening, the output parameters evaluated by the sensory system were 17.8 mm and 1.8 mm. Thus, the straightening in regime 2 followed.

**Figure 17.** Shape of the third exemplary billet before straightening (solid curve) and after straightening (dashed curve) in regime 3.

The results of the fourth regime, which treats the situation of significant curvature in one place, will be presented on the exemplary billet with input parameters *p*<sup>1</sup> = 10.3 mm and *p*<sup>2</sup> = 2.4 mm. The stroke of *w* = 7.9 mm was realized in the position *x* = −4575 mm . The output values observed after straightening were *p*<sup>1</sup> = 10.5 mm and *p*<sup>2</sup> = 1 mm. The initial and final shapes are displayed together with the symbol of applied stroke in Figure 18.

**Figure 18.** Shape of the fourth exemplary billet before straightening (solid curve) and after straightening (dashed curve) in regime 4.

The efficiency of the first regime in the straightening algorithm will be shown on the exemplar "snake-like" billet with input parameters *p*<sup>1</sup> = 66.2 mm and *p*<sup>2</sup> = 3.9 mm. After the first application of regime 1 (strokes *w* = 9 mm for *x* = −5731 mm, *w* = 11 mm for *x* = −5211 mm, *w* = 10.3 mm for *x* = −3951 mm, *w* = 9.3 mm for *x* = −2981 mm, *w* = 8.9 mm for *x* = −1801 mm, *w* = 9 *mm* for *x* = −401 mm, and *w* = 8.4 mm for *x* = 839 mm), the output parameters evaluated by the sensory system were 45.8 mm and 3 mm, which means that the first regime was applied again. The second application of regime 1 (strokes *w* = 9 mm for *x* = −5731 mm, *w* = 11 mm for *x* = −5211 mm, *w* = 10.3 mm for *x* = −3951 mm, *w* = 9.3 mm for *x* = −2981 mm, *w* = 8.9 mm for *x* = −1801 mm, *w* = 9 mm for *x* = −401 mm, and *w* = 8.4 mm for *x* = 839 mm) gave acceptable output parameters of *p*<sup>1</sup> = 8.6 mm and *p*<sup>2</sup> =1 mm.

The initial and straightened experimental shapes of the "snake-like" exemplar billet are shown in Figure 19. The results of corresponding FE simulations are presented in Figure 20. Strokes proposed by the algorithm in reality were applied in particular load-

steps in a stroke by stroke manner. The boundary conditions used in each load-step of simulations were analogous to those presented in Figure 14.

**Figure 19.** Shape of the "snake-like" exemplary billet before straightening (solid curve), after first straightening (dotted curve), and after second straightening (dashed curve) in regime 1.

**Figure 20.** Comparison of experimental and predicted shapes of the exemplary "snake-like" billet: after first straightening (**a**) and after second straightening (**b**).

#### **7. Conclusions**

An automatic billet straightening machine was developed in cooperation between the university and industrial companies. The nature of the algorithm proposing interventions during the straightening process is described in this scientific work.

While the algorithm currently works for a 150 × 150 mm2 cross-section, it can be expanded into a more general form based on findings shown in the laboratory experiments (Section 3) to be applicable for the straightening of billets with various cross-section sizes. In that case, the most important outcome of the laboratory study is the possibility of constant value consideration for the plastic hardening parameter *kw*. Then, it is necessary to increase the support distance for a larger cross-section according to the linear approximation shown in the Figure 5. The material parameter *wy* depends on the yield strength of the material, Young modulus *E*, and the cross-section dimension of the billet. Both material parameters, *kw* and *wy*, must be properly identified for the considered material of billet from the force versus total deflection curve obtained for the chosen cross-section size. The algorithm itself is based on the assumption of a linear relationship between the total deflection and the plastic deflection. In fact, there is a slight nonlinearity for very small values of plastic deflection and this interval corresponds to the nonlinear part of the force versus total deflection diagram (for example in Figure 7). However, this interval is rarely used in the straightening algorithm. There is the parameter *wignor*, which corresponds to the minimal applied stroke for regime 1. In other regimes, it was experimentally proven that even a small intervention can help to straighten the billet ("single-arc" or "S-shaped" billets, usually).

Numerical simulations of operational experiments were done based on the Chaboche material model with two backstress parts to show the relevance of the algorithm. The basic regimes of the straightening algorithm considering different shapes of the billet were described. The algorithm was adopted on chosen steels in The New Long Billet Treatment Plant of Tˇrinecké železárny a.s. The process and material parameters are optimised using a Python code. The billet straightening strategy currently works properly for ten materials under consideration.

The next step of research is the application of rigid body movement calculations (a simplified approach to predict the impact of performed stroke on the billet shape change) to speed up the straightening process by minimizing the necessity of scanning.

**Author Contributions:** Conceptualization, R.H., J.S., and R.W.; methodology, R.H., M.F., and J.M.; software, J.M., M.F., J.S., and J.B.; validation, J.B., R.H., and M.F.; formal analysis, M.F.; investigation, R.H., M.F., J.S., and J.B.; resources, J.M. and M.F.; data curation, J.M., M.F., and R.H.; writing—original draft preparation, J.S.; writing—review and editing, R.H.; visualization, J.M. and J.B.; supervision, R.H. and R.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by The TECHNOLOGY AGENCY OF THE CZECH REPUBLIC in the frame of the project TN01000024 National Competence Center-Cybernetics and Artificial Intelligence; by the EUROPEAN REGIONAL DEVELOPMENT FUND in the Research Centre of Advanced Mechatronic Systems project, CZ.02.1.01/0.0/0.0/16\_019/0000867; by the project SP2020/57 Research and Development of Advanced Methods in the Area of Machines and Process Control; and by the project SP2020/23 Application of numerical and experimental modeling in industrial practice financed by the MINISTRY OF EDUCATION, YOUTH, AND SPORTS OF THE CZECH REPUBLIC.

**Acknowledgments:** The authors appreciate the assistance of TRINECK ˇ É ŽELEZÁRNY a.s. and KOMA—Industry s.r.o. companies during the preparation and realization of experiments and documentation support throughout the article preparation.

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

#### **References**

