1 Introduction

Ferrous alloys dominate the metal production industries as they are versatile with many useful properties. The popularity of ferrous alloys also stems from the abundance of iron in the earth’s crust and the relatively inexpensive processes used to extract and refine ferrous materials [6]. The aim of this paper is to develop a powerful model-based forecasting tool that enables the prospective development of pickling bath conditions and changes in pickling process management as required.

Pickling stainless steel is generally carried out with an acid solution that mixes nitric acid (HNO\(_3\)) with hydrofluoric acid (HF). Nitric acid is a highly corrosive oxidant that reacts explosively with many metals, organic compounds and common building materials such as mild steel, limestone or mortar. These reactions result in the release of nitric acid fumes and nitrogen dioxide fumes. Used incorrectly, these chemicals can be dangerous both for people and for the environment. In addition, chemical reactions occur during pickling that release dangerous vapors. Industries that use processes where nitric oxide and nitrogen dioxide gases (NO\(_x\)) are emitted have strict government regulations regarding emissions. These gases can be formed in both annealing furnaces and pickling baths. Therefore, in order to reduce the risk of hazardous situations or accidents occurring, it is important that the hazards associated with pickling products are recognized and that safety regulations are followed. A background concentration of 2.5\(\mu \)g/m\(^3\) can be estimated based on the lowest concentration of NO\(_2\) in populated areas of the EU [19]. The toxic nitric fumes generated during pickling have several effects: high levels of nitric smoke can cause respiratory problems and in the worst case, inhalation can cause pulmonary edema. Exposure to NO\(_2\) gas, with a concentration greater than 200\(\mu \)g/m\(^3\), has a significant detrimental effect on human and animal health [17]. Environmental problems can arise such as acidification of groundwater or damage to plants. Excessive amounts of NO\(_x\) also cause eutrophication which disrupts the balance in the ecosystem [19]. Therefore, NO\(_x\) production must be kept low by not allowing pickling reactions to occur too quickly. Pickling of low corrosion resistance steel, such as martensitic steel, generates strong exothermic reactions that cause both an increase in the acid bath temperature and the emission of NO\(_x\) gases. The emission of these gases increases if the variables of temperature or acid concentration show high values. Thus, if the coil processing rate increases, the bath temperature will increase and this will imply an increase in the NO\(_x\) emission. An excessive increase in emissions will lead to the stoppage of production in the pickling line.

The aim is to use the prediction of the temperature in the pickling tanks to avoid overheating, which would cause the emission of toxic gases. In this way, it is necessary to build a management software tool composed of several ARMAX models established for each steel concerning every pickling program employed. Finally, overheating can be avoided by correctly sequencing the different coils in the pickling process. The operator can choose the crane hook or make use of alternative pickling programs to appropriately vary retention times and pickling tank selection. The economic benefits come mainly from better use of the production line, reducing coil waiting times. In this way, productivity can be maximized. The novelty of the work resides in the mathematical formulation of a simple, linear and reliable model in the specific topic of the steel pickling industry.

2 Plant description

A mixed acid bath is a common pickling method for stainless steel coils, in which they are immersed in a solution of usually nitric and hydrofluoric acids. Mixed acid enters cracks caused by a previous treatment. This pretreatment consists of one or more combined processes in which the oxide layer is stressed to create cracks and openings. This simplifies the penetration of the pickling solution and increases efficiency [13]. After mechanical pretreatment and conditioning of surface oxides, the coil enters a pickling tank filled with mixed acids. HNO\(_3\) acid begins to swell, dissolving the chromium deteriorated layer. HF acid removes metal ions dissolved in the solution by forming metal salts in the process. The pickling process involves removing from the surface the oxide scale layers formed during previous heat treatments (annealing, tempering, etc.) and the chromium-depleted regions beneath the oxides. When both are removed, the bulk material is clean and exposed, free to react with oxygen and form a thin passivation layer that protects the stainless steel from corrosion.

The coils of wire are guided through the different treatment tanks of the pickling plant in the specified order on the input side through a crane hook transport system. The choice of each specific process tank and the respective treatment times are largely automated by suitable material-specific control programs. This is the batch pickling process, where the steel is immersed in an acid solution for a preset time until the oxide scale is removed. It is then lifted from the bath, allowed to drain, and then rinsed by post-immersion in one or more tanks. Steel bars and wire rod coils are typically pickled in a batch operation. The residence time required to pickle a particular product can best be determined by trial and error. The influence of the bath temperature and the iron concentration on the pickling time is very important. Therefore, automatic control is required to maintain the temperature within specified limits.

Quality inspection of the coils before they leave the production line is carried out visually in order to determine that the pickling is correct. If the pickling is insufficient, then the coil is pickled again, which means that the coil is passed through the line again. This underpickling, or conversely, the risk of overpickling can make the pickling operation economically unviable, so the efficiency of the pickling process must be optimized by controlling and monitoring the variables: overpickling, underpickling and pitting are common consequences of control malfunction.

The temperature in the pickling baths is measured with a resistance temperature detector, specifically with a PT100. The resolution is one decimal digit resolution (1/10 \(^{\circ }\)C) and a sampling time equal to 1 s. The sensor is located inside a tube covered with contact oil.

3 Plant variables

Control and compliance with defined process conditions, e.g., metal concentrations and temperatures, are particularly important in the mixed acid immersion pickling baths. The concentrations are monitored and readjusted at fixed periods. Tank temperatures are increased because of the energy provided by the pickling process into the pickling acid, and they are dissipated through heat exchangers. In order to optimize the performance and efficiency of the pickling process, it is necessary to analyze the variables that affect its behavior, such as pickling pretreatment, acid mixture composition and metal salts dissolved in the pickling tank or hydraulic recirculations encountered during acid reaction as well as steel grade variables (alloy composition, previous heat treatment, residence pickling time of the coil and number of consecutive picklings). The coils must not be treated over a long-term period since overpickling may occur. Flow rate and mixing are difficult to directly correlate with pickling results. Turbulent flow significantly increases pickling speed. Higher acid concentration increases pickling efficiency mainly at low temperatures. At high temperatures, the difference is smaller. High concentrations may be limited by chemical use, fumes and acid-contaminated rinsing water. The alloying elements and their amounts affect the properties of the steel and therefore the pickling ability: in general, the greater the alloy, the more difficult the pickling. The type of thermal oxide formed by the previous heat treatment determines the pickling performance. This heat treatment can be attributed to any steel code (austenitizing of austenitic and duplex steels, tempering of martensitic steels, etc.).

Dissolved metal content affects pickling efficiency, particularly iron. Some dissolved iron catalyzes pickling reactions. However, as the metal content increases, the pickling rate decreases [9]. If the acid concentration is much lower than the dissolved iron, it will result in insufficient pickling (underpickling) and production rejection. This can be explained by the precipitation of metal fluorides consuming the fluoride in the pickling bath. The pickling rate can be maintained by continuously adding fresh acid. Notwithstanding, the metal concentration must not be high to keep the process economically viable. There is an optimal concentration of iron [18]. Otherwise, if the acid concentration in the pickling solution is much greater than the dissolved iron concentration, the surface of the treated material is prone to overpickling, which wastes materials and consumes too many chemical resources. Therefore, the acid concentration and dissolved iron must be within acceptable limits to produce a good consistent surface quality while optimizing the chemicals involved in the pickling process. Acid and dissolved iron concentrations also affect the pickling time required to obtain successful production, but steel grade remains the most important parameter for determining pickling residence time. The solubility of metals increases with increasing temperature [9]. The acid solution is considered depleted when the metal concentration becomes too high. In that case, it is sent to neutralization where lime is added to precipitate the ions and filter them from the liquid. In this way, the precipitation of iron fluorides in the pickling bath is avoided.

However, among all the parameters, the temperature of the pickling bath is a key variable for the efficiency of the pickling process and the pickling result, since the pickling rate increases as the temperature increases [11]:

  • According to the combination of exothermic chemical reactions and the cooling system performance, the temperature in the pickling tanks during the pickling process will be increased.

  • The monitoring and control of the mixed acid temperature is essential for the development of the pickling process.

  • Too low temperatures decrease the efficacy of the reactions that take place. In this way, temperatures above 25\(^\circ \)C are recommended.

  • Too high temperatures can adversely affect the pickling process results, there is a greater risk of overpickling and they complicate the catalytic cleaning of the exhaust gases. To avoid these problems, an upper limit of temperature in the range of 40–45\(^\circ \)C is advised.

4 Types of stainless steel

Due to the great diversity of final applications that use stainless steel as a material, there are many types that depend on the treatments carried out during its production and the different alloys considered in this process. Stainless steel is basically an alloy of iron, chromium in a weight percentage greater than 11% and a low carbon content of no more than 1.2% [6]. Stainless steel can be classified by its crystalline structure into four main types: austenitic, ferritic, martensitic, and duplex [23].

The structure of ferritic stainless steel is body-centered cubic and the crystallization phase is known as ferrite or \(\alpha \)-iron [22]. It is essentially a chromium alloy. Ferritic steel usually contains between 12 and 17% chromium [23], although in some grades it can reach up to 30%. As in austenitic steel, the carbon content is very low, usually between 0.03 and 0.08%. In general, it has a lower corrosion resistance than austenitic steel. The pitting corrosion resistance can be improved by means of adding small amounts of molybdenum and nitrogen. In some cases, titanium or niobium is added in order to avoid intergranular corrosion.

Austenitic stainless steel is the type most used in final applications [15]. Austenite or \(\gamma \)-iron is its crystal structure with a face-centered cubic arrangement. It contains 16–26% chromium and 6–12% nickel [23], although alloys with the highest amount of chromium reach nickel contents close to 20%. There are austenitic grades where molybdenum is added to obtain very high resistant corrosion. Austenitic stainless steels have better corrosion resistance than martensitic and ferritic steels.

The martensite is a body-centered tetragonal structure which results from the fast cooling of the austenite. Martensitic stainless steel is basically an alloy of chromium and carbon. The chromium content ranges between 10.5 and 18% and the amount of carbon is high, reaching values of up to 1.2% [23]. Although this fact makes martensitic steel have a high mechanical resistance [10], it negatively affects its resistance to corrosion in such a way that this type of steel presents a lower corrosion resistance than austenitic and ferritic steels. Small amounts of molybdenum and nitrogen may be added to achieve better corrosion resistance.

Duplex steel is formed by a combination of ferrite and austenite structures (\(\alpha +\gamma \)). The weighting of both structures is achieved by adding chromium and molybdenum to enhance the alpha structure and, on the other hand, by inserting gammagen elements such as nickel and nitrogen. Typical chromium content is between 18 and 26%, while nickel is between 4.5 and 6.5%. It has a very good behavior against corrosion, even surpassing austenitic steel in some cases.

5 Methods

The strategy employed to elaborate the model consisted in obtaining the net heat flux \(q_{\text{net}}(t)\) corresponding to such temperature evolution during the pickling process time and during the moments when there are no coils in the bath. Here, \(q_{\text{net}}(t)\) is the net entering heat flux in the pickling bath. Considering that the cooling system is continuously working during the pickling dwell time in the same way as during the wait time between the pickling operations, it can be stated that the net heat flux has a fixed component, \(q_{\text{loss}}(t)\), due to such cooling. Then, when the pickling process is taking place, the net heat flux is composed of the sum of the steel heat flux \(q_{\text{steel}}(t)\) due to the exothermic reaction of the coils being pickled in the acid bath (considered positive) plus the heat flux component \(q_{\text{loss}}(t)\) due to the cooling system (considered negative) according to equation (1).

$$\begin{aligned} q_{\text{net}}(t)=q_{\text{steel}}(t)-q_{\text{loss}}(t) \end{aligned}$$
(1)

The procedure to obtain these heat flux components is based on the following strategy:

5.1 Obtaining the cooling dynamics due to the heat exchanger

Considering the cooling system as an indirect-surface heat exchanger composed of parallel tubes, in which the exchange of heat between the mixed acid and the cooled water takes place mainly by conduction, the cooling heat flux \(q_{\text{loss}}(t)\) can be approximately modeled as (2), where \(T_0\) is the temperature of the cooled water, \(R_T\) is the total thermal resistance of the heat exchanger and T(t) is the temperature in the pickling bath.

$$\begin{aligned} q_{\text{loss}}(t)=\frac{T(t)-T_0}{R_T} \end{aligned}$$
(2)

On the other hand, the definition of net entering heat flux as a function of the heat capacity of the acid fluid states that

$$\begin{aligned} q_{\text{net}}(t)=C \frac{dT(t)}{dt} \end{aligned}$$
(3)

When the exothermic reaction due to the pickling treatment of the coils is completely over, having considered the end of the heating inertia after the coils are removed from the pickling bath, the net heat flux has only the cooling component due to the heat exchanger, i.e., \(q_{\text{net}}(t)=-q_{loss}(t)\) since \(q_{\text{steel}}(t)=0\). Taking into account this fact and Eqs. (2) and (3), expression (4) can be established, where \(K=1/(C \cdot R_T)\) represents the dynamics of the cooling system due to the heat exchanger:

$$\begin{aligned} \frac{dT(t)}{dt} = K (T_0-T(t)) \end{aligned}$$
(4)

Applying the Euler numerical integration method in (4), expression (5) for the temperature of the pickling bath at each instant k can be set, where \(T_s\) is the sample time. Since the pickling bath temperature is available in the dataset, it is possible to obtain an estimated value of K for each instant k. Theoretically, this K parameter should be a constant, so that a medium value is obtained to model the whole cooling temperature evolution. Parameter K allows to obtain the heat flux due to the cooling system, \(q_{\text{loss}}\), for each time instant, the dynamics of which are the same for the whole process except when the cooling system is switched off.

$$\begin{aligned} \frac{T_k-T_{k-1}}{T_s}=K (T_0-T_{k-1}) \end{aligned}$$
(5)

A preprocessing adaptation of the temperature data must be carried out in order to obtain the temperature dynamics during the pickling operation. The dataset has a sample time equal to 1 s and the temperature is recorded with a resolution of 0.1\(^{\circ }\)C.

Fig. 1
figure 1

Block diagram

5.2 Obtaining the net heat flux during the whole process

Considering equation (3), the net entering heat flux during both the pickling process dwell time and the wait time between processes (\(q_{\text{net}}(t)/C\)) can be obtained differentiating temperature T with regards to time instant k, since the temperature samples are available in the dataset.

5.3 Obtaining heat flux \(q_{\text{steel}}(t)\) due to the exothermic reaction of the pickling process

Finally, applying the balance of the heat fluxes (1), at any moment in time, the heat flux qsteel(t)/C can be obtained. It should be equal to 0 when there is no reaction induced by the immersion of the coils in the pickling bath. The whole mathematical model can be expressed as a block diagram in Fig. 1.

At this point, it is possible to carry out supervised training in order to establish the mathematical relationship between the presence of coils being pickled, represented by variable u(t) in the block diagram, and the heat flux \(q_{\text{steel}}(t)/C\) produced during the process. This mathematical relationship will be expressed as an ARMAX model and is explained in the next section.

6 ARMAX

Training datasets must be collected with the \(q_{\text{steel}}(t)/C\) heat flux triggered by the exothermic reaction of each steel grade in each bath concerning the number of coils introduced for a single pickling operation. Each training dataset will provide the identification basis to obtain the most accurate ARMAX model and, in this way, the heat flux due to the pickling reaction qsteel (t)/C during the pickling dwell time can be obtained.

ARMAX (Auto-Regressive Moving Average model with eXogenous inputs) models [5] represent the mathematical relationship between the system output and the system input in the presence of noise considering linear dynamical system. The model identification based on the ARMAX algorithm can easily avoid the over-parameterization of the mathematical model which is an advantage over other techniques [21].

The ARMAX model has been widely used for different applications in order to obtain not only a prediction of some key variable, but also to model the dynamics of physical systems and subsequently be able to control them. In thesis [12], an ARMAX model is used to control a reheating furnace by means of model predictive control. Quantification of damage in reinforced wall constructions is implemented in Mei et al. [16] and Ay and Wang [2] carried out damage monitoring in mechanical structures using vibration signals as input data. In R. et al. [20], the steam pressure variation process inside fire-tube boilers was identified with a second order linear ARMAX model. In work [26], a reduced subset of variables is obtained using a preprocessing algorithm applied to acoustic sensor data and then an ARMAX model is fitted to predict the lifetime of cutting machines. The prediction of the pasteurization temperature in the milk industry is accomplished in Del Carpio Ramirez et al. [7]. A battery thermal management system [1] analyzes the temperature distribution with the objective of minimizing the temperature of the batteries using different refrigerants and obtaining models using statistical techniques.

Several works combine prior physical knowledge of the system with ARMAX models to carry out the control or prediction of a certain variable. In Wu and Sun [24], room temperature is predicted including architectural parameters. The order of an ARMAX model is determined using the thermodynamic equations of a building room in order to be used for real-time fault detection in [25]. Paper [8] highlights the importance of combining thermodynamic fundamentals with models based on experimental data to address control in ferrous alloy furnaces. Also, in Azadi et al. [3], a hybrid approach is used to improve control in blast furnaces.

ARMAX model identification is a suitable procedure for dynamic systems which are under the influence of noise by means of adjusting the appropriate polynomial degrees in Eq. (6), considering that there is no dead time in the system. The ARMAX model consists of an autoregressive part that contains the output measurements, a moving average part corresponding to the white noise error terms and an exogenous part which is composed of the input variables [4].

$$\begin{aligned}{} & {} y_k+a_1 \cdot y_{k-1}+a_2 \cdot y_{k-2}+...+a_{na} \cdot y_{k-na} \nonumber \\{} & {} \quad =b_1 \cdot u_k+b_2 \cdot u_{k-1}+...+b_{nb} \cdot u_{k-nb+1} \nonumber \\{} & {} \quad e_k+c_1 \cdot e_{k-1}+c_2 \cdot e_{k-2}+...+c_{nc} \cdot e_{k-nc} \end{aligned}$$
(6)

where k is the discrete time, y is the model output, u is the model input, e is the model prediction error and \(a_i\), \(b_i\) and \(c_i\) are the coefficients to be estimated.

The identification of this kind of system can be carried out through the application of mathematical methods that obtain the system dynamics and the model parameters based on input and output information of the system. The model parameters can be obtained using several identification algorithms such as recursive extended least squares, recursive maximum likelihood and prediction error method, Ljung [14]. In this paper, the prediction error method is applied to the ARMAX model (6) to estimate the parameters \(a_i\), \(b_i\) and \(c_i\).

The definition of the ARMAX model can be written as a discrete-time transfer function. This transfer function represents the input–output relationship of the ARMAX model. In this way, the Z transform can be taken in (6) to obtain (7).

$$\begin{aligned} A(z)= & {} 1+a_1 \cdot z^{-1}+a_2 \cdot z^{-2}+...+a_{na} \cdot z^{-na} \nonumber \\ B(z)= & {} b_1 + b_2 \cdot z^{-1}+...+b_{nb} \cdot z^{-nb+1} \nonumber \\ C(z)= & {} 1+c_1 \cdot z^{-1}+c_2 \cdot z^{-2}+...+c_{nc} \cdot z^{-nc} \end{aligned}$$
(7)

Therefore, na is the number of poles (model order), nb is the number of zeros plus 1 and nc is the number of C coefficients.

The estimated \(q_{\text{net}}(t)/C\) acquired with both simulations of \(q_{\text{steel}}(t)/C\) and \(q_{\text{loss}}(t)/C\) allows to obtain an estimated temperature evolution T(t), calculated by sequential numerical integration based on previous predicted temperature values, starting from an initial temperature condition which is set as the first value of the real temperature data. The aim is to develop a pickling program management model which would predict the temperature evolution in any acid bath due to the sequence of pickling operations. Firstly, the ARMAX model obtains the \(q_{\text{steel}}(t)/C\) flux versus the specific type of wire rod material, considering also as input variables the number and the specific type of coils treated in the same operation and the pickling dwell time. Then, by adding the previously calculated \(q_{\text{loss}}(t)/C\) flux, the temperature evolution can be obtained integrating the resulting \(q_{\text{net}}(t)/C\). This management model tool will allow the selection of the optimal dip tank based on the current process data for optimal pickling results.

6.1 Discussion of the training variables

A particularly compelling aspect to consider when studying the dynamics of the acid bath temperatures is the number of pickling operations performed on the coils in previous pickling tanks. The number of pickling stages affects the temperature dynamics and the steel heat flux produced. The first pickling stage produces the highest temperature and heat flux values, as the number of previous pickling treatments affects subsequent pickling operations, reducing temperature peaks since most of the scale has previously been removed (see Fig. 2). The longer the pickling dwell time, the more pronounced this effect is. The number of previous picklings does not need to be included as an input variable in the model as it consists of a different ARMAX model obtained for each steel type in a specific bath.

The effect of percentages such as acid or dissolved iron is difficult to assess because their concentrations vary very slowly and are always within suitable ranges for a good pickling process. However, the ratio between the concentrations of HF and HNO\(_3\) is important for the efficiency of the pickling process. There are several recommended levels to accommodate the more corrosive and demanding HF pickling of high alloy stainless steels (dual-phase, etc.), and they can be adjusted for milder acid requirements for common steel operations, e.g., austenitic or ferritic steels. Nitric acid is strongly oxidizing, attacking and dissolving metal oxides, while HF forms iron complexes and precipitates. Higher levels of dissolved iron indicate lower levels of HF (and lower levels of HNO\(_3\)) in the acid bath. Therefore, these concentrations were not considered in the pickling identification model because the relationship between HNO\(_3\), HF and iron concentrations remained stable due to regeneration of the pickling bath.

Fig. 2
figure 2

Comparison between stages 1 and 2 of the steel heat flux obtained in the pickling reaction of one coil of ferritic steel

Fig. 3
figure 3

Training data and estimated steel heat flux for a specific martensitic steel

Fig. 4
figure 4

Test for the martensitic steel obtained in Fig. 3

The bath temperature at the beginning of the pickling process affects the bath heating rate and satisfies the Arrhenius behavior of chemical reactions (exponential dependence between reaction rate and reaction temperature). Since a fixed residence time is set for each steel code in each pickling program, the rate of chemical reaction affects the temperature dynamics and heat flux produced by the exothermic reaction of each pickling operation. The average heating rate is derived from the maximum of the residence time heat flux \(q_{\text{steel}}(t)/C\), which is used as an equivalent of the reaction rate to emphasize the bath temperature at the beginning of the pickling process and the rate of the heating reaction.

The reliance is higher on martensitic steels as they use a shorter residence time in the pickling, so their heating reaction is incomplete when the coil is taken out of the bath. Additionally, they experience maximum temperature and heat flux. Austenitic steels are less relevant because they use longer pickling residence times, so their heating reaction is nearly complete when the coil is taken out of the bath. Furthermore, their temperature and heat flux release are the lowest.

The weight and thickness of the coil were defined as factors affecting the contact area of the pickling reaction. Therefore, the steel heat flux used to obtain the ARMAX model is normalized per unit of weight and thickness. For each grade of steel, the density is similar and the volume of the coil of the same weight is the same, so the contact area is inversely proportional to the thickness of the coil. On the other hand, the greater the weight, the greater the volume and the greater the contact area.

The training variables of the ARMAX model are the steel grade, the pickling stage, the number of coils treated in the same operation, its weight and thickness. The bath temperature at the beginning of a specific pickling operation must be taken into account considering different linear regions regarding the temperature ranges of the pickling bath. Figure 3 shows the training data and the estimated steel heat flux for a specific type of martensitic steel. Employing this model, the estimation of the temperature can be obtained using the test data in Fig. 4.

The practical implementation of the model can be summarized in the following steps:

  1. 1.

    The temperature T(t) must be derived to obtain \(q_{\text{net}}(t)/C\) taking into account equation (3).

  2. 2.

    The constant K must be obtained by (5) using a dataset in which only the cooling of the bath occurs without any type of steel being treated.

  3. 3.

    The \(q_{\text{loss}}(t)/C\) heat flux can be obtained in this step to calculate \(q_{\text{steel}}(t)/C\) using balance (1).

  4. 4.

    The \(q_{\text{steel}}(t)/C\) heat flux is normalized by unit of weight and thickness of the coil, this variable being the one considered as the output of the ARMAX model to be obtained. The input of the ARMAX model is u(t), that is, the number of coils to be treated. Different model orders (\(n_a\), \(n_b\), \(n_c\)) are tested in order to obtain the best ARMAX model.

7 Results

Figures 5, 7 and 6 show different offline tests carried out on real pickling sequences for some steel codes. Each graphic shows the estimation of the temperature versus the real temperature. Important differences in terms of temperature dynamics and heat flux distribution can be outlined between each type of steel. The prediction errors using RMSE are shown in Table 1.

Martensitic steels require special care, as the \(q_{\text{steel}}(t)\) flux is higher and the temperature rises rapidly due to exothermic reactions. Care must be taken in order to avoid long-lasting residence times, because if the temperature exceeds 45\(^{\circ }\)C, the HF will volatilize and produce harmful and corrosive vapors. Figure 5 shows the temperature evolution of the pickling treatment of a specific martensitic type of steel.

Fig. 5
figure 5

martensitic 1.40050-52 coils (13 mm, 1000–1100 kg), stage 1 (B6 tank, BP 88). TF model established for bath temperatures between 35\(^{\circ }\)C and 40 \(^{\circ }\)C

Fig. 6
figure 6

austenitic 1.44010-59 coils (5.5\(-\)6.5 mm, 1000–1100 kg), stage 1 (B6 tank, BP 23)

Fig. 7
figure 7

ferritic 1.41130-51 coils (6 mm, 900–1000 kg), stage 1 (B6 tank, BP 40). TF model established for bath temperatures between 20\(^{\circ }\)C and 30\(^{\circ }\)C

Austenitic and duplex steels are the most difficult to pickle because they require longer and more severe pickling treatments. In addition, these types of steel have a higher underpickling defect rate (especially duplex steels). However, they are not critical for temperature troubleshooting, as they hardly raise the temperature of the acid bath, the \(q_{\text{steel}}(t)\) flux is very small due to the exothermic reaction, and many operations can be sequentially performed with small gaps in time, as can be seen in Fig. 6.

Ferritic steels are the easiest to pickle and require moderate residence times in the pickling bath. They raise the temperature of the bath in a controlled manner. Figure 7 shows the real simulation obtained by the model for ferritic steel.

In addition to the differences between steel grades, it must be noted that there are also distinct differences between each type of steel, i.e., there is a subset of classification within each category giving rise, in this way, to different subtypes of steel.

Austenitic and duplex steels are the most difficult to model because they are treated in sequences with barely any wait time between single pickling operations. Also, the temperature increase is very low as they produce small heat flux. For that reason, a more random behavior is obtained in comparison to ferritic and martensitic steels.

Table 1 Prediction results using root mean square error

8 Conclusions

In addition to mixed acid steel strip pickling lines, stainless steel wire pickling in dip tank pickling systems poses particular challenges for production planning and pickling process management.

Offline simulation testing and optimization studies were performed by running the online model in the pickling line environment before setting up the platform. Such a platform consists of a graphical user interface (GUI) application that contains several options for simulating and evaluating the temperature trend due to a predetermined pickling sequence, starting with the initial temperature entered into the application, which is the value of each pickling tank.

Based on the work described in this paper, a model-based management software tool has been developed which allows to describe the temperature dynamics in the five mixed acid pickling tanks. Forecasting is possible several hours in advance. For the development, training and validation of the model, information from the production and process databases was used, based on the steel material properties, the surface area to be pickled and the dynamics of the process bath. Excellent results have been obtained in temperature prediction when treating martensitic and ferritic steels, which are precisely the most problematic types of steel in the control of pickling temperature. RMSE values lower than 0.2\(^{\circ }\)C were obtained (see Table 1).

The introduction of online analysis measurement technology developed in the MACO-PILOT project ensures that preset value ranges for bath concentrations are maintained. In this way, the influence of the bath concentrations has little relevance to the temperature prediction model. The online version of the model software was installed on a computer system located at the pickling plant. Forecasting relevant information can be transmitted such as the sequence of the wire coils to be treated, their material identifiers, the specific pickling programs provided, as well as the data of the pickling process. A human–machine interface (HMI) module displays the current and the predicted values of the temperatures and the heat flux densities of the five pickling tanks as a function of the planned coil sequence showing them graphically in separate diagrams (see Fig. 8). The model-based management software tool to predict the temperatures in the pickling baths allows plant personnel to better monitor the pickling process and, if necessary, to make proactive changes to the pickling process sequence. The operator can change the sequence of coils at the pickling plant entrance or make use of alternative pickling programs to appropriately vary retention times and pickling tank selection. The development and operational use of this model-based management tool is an important step in process optimization in mixed acid wire pickling plants.

Fig. 8
figure 8

Human–machine interface (HMI) of the model-based management software tool