Heuristic Adaptive Control of Waste Gas Exhausting in Coke Making

Stabilization of the carbon monoxide (CO) in the waste gas is a common technical problem in many industrial plants. Stabilization can be performed continuously by regulating the fuel input or by regulating the exhaust gas draught. This paper proposes an adaptive control system for CO stabilization in waste gases based on a discrete controller. Heuristic adaptation of a discrete controller is based on continuous optimization of controller parameters. The advantage of this solution is that the control system does not need to perform the identification of the controlled system repeatedly. The parameters of the controller are dynamically optimized during the production process. By regulating the under-pressure, we change the amount of air supplied to the combustion chambers, which affects the combustion of gaseous fuel and also the concentration of CO in the waste flue gas. The control algorithm was verified for the combustion process in coke making. The proposed control achieved good stabilization quality when verified in simulation and also in an industry operation. The CO level at which the waste gas temperature was highest was selected as the setpoint. It was found that the stabilization of CO in waste gas to lower values is possible to achieve higher waste gas temperature and by that, higher temperatures in heating chambers.


INTRODUCTION
Coke is a necessary component for the production of iron and steel. Nearly 65% of the worldwide steel production takes place via the so-called pig iron (hot-metal route), which is produced in the blast furnace from iron ore by use of coke [9].
Coal coking takes place in coke-oven batteries. The coke-oven battery is a large heat unit with high energy consumption and problematic operation. One of the main physicochemical processes is the heating gas combustion process. The essence of gas combustion is the chemical reaction of combustible components in flue gas with oxygen and the conversion of starting substances into new compounds. It is necessary to solve its perfect combustion to ensure the efficient use of the chemical energy of the fuel. In incomplete combustion, some of the heat is lost because the oxidation of the fuel does not take place sufficiently. When burning gases with a lower calorific value, the loss due to incomplete combustion is indicated by the content of carbon monoxide (CO) in the flue gas. This article proposes a heuristic adaptive control system of waste gas exhausting in a coke-oven battery, which is based on two levels, i.e., stabilization and optimization. The aim is to stabilize CO in waste flue gases. The stabilization level is based on a discrete controller, and the optimization level is based on an optimization method. The heuristic adaptation mechanism is an optimization level of control that continuously adapts the controller parameter for the controlled system. The optimization level will also find the optimal CO setpoint so that the highest temperatures are reached in the coke-ovens when heating the coal. This optimal value of CO in the waste gas is optimal from the point of view of the thermal heating regime. The higher the flue gas temperature, the greater the heat flux to the charge. The proposed control system is based on the possibility of regulating draught of waste gas (i.e., relative under-pressure) using a system of control flaps in the smoke channels of the coke-oven battery. By changing the waste gas draught, the amount of intake air changes, and thus indirectly changes the gas-air combustion ratio by changing the combustion ratio, the composition of the waste gas changes and, therefore, the monitored level of CO in the waste gas.

Understanding coke making
The coking takes place in coke ovens of the battery that include heating walls and coke chambers. The battery also contains regenerators, gas armatures, carbonation gas removal equipment, pusher machine (i.e., extruder), smoke ducts, footings, and a smoke-stack.
Each coking chamber has two heating walls. The principle of coke production is carbonization, which can be defined as the decomposition of coal under the influence of heat in the absence of air. In this process, a solid carbon unit (i.e., blast furnace coke) is formed from the coal, and gaseous carbonation products escape. Coal is converted into coke by heating the prepared coal blend charge in the coke ovens in the absence of air at a temperature of 1000-1050°C for [16][17][18][19] hours [29,33].
The coke-oven battery has horizontal coking chambers, which are heated by gas based on a regeneration system and are equipped to capture the chemical products of coking. A by-product of coke production is raw coke oven gas, which is cooled in the countershafts and discharged through pipelines for further processing (see Figures 1 and 2). The battery is usually heated by coke-oven gas or mixture gas, i.e., a mixture of blast furnace and coke-oven gas. Elbow boxes ensure air supply to the regenerators and flue gas discharge into the side smoke flues. The alternation equipment provides automatic switch (i.e., alternation) of heating periods at regular intervals (i.e., so-called reversal). The cooking time is the time of the carbonization, i.e., the time from the occupation of the chamber by the coal to the maturation of the coke. The coke in the chamber is considered mature when the temperature in the seam reaches 1000 °C. A coke-oven battery is usually made up of several blocks, and each block has several coking chambers (e.g., three blocks and each block has 30 chambers). Each block has its coking and machine side, i.e., the side from which the coke is dumped and the side where the pusher machine pushes the coke onto the coke side. Regenerators are used to preheat the mixture of fuel gas and air. Fig. 1. General scheme of coke-oven battery: 1 -base plate; 2 -flue-gas leadings with connection channels; 4, 3 -air channel; 5 -channels for cooling base plate; 6 -elbow boxes; 7 -supply channel for air or blast-furnace gas; 8 -heat regenerators; 9 -calibrated grates; 10 -filler of regenerators; 11 -pipe of blast-furnace gas; 12 -pipe of coke-oven gas; 13 -feed piping of coke-oven gas to distribution channels; 14 -sloping channels; 15 -heating channels; 16 -coke chambers; 17 -observation channels above heating channels; 18 -roof the battery; 19 -filler holes; 20 -holes for rising pipes [15] In the side smoke ducts, which are made of chamotte bricks, there are large-sectional control flaps for under-pressure regulation and gas analyzers designated for the analysis of CO and O 2 in the waste gas. In addition, the controlled underpressure (i.e., waste gas draught) and waste gas temperature are measured. The construction of the smoke-stack ensures a reliable draught of the flue gases. A detailed principle of coking in various types of coke-oven batteries can be found in [15,26,35].

Overview of coking control
Research in the field of coke making, the process control focuses on various elementary coking processes in different ways. Unfortunately, the studies that solve automatic control of combustion are still missing.
Sadaki et al. [29] have proposed an automatic coking control system that stabilizes coke production in a coke-oven battery. The proposed optimal control minimizes the energy problem by minimizing the objective function [29].
Controlling coking pressure is one of the most important aspects of the coke making process. Research in [22] has proposed control by selective crushing of high coking pressure coal. Özden has investigated coking time and temperature on metallurgical coke production by using a mixture of coking and non-coking coal [23]. Some authors have used machine learning and artificial intelligence approach to control process variables in coke making. Intelligent optimization and control of the coking process were well discussed in [39]. Support vector machinebased predictive functional control design for the output temperature of the coking furnace was applied in [46]. In [17], a modified radial basis function neural networks model was proposed to solve the control problem of the flue temperature in the coke oven.
Su et al. [32] have proposed an advanced control of coking formed by integrating a predictive functional controller with a traditional proportional-integral-derivative controller in cascade architecture with a feedforward compensator designated for disturbance rejection. The application results indicate that the advanced control can significantly improve the performance of the delayed coking furnace unit in terms of the outlet temperature of the furnace and oxygen concentration of the chimney [32]. Similarly, a combination of PID control and predictive functional control of the coking furnace was investigated in [45]. Adaptive state feedback predictive control and expert control for a delayed coking furnace were studied in [47].
The control of coking from the chemical point of view was well discussed in [33]. The research in this work also focused on the management of environmental pollution in the production of coke 3 -flue-gas leadings with base plate; 4, 5 -the roof of the battery; 6 -filler holes; 7 -chamber door on coke side; 8 -chamber door on machine side; 9 -chamber floor; 10 -Distribution channel; 11 -charging car; 12 -pushing and aligning machine; 13 -leading car; 14 -quench car; 15 -rising pipes; 16 -countershafts; 17, 18 -inlet pipe of gas; 19 -supply of coke-oven gas; 20 -supply of blast-furnace gas) [15] [36]. In literature, the proposal of an advanced control strategy for coking flue gas processing from a coking plant can also be found in [1,16].

Adaptive control in industry systems
The vast majority of processes in industrial practice are stochastic. However, conventional controllers with fixed parameters are not suitable for controlling such processes, because with changed process parameters, its control is not optimal, and there is a loss of material, energy, and reduced equipment life. The change of process parameters is given by the change of the operating mode, changes in the properties of raw materials, fuel, and aging of the equipment. Fixed controllers cannot handle such process changes.
It is similar in the case of the coking process, wherein the coke-oven battery there is a so-called alternated (i.e., in regenerators), the various temperature of batch (i.e., coal), different composition and type of fuel, the natural under-pressure at the outlet (i.e., the effect of weather conditions) and the fuel flow at the inlet.
One of the ways to increase the quality of such processes is the use of adaptive control systems. The adaptive control system adapts the parameters or structure of the controller to changes in the parameters or structure of the controlled system. Adaptation to a change in the parameters of the controlled system can be made by changing the parameters, the structure of the controller, or by generating a suitable additional input signal and repeating the identification of the system.
The adaptation can be understood as a higher level of feedback that changes the parameters of the controller. Currently, there are three basic approaches to adaptive control, i.e., adaptive control systems based on a heuristic approach, self-tuning controllers (STC) with explicit identification, STC with implicit identification, and adaptive systems with a reference model (i.e., model reference adaptive systems).
In the literature, we can find various applications of adaptive control focused on combustion processes (e.g., [13,24]). Applications of optimal, adaptive, and predictive control for combustion processes are also known (e.g., [43]).
A self-tuning algorithm based on the continuous identification of the heating system in the furnace was applied in [25]. The least-squares method was used to estimate the parameters of the model. The parameters of the discrete PI controller for combustion control were continuously adapted by an optimization algorithm using a process model. The proposed adaptive stabilization can be used for any size of furnace [25].
Control of electrical resistance furnace based on recursive finitely-convergent parametric identification procedure was presented in [31]. The control law is derived on the basis of an adjustable discrete-time dynamic model of a furnace.
In [20], the optimal adaptive-prediction control of spark-ignited combustion engine based on model predictive control (MPC) scheme with a linear prediction model was applied. The aim was to reduce fuel consumption and prevent undesired operation of the combustion machine. The proposed adaptive controller was compared in simulation with an infinite linear-quadratic regulator (LQR) [20].
Another approach to the control of industry combustion furnace was based on the feedforward-fuzzy decoupling control algorithm, which combines fuzzy control and feedforward compensation decoupling [8].
The principle of self-tuning PID controller based on a direct-search optimization controller's parameters can be found in [10]. In this work, an objective function that measures the quality of control performance is optimized by a succession of small adjustments to the three PID tuning constants. This technique provides optimal tuning for almost any loop that can be controlled by PID [10]. Various structures, variants of PID controllers, and self-optimizing control techniques can be found in [12].
In order to reduce oscillations of temperature in chambers under parameter uncertainties, a decentralized adaptive controller was developed in [34]. The principle of PID controller tuning by optimization method was also applied in [30]. The tuning optimization procedure was based on response surface approximation and numerical optimization based on automated design synthesis (ADS), where the ISE criterion was minimized [30].
Good results in comparison with the Ziegler-Nichols method were also obtained in PID controller tuning by E. Coli foraging optimization [41]. In [7], the unconstrained optimization method was used in the parametric optimization of PID and PI controller. It is a new and advanced method of numerical parametric optimization. Recently, a predictive functional control algorithm as an original PID tuning method was developed [44]. This approach was applied to chamber pressure stabilization in a coke furnace. The quality of control was compared with the control based on the Ziegler-Nichols method [44]. In research, the investigation of PID controller optimization based on an adaptive fuzzy tuner can be found [40]. There were investigated PID parameters optimizations based on Glowworm Swarm. Results have shown that the proposed method has good adaptability in terms of the optimization parameter and algorithm convergence [38].
Some research work focused on industrial applications uses artificial intelligence methods. For example, the PID controller tuning method based on ant colony optimization (ACO) can be found in [6]. This algorithm in an intelligent algorithm that is inspired by the behavior of ants looking for food sources in groups with traces of pheromone left behind. ACO computing can found the optimal parameters of the PID controller after several iterations. Other studies have proposed and applied a novel limited evaluation evolutionary optimization algorithm (LEEA) to adapt PID controllers [28]. The method that utilizes an adaptive genetic algorithm (AGA) for tuning parameters of the PID controller was proposed in [48]. Comparing traditional manual tuning PID with the AGA PID controller shows that AGA can improve system performance indicators. Recently, the utilization of a particle swarm optimization algorithm (PSO) for continuous tuning of the PID controller has been increased [42,27] in industry applications.
Unfortunately, in the most application of heuristic adaptive control based on optimization, only a simulation study was performed with a lack of practical implementation. Simulation results have shown that the controller's optimization can improve the quality of control [21]. When using the Ziegler-Nichols method in design, the optimization can decrease overshoots of the stabilized process variable [21]. In [37], data-driven PID controller optimization was investigated. In this proposal, Just-in-Time learning modeling was applied. This approach shows a new method for solving the nonlinear system control problem [37].
Adaptive controllers based on a heuristic approach ensure adaptability directly by evaluating the behavior of the controlled variable (e.g., evaluation of control error) or a selected criterion of the quality of the control performance [3]. The discrete controller algorithm is used as the control algorithm, and the oscillation measure of the controlled variable or the integral criterion is usually selected as the control quality criterion.
This approach does not require repeated identification of the controlled system. The identification of the system can be used in the case of an initial estimate of the controller parameters, e.g., from a discrete model of a controlled system. The block diagram of the heuristic approach to adaptive control is shown in Figure 3.
In the synthesis of such regulators, the effort is to optimize the criterion that quantifies the course of the control performance. This approach meets the requirements of practice and is also suitable in terms of the robustness of the controller. One of the successful applications is the heuristic approach to adaptive control proposed by Maršík [19]. Fig. 3. A heuristic approach to adaptive control (where w is desired value, i.e., setpoint, e is control error, u is actuating or manipulating variable, n is a disturbance, y is measured variable, i.e., controlled variable and q is the vector of adapted controller's parameters), (modified after [5])

DESIGN OF DISCRETE CONTROLLER
Currently, most industrial processes are controlled by continuous and discrete PID controllers (i.e., proportional-integral-derivative). Control algorithms based on PID controllers are among the most popular and efficient. The popularity of these regulators lies in their broad application and their functional simplicity. The controller parameters labeled as K P , T I , and T D are the proportional, integral, and derivational time constants of the controller. Industrial controllers allow independent setting of all three parameters, or by a suitable choice of parameters to change the structure of the controller to another type, i.e., P, I, PI, PD, PID. The most common controller design methods are the dominant roots method, the Ziegler-Nichols method, the optimal modulus method, the symmetric optimum method, and the inverse dynamics method.
If parameters of the continuous controller are satisfactory concerning the quality of control, we can determine the discrete form directly from the expression in a continuous form. However, this procedure assumes that the calculation of the parameters of the continuous controller is performed by known methods (e.g., Naslin, Ziegler-Nichols, optimal model, standard shapes, etc.) and the only requirement is then to determine its equivalent expression in discrete form. Such a controller is implemented today by microcomputer systems (i.e., PC or PLC), and therefore the method of conversion to a discrete form is important. The basic function of the controller in the control loop is to create an action intervention u(t) based on the control deviation e(t) (i.e., control error).
The purpose of the action variable is to ensure that the control deviation e(t) is as small as possible, regardless of the disturbance n, by acting on the controlled system at any time t.
A continuous ideal PID controller expresses the dynamic realization between the output variable from the controller u(t) (i.e., manipulation variable) and the control deviation e(t) [2,4,5]: (1) (1) The ideal PI controller has the form: (1) where: K P is the proportional constant, T I is an integration constant, and T D represents the derivational constant of the PID controller.
For a small sampling period T s , it is possible to determine the discrete PID controller by discretizing the individual parts of the equation of the continuous PID controller, i.e., the integral is replaced by the sum and the derivative by the difference (i.e., by applying the forward rectangular method).
After the adjustment of (1), the final form of the discrete PID controller is obtained: where: k parameter represents discrete time step, e(k) is control deviation in step k, i.e., e(k) = w(k) -y(k), and T s represents the sampling period (s). Desired value (i.e., setpoint) is given by variable w(k). Variable y(k) is a controlled variable, i.e., measured variable, that is stabilized by the discrete controller to w(k).
If substitutional variables: are established, then the recursive, i.e., velocity form of the discrete PID controller has the form: The model of a discrete PID controller expressed by z-transfer function has the following form: The recursive velocity form of a discrete PI controller can be obtained by applying the forward rectangular method of discretization of a continuous course of control deviations: then recursive velocity form of a discrete PI controller has the form: 12) and the discrete transfer function of the PI controller is: According to the method of calculating the integral in the equation of a continuous controller, it is possible to obtain three variants of estimating the parameters of the controller q 0 , q 1 , and q 2 . The most common integration methods include a backward rectangular method, forward rectangular method, and the trapezoidal method.
Since the sampling period T s is one of the parameters of the controller, it is often used as short as possible and then these digital PID controllers can be considered as continuous controllers. By shortening the sampling period T s . The quality of control is generally improved, the ability to respond to faults is better, and the discrete digital controller approaches to the continuous controller.
However, shortening the sampling period increases the stress of drive (with a period T s , step changes of the action variable are generated), and usually, the energy supplied to the system increases. Extending the sampling period C usually slows down the control process.
The most significant limitations in the choice of the sampling period are the properties of the actuator (i.e., drives), its insensitivity, and adjustment time. The following equations can be used to choose the sampling period if the step response is available [5]: where: T 95 represents the time of 95% steady of transient characteristic.
It was found, from the simulation results that T 95 = 70 s. According to (11) the interval for the sampling period is T s = (12 ÷ 5) s. From the calculated interval the final sampling period T s = 8 s was designated as a mean value. An important criterion in choosing the sampling period is that the actuating intervention will be physically feasible.
The mathematical model of the controlled system was obtained by experimental identification, i.e., by step excitation of the system under operation conditions on coking plant where step change of waste gas draught (i.e., relative-under pressure) with the value of ∆u = 30 Pa was applied and recording ordinates of transient characteristic ∆y i (i = 0, 1, 2, .., n). A discrete ARX model (13) of a controlled system with a sampling period T s = 8 s was calculated from the measured data by the least-squares method: Figure 4 shows a discrete model step response.

Initial controller setup
To calculate the controller parameters a Ziegler-Nichols method was used where K P = 0.5K Pu , T 1 = 0.83T u are parameters of a continuous PI controller and K P = 0.6K Pu , T 1 = 0.5T u , T D = 0.125T u for continuous PID controllers. Parameter K Pu represents critical (i.e., ultimate) gain and T u is critical (i.e., ultimate) period of oscillations (i.e., ultimate period) [49].
The disadvantage of experimental determination of critical parameters is that the system can be brought to an unstable state, and finding the limit of stability can be time-consuming for systems with large time constants. The following modified method for setting the parameters of a digital controller does not have these disadvantages. This method assumes that the discrete model contains a dead time (i.e., transport delay) of magnitude T s /2. The dead time does not change the amplitude, but increases the phase shift linearly with increasing frequency: At the critical frequency ω u ,, the system has a phase shift -π and gain A u , for which the following applies: where: K Pu is the critical (i.e., ultimate) proportional gain of the controlled system.
In discrete control, due to the phase shift caused by discretization, the critical frequency changes, and because the system has a different gain at a different frequency, the critical gain also changes.
The critical values then depend on the selected sampling period T s . Next, an algorithm for calculating critical parameters for the 2 nd order model will be presented. The algorithm assumes that the model is given by a discrete transfer equation of a regulated system in the form (12) with polynomials: The calculation of the critical gain and the critical period of the oscillations depends on the location of the poles on the unit circle in the complex z-plane. To calculate the real part of the complex combined pole and critical parameters of the controller (i.e. K Pu and T u ), the algorithm in Figure  5 can be used.
The following code in Matlab ® presents the calculation (m-file function) of the controller's parameters from the parameters (a 0 , a 1 , a 2 , b 0 , b 1 ,  b 2 ) of the discrete process model of the 2 nd order and sampling period T s : According to the presented algorithm, the following parameters of continuous and discrete PI and PID controllers were calculated. The following discrete transfers represent mathematical models of designed controllers. PI: PID: Discrete controllers were verified in simulation with a discrete model (12) using software tool Matlab ® Simulink ® . Figure 6 shows the behavior of CO concentration stabilization using a PI controller to various desired values. Similarly, Figure 7 shows the stabilization of CO by the PID controller. It can be seen from the graphical comparison that the PI controller can better eliminate control deviations, and the control process has fewer overshoots.

HEURISTIC ADAPTATION OF DISCRETE CONTROLLER
When implementing adaptive controllers based on a heuristic approach, the effort is to continuously seek for the extreme of the selected criterion, which quantifies the course of the control performance. This approach meets the requirements of practice and is also suitable in terms of the robustness of the controller. One of the successful applications is the approach proposed by Maršík [18,19]. The designed control system is based on the possibility to control the suction of combustion products with the system of relation flaps in smoke pipelines of coke-oven battery to change combustion air-gas relation.
The controlled variable is the concentration of carbon monoxide (CO) in the waste gas that is controlled by the adjustable under-pressure (i.e., waste gas draught) on the outlet to the smokestack. The measured and desired value of CO is expressed in percentage.
By changing the draught of the waste gas, the amount of air drawn into the heating ducts is also  changed, which affects the course of the chemical reaction during combustion in the heating chambers. The conceptual scheme of control with continuous optimization is shown in Figure 8.
By sending a request to change the waste gas draught to the central control system, the necessary opening or closing of the control flap in the smoke duct is ensured, while the percentage of flap opening can be monitored in feedback as well as the actual draught of the waste gas and measured CO concentration. The role of CO stabilization in the flue gas can thus be more precisely defined as the task of finding the optimal waste gas draught behind the control flap.
The essence of the proposed adaptation method lies in the continuous optimization of the parameters of the discrete controller in the algorithm of direct digital control. The discrete optimization method in optimization subroutine requires either an initial estimate of the optimized variables or the definition of the interval of the area in which the optimized variables are located.
The solution of adaptive control is based on the calculation of the initial estimate of the controller's parameters (see the previous section), i.e., vector q 0 = (q 1 0 , …, q n 0 ), which are continuously optimized during the operation of the device by the algorithm of the optimization method. The task of adaptive control at the stabilization level is to ensure the desired value of carbon monoxide in the waste gas by a discrete controller that will continually be adapted.
The optimization level continuously seeks for the optimal values of the controller parameters. The proposed optimality criterion expresses the control performance for assessing the capability of damping of the control error. As the aim is to minimize the deviations of CO from the setpoint (i.e., to reduce the control area) for this purpose, the following quadratic criterion was minimized in optimization level: where: τ 1 , τ 2 is the time of start and end of the evaluated control section, and variable n represents the total number of sampling steps on the evaluated section of the control.
Variable ∆u calculated by the discrete controller (i.e., (5) or (9)) represents the increment of chimney draught of waste gas (i.e., the increment of sucking relative pressure). The proposed adaptive control algorithm continually seeks for optimal parameters of the discrete controller during the coking process. The reason for adaptation is mainly the changes in the technological object during his life. Heuristic adaptation utilizes dynamic programming. In this paper, the Probe algorithm, i.e., the Relaxation optimization method, was modified and used for this purpose. Figure 9 shows the proposed flow chart for the dynamic optimization of PI controller parameters during the stabilization of CO and minimization of the objective function (19). The meaning of the variables in the flowchart of the optimization method is as follows: • q 0 = (q 1 0 , …, q n 0 ) is the vector of optimized parameters, • h 1 , …, h n represent constants for the step of the given parameter q i (i = 0, …, n), • ε 1 , …, ε n are precision requirements of h i (i = 0, …, n), i is an auxiliary variable that is used for indexing steps h i and adjustment of unit vectors ε i (in unit vector ε i , the i-th element is set to 1, and other elements of the vector are zero). • j is an auxiliary variable that indicates the successful modification of one parameter in a given direction, • q 1 is the modified vector q 0 , • e i a unit vector with a unit i-th coordinate, • f 0 is the smallest calculated value of the functional (19), • f 1 is the calculated value of functional (19) after control with q 1 , • q opt is the vector of last optimal parameters when optimization is turned off (i.e., flag Stop = True). • "Control" is a subroutine that performs the calculation (5) or (9) of the control action according to the optimized vector of parameters q. This subroutine is triggered only for a specified period. After this time, the control stops to calculate the integral criterion and to optimize (i.e., perform further modify the parameters).
The Probe algorithm is an optimization method of direct search of the optimum for multidimensional problems. It is suitable for solving technical issues with strong nonlinearities and a smaller number of variables. This method uses only information about the objective function, assuming that we have the ability to determine (i.e., calculate) its value for the given optimized control parameters. This method converges to the stationary point of the objective function under not very restrictive conditions, although its speed is not high. The method is suitable for maximum four-dimensional problems because the computational time increases with increasing dimension. If a faster search for the optimum is needed, the Rosenbrock method can be used.
In the implementation of the optimization algorithm, the "Control" subroutine runs only for a specified time. After this time, the control is interrupted so that the integral criterion can be calculated and a further parameter modification can be performed in order to optimize the controller. The control algorithm uses a timer or by event-controlled switching on of stabilization is event-controlled.
In the second case, the value of the objective function is always calculated when the regenerators are alternated on a given block of coke-oven battery. The alternation occurs approximately every 20 minutes, and this operation always takes about 1 minute. The digital signal from the central control system of the coke-oven battery was used to detect the time of the alternation of regenerators. If the alternation of regenerators is completed, the stabilization algorithm continues, but the discrete controller already calculates the control intervention ∆u according to the modified parameters q, because they were modified within optimizing method (modified after [11,14]) the optimization algorithm. It is also advisable to switch off the stabilization during the alternation of regenerators for another reason. During the alternation on the given block, there is an extreme increase in the process variables (i.e., waste gas draught, the concentration of CO, and O 2 ). This phenomenon is caused by the airtight closing of the flue gas valve. At that time, the thrust change request would be ineffective.

Optimization of the desired value
It is necessary to perform an analysis of the relationship between the flue gas temperature and the formed CO to determine the optimal value of the required carbon monoxide. The coke-oven battery belongs to large heat aggregates characterized by high energy consumption. The combustion of the supplied gas takes place in the heating ducts. The gas is supplied under pressure, and the air is sucked in by the chimney draught. The gas and air pass through a pair of regenerators, from which they take heat accumulated in their fire-clay walls, and when heated, they enter through the oblique channels into the spaces of the heating wall, where the gas and air are burned. From a chemical point of view, combustion is the oxidation of fuel. Oxidation of the fuel can take place at any temperature, but at low temperatures, it takes place very slowly. Combustion in the heating ducts of a coke-oven battery is referred to as burning with excess air, i.e., not all oxygen molecules react with carbon monoxide (CO) to form carbon dioxide (CO 2 ). Therefore, some remaining O 2 molecules, as well as some formed CO 2 molecules, will remain in the waste gas. In incomplete combustion of fuel, some of the heat is lost because the oxidation of the fuel does not take place sufficiently. During combustion control, some components of dry flue gases are detected by analyzers.
The stabilization of CO in the exhausted waste gas is based on the principle that as the waste gas draught increases, the CO content in the waste gas decreases, and as the waste gas draught decreases, the CO increases. This phenomenon is caused by a change in the amount of air sucked into the heating ducts. In the case of an increase in the amount of intake air, more air enters the heating ducts and thus more oxygen, which is contained in the atmospheric air. If the required CO value in the flue gas is lower, the control system must ensure a higher draft of the flue gas, which ultimately means more intake air through the air elbow boxes.
More air in the air-gas mixture in the heating ducts causes higher waste gas temperatures to be achieved when this mixture is burned. By controlling the exhausting to a lower level of CO, it will ultimately ensure a higher flue gas temperature. On the contrary, when controlling the exhausting with a requirement for a higher level of CO, it is necessary to suck less air by drawing the waste gas to reach this level, and the flue gas then has a lower temperature. The task of optimizing the CO setpoint is to find such a level of CO or O 2 when the flue gas temperature is the highest.
For the data groups obtained, where each group represented 20 hours of recording, the average values of CO, O 2 , waste gas temperature (i.e., heating temperature), and waste gas draught were calculated. The analysis was based on data measured on the machine side of one battery block. The same analysis would apply to the other battery blocks and their sides. Table 1 provides an overview of the calculated average values for the three days. It is necessary to find such optimal concentrations of CO or O 2 in the waste gas at which the highest temperatures were reached. In reverse logic, the controller changes the amount of intake air by controlling to the optimal CO and thus influence the chemical reaction during combustion. This is reflected in the change in waste gas temperature.
The table shows that by maintaining a lower average concentration of CO in the waste gas, the higher waste gas temperature can be achieved (see 0.16% CO and temperature 284 °C). Control system implementation The control system was created as a Windows application in Embarcadero ® RAD Studio using Delphi programming language (i.e., Object Pascal) using various visual components (see Figure 10).
The proposed control system was tested during the operation of the real coke-oven battery. This control system was created as a subsystem for the existing coke-oven battery control system, which ran as a SCADA/ HMI application. This SCADA system recorded the measured data with a period of 1 s and provided it via the DDE protocol to the proposed control subsystem, i.e., the application shown in Figure 10. The main control system communicated with the PLC, from which it obtained the measured process data. The PLC also realized the control signals according to the values of the manipulation variables. A complex scheme of implementation of the proposed control system is shown in Figure 11. The value of manipulating variable , calculated by the proposed control system has been considered as an optimal or desired waste gas draft sent to the central control system for the physical adjusting of the exhaust. In feedback, it is possible to obtain information about the measured waste gas draft, flap opening, waste gas composition, and temperature. This data are provided to the proposed control subsystem via the central SCADA system. The measurement was ensured by hardware sensors placed in pipes.   11. Design of control system implementation The proposed control system can stabilize the CO concentration to the desired value set by the human operator. Also, the application is ready to display selected measured process variables, i.e., CO (%), O 2 (%), and flap opening (%) on all sides of each block into the graph. The application can show the current measured draught of waste gas and waste gas draught calculated by the discrete controller (Pa). The measured process variables can be recorded in the database. Graphs of measured values are displayed as trends in historical data for a predetermined period (e.g., 5 min).
The proposed application allows interactive change of the sampling period as well as the period of recording the measured data in the database. The application can run in two modes, i.e., automatic and manual. In automatic mode, the automatic draught control runs so that the CO concentration in the waste gas is stabilized. In manual mode, it is possible to enter the optimal waste gas draught manually, i.e., by entering the value in the appropriate editing window. In the application settings, it is possible to enable or disable controller adaptation (i.e., optimization of controller parameters). The created control system performs several subroutines in its core, which are controlled by a timer. The subroutine performing the calculation of the control intervention (i.e., the increment of waste gas draught) in its definition may call a subroutine for the optimization of the discrete controller parameters. Stabilization is interrupted whenever a signal about the alternation of regenerators on a given block occurs. Figure 12 shows the behavior of CO stabilization on constant desired value during the coke-making on one block in the coke-oven battery. The CO concentration in waste gas was stabilized at 0.16 %, according to Table 1. Stabilization of CO by controller designed by the Ziegler-Nichols method is characterized by repeated overshoot, i.e., the oscillation of controlled variables. For this reason, it is needed to perform an adaptation of the controller. Figure 12 demonstrates the continual reduction of overshoots of the controlled variable and decreasing of integral criterion during optimization of the PI controller. The vertical division into sections represents a new calculation of objective function (19) from previous samples. The behavior of control is divided into 13 sections. At the end of each section, the value of the quadratic criterion was calculated, and one parameter of the controller was changed according to the optimization algorithm shown in Figure 9. The behavior of the corresponding temperature of waste gas sucked from the heating chamber shows Figure 13. The controller's parameters were continually optimized (see Figure  18), so as the ISE criterion was minimized (see Figure 14). Figure 18 shows the convergence of the controller's parameters and to its optimum. Figure 15 shows the magnified view on the control for 20 minutes. This behavior is from the sixth section (see Figure 12). This time section is given by alternation interval. Figure 16 shows the stabilization of CO on three various setpoints (i.e., 0.25 %, 0.5 %, and 0.10 % of CO). In this figure, it can be seen gradually improving the stabilization because the controller parameters were continuously optimized. Figure 17 demonstrates how temperature decreased when CO was stabilized on the higher value. For this reason, it is needed to stabilize CO on lower values, so the required temperature of waste gas from heating chambers was maintained.

CONCLUSION
Efficient coke production in coke-oven batteries requires advanced automated control systems that can optimally control fuel supply and flue gas extraction. The coke-oven battery is one of the large heat aggregates with high energy consumption, high production, and a large amount of waste gas that is produced in heating furnaces.
In this paper, an adaptive control system for the waste gas exhausting was designed that stabilizes the concentration of CO in the waste gas to the desired value. Two discrete incremental controllers (i.e., PI and PID) were designed and verified by simulation. Although both controllers were verified by simulation, only the discrete PI controller was verified under operating conditions. Adaptive stabilization based on the heuristic principle uses an optimization method for multidimensional optimization. During the stabilization of CO in the waste gas, the parameters of the discrete controller were continuously optimized, thus ensuring the adaptability of the control system to changing operating conditions. The proposed control can eliminate the human factor in waste gas exhaust control on the outlet from the heat aggregate.
The results showed an improvement in stabilization as the ISE criterion was gradually minimized, and the controller's parameters initially proposed by the Ziegler-Nichols method were optimized. The proposed control system can be used with some technical adaptation in real operations of coke-oven batteries or industry furnaces.